03Knowledge / Agentic RAG
Agentic RAG.
How your documents become grounded answers: ingested once, retrieved every time, cited always.
This is our RAG, retrieval-augmented generation: the ground truth everything else stands on.
AThe idea Introductory
Instead of answering from memory alone, the agent looks things up in your material first.
A general model knows a lot in general. Grounding makes it answer from your specific documents, data and code. When someone asks why last quarter's study settled on that mesh density, the answer has to come from the study itself, not from a plausible guess.
Like a library with a perfect catalog. Every paragraph gets its own catalog card; a question pulls the right three cards, never the whole library.
→Step one, before any question
- Split. Every document is cut into chunks: small, self-contained pieces, roughly a paragraph each.
- Fingerprint. Each chunk gets an embedding, a list of numbers capturing its meaning, so "thermal limit" and "maximum temperature" land close together.
- File. All embeddings go into an index built for nearest-meaning search. Done once, ahead of time.
→Step two, every question
- Take the question. It gets an embedding of its own, the same kind the chunks have.
- Retrieve. The index returns the chunks whose meaning sits nearest the question.
- Answer with sources. The agent answers from those chunks, and shows where each fact came from.
ExWhen you ask for it
- The ask. "What did we decide about mesh density last time?"
- The lookup. The agent does not grep and hope: it retrieves the March study, then follows the link from its conclusion to the convergence run that justified it.
- What comes back. The decision, the reason behind it, and citations to both the study and the convergence run, so you can check each one.
→In plain terms
Answers grounded in your material, with the sources shown.
BHow it works Intermediate
It retrieves, reads, and can hop across linked facts, so multi-part questions get a connected answer.
Some questions are not in any single document. They are assembled by following links between facts.
- Retrieve. Find the most relevant passages.
- Read. Extract the specific facts needed.
- Hop. Follow links from one fact to the next.
- Ground. Answer only from the evidence, with citations.
Retrieve
hybrid search
Search the chunk index two ways at once: by meaning (embeddings) and by exact keywords. For example, a question about damping pulls the three chunks that actually cover the damping model, even when they never use the word "damping".
Read
extract facts
Read the passages and extract the specific facts needed. For example, from a long test log it lifts out one number, the measured quality factor.
Multi-hop
follow links
Chain facts across documents to reach the answer. For example, a spec names a material, and the material's own datasheet holds the limit.
Ground
sources only
Answer only from retrieved evidence, with citations. For example, every claim in the answer carries the file and section it came from.
ExWorked example
Answer across documents
Asked whether a material is compatible with a process under a loss limit, the agent finds the material, hops to the process it links to, then to the loss figure in a third source, and answers with all three references, where a single nearest-passage search would have stopped at the first.
→What it gives you
Questions that need several documents get one connected, grounded answer.
CIn depth Advanced
It uses GraphRAG traversal, hypothetical-document and hybrid retrieval, reranking, and a self-check gate that re-queries when evidence is thin.
Good retrieval is a pipeline over the same chunk-and-embedding index built at ingestion, not a single lookup, and it knows when it does not have enough to answer.
Hybrid retrieval
keywords + meaning
Combine exact-term and semantic search for better recall.
GraphRAG
traverse links
Follow relationships in a knowledge graph, not just similar text.
Rerank + compress
keep the best
Re-order candidates and keep only the strongest evidence.
Self-check gate
re-query if thin
If evidence is weak, search again before answering.
ExUnder the hood
The self-check gate, on one question
Before answering, the gate scores how well each sub-question is covered by the evidence that survived reranking. A sub-question with thin coverage does not get a guess; it gets a rewritten query and another pass, following references if the wording of the corpus differs from the wording of the ask.
coverage: q1 ok (3 strong passages), q2 thin (1 weak passage)
action: rewrite q2 "loss limit" as "maximum dissipation"
retry: hop from material page to its datasheet, limit found
gate: coverage ok on both, answer with citations
What this buys you: you get answers that are grounded when the evidence is there, and that go back for more instead of guessing when it is not. When this goes wrong you would see a confident answer citing a passage that does not actually support it; the loop catches it by re-reading each cited passage against the claim at the self-check gate and re-querying when the support is not there.
→Why it matters
Grounded, or it re-checks. If the evidence is thin, the agent goes back for more before answering.
→Try it
Watch a two-hop retrieval.
Question: does design D-3 survive its own operating temperature? No single document says.
Why flat search stops short
A flat nearest-passage search would have stopped at the spec sheet and shrugged; agentic retrieval follows the graph of references until the question is actually answerable.
That is the whole machine: message, memory, knowledge. Now watch it run at full scale.
