Базы знаний
How to prepare documents for better RAG
Document structure determines the quality of the agent's answers. What improves retrieval.
Structure is what matters
RAG splits documents into chunks and searches them semantically. Text with explicit sections and headings works best.
What improves retrieval
- H2/H3 headings — the system reads the structure
- Short paragraphs (2–4 sentences)
- Explicit definitions: “What X is: …”
- Lists — each item is easy to retrieve on its own
- Distinctive terms at the start of a section
«A well-structured 50-page document usually produces better RAG results than a 500-page PDF of scans.»