# Give an LLM the table of contents before you give it embeddings

- Category: product
- Author: Mihai Negrea (https://indie.md/people/mihai-negrea/)
- Source: https://indie.md/events/indie-tm-12-timisoara-july-2026/
- Canonical URL: https://indie.md/advice/guide-the-llm-through-the-table-of-contents/

DataDriven serves tender documentation to AI assistants as structured markdown with an explicit table of contents and chapter hierarchy, and retrieval walks that structure first, using semantic search as a supplement rather than the foundation. Mihai distrusts embeddings-only RAG for long official documents, where a naive similarity search returns fragments stripped of the context that gives them legal meaning. Guided navigation, find the right chapter, then read it properly, mirrors how a careful human reads a contract, costs fewer tokens, and fails more predictably. The broader point for anyone building on LLMs is that documents already contain an information architecture, headings, sections, numbering, and throwing it away to chunk-and-embed is destroying signal you paid to OCR. Preserve structure, navigate it explicitly, and reserve embeddings for the queries structure cannot answer.
