Documents
Documents enable you to expand an agent’s knowledge and ground its responses by adding information from attached files or HTTP/HTTPS URLs.
- Improved accuracy: By grounding responses in real-time retrieved data, this approach reduces hallucinations and enhances factual reliability.
- Dynamic adaptability: The model adjusts its responses based on the latest information from the knowledge source.
- Domain-specific knowledge: Ideal for use cases that demand specialized or frequently updated knowledge, such as customer support, research, or product documentation.
AI Agents framework supports the following methods of working with documents
- Semantic search (for every query) – implements classic Retrieval-Augmented Generation (RAG) technique, which provides document extracts relevant to user’s query.
- Semantic search (agentic, via doc_search tool) – implements agentic RAG pipeline, where LLM can decide when it needs document extracts.
- Full content (in prompt) – includes complete content of attached documents in the prompt. This mode is suitable for relatively short documents.
- Full content (agentic, via doc_get tool) – implements agentic pipeline, where LLM can request content from specific documents or their sections.
- Structured lookup – for tabular documents (Excel / CSV), looks a record up by one or more search columns (for example, by name, or by phone number and city) instead of using semantic search.
For more details, see Using documents and Structured lookup.
Parsing documents
For RAG (Retrieval-Augmented Generation) processing, documents must be split into smaller, manageable chunks to ensure efficient retrieval and accurate context handling. Each chunk should contain a coherent piece of information, typically a few hundred words, so the model can understand it in isolation. Properly chunked documents improve retrieval relevance and help the LLM generate more precise and consistent responses.
LiveHub AI Agents parses documents using the following pipeline:
- Documents are converted to Markdown format.
- Markdown files are split into chunks based on their headings, keeping paragraphs intact. The target chunk size is user-specified but may vary depending on the content.
- Oversized chunks are further divided into smaller pieces, with overlapping content to preserve context.
- Each chunks is enriched with contextual metadata derived from the document’s description and header structure.
In addition to the chunking pipeline, LiveHub AI Agents retain the original document in Markdown format to support “full content” working modes, allowing the agent to access the complete source when needed.
Supported file formats
You can upload files in any of the following formats. Each is converted to Markdown before chunking:
- PDF (
.pdf) — see Customizing PDF parsing. - Word (
.docx) - PowerPoint (
.pptx) — each slide becomes a separate chunk. - Excel (
.xlsx) — each row is rendered asfield: value | field: valueunder a per-sheet heading, for accurate row-level retrieval. - CSV (
.csv) — the same row-level layout as Excel, with automatic delimiter detection and an optional header row. - HTML (
.html,.htm) - Markdown (
.md) - Text (
.txt)
Some files are uploaded as special document types that are not chunked for retrieval – such as audio files (.wav / .pcm) and certificate files (.crt / .key). See Special documents.