Grounding method
How corpus-grounded AI mentors work: retrieval, citations, and boundaries
A plain-language guide to isolated mentor corpora, retrieval before generation, passage citations, insufficiency, and cross-corpus safeguards.

Corpus grounding changes the order of operations. Instead of asking a general model to remember what a mentor might have said, the system first searches a governed collection of that mentor’s documents. Only the retrieved passages, the user’s question, and limited mission context are sent into the answer step.
The method does not make every answer correct. It makes the evidence boundary inspectable, allows unsupported questions to fail visibly, and gives developers something concrete to test.
From documents to an isolated mentor corpus
The process starts before any model call. Each work is registered at edition level with author, title, translator or editor where relevant, publication details, source URL, checksum, rights status, and permitted territories. Text is normalised and divided into passages small enough to retrieve while preserving locators and enough surrounding context to remain meaningful.
Every passage receives stable metadata: mentor ID, work, section, chunk index, source URL, rights basis, and citation. The resulting documents are imported into a mentor-specific search target. Imaginal AI’s architecture forbids a shared fallback engine for platform mentors. A Sun Tzu request and a Mary Parker Follett request therefore address different data stores and engines.
Retrieval before generation
When the user asks a question, the server requires a mentor ID and sends the query to that mentor’s serving configuration. The search engine returns a small ranked set of passages. The application verifies that each result carries the expected mentor ID and required source fields before it can become grounding context.
The generation request contains the named role, the user’s bounded mission context, and the retrieved passages. The instruction requires every substantive claim to cite supplied passage IDs and prohibits background knowledge or another mentor’s ideas. If the returned citation is absent from the retrieved set, the response is rejected rather than repaired invisibly.
What a real citation must do
A book title by itself is not enough. A useful citation connects the generated claim to a stable passage ID and exposes work, locator, source URL, and edition metadata. The interface should let the reader distinguish the original passage from the model’s interpretation and practical application. This is especially important when an old text is being applied to a contemporary business or psychological question.
Citations are also an engineering control. Automated tests can verify that a response cited only retrieved IDs, that the underlying documents belong to the requested mentor, and that a blocked source never entered an index. Citation integrity does not prove that the model interpreted the passage well, but it narrows the error surface and makes review possible.
Insufficiency and failure closed
A grounded system needs an ordinary way to say “this corpus does not answer that.” Low relevance, missing source fields, an unavailable index, or a question outside the mentor’s documented range should produce an insufficiency response. In production, the system should not silently substitute a general model answer or search another mentor’s corpus merely to keep the conversation moving.
This failure mode protects mentor distinctness. It also creates a better council dynamic: one seat may lack evidence while another has a directly relevant source. The Meta-Advisor can identify the gap without pretending that all mentors are universal. The user then decides whether to ask another seat, add a qualified source, or take the issue to a human expert.
The audits around the model call
Grounding quality depends on more than retrieval. A source registry checks that every mentor has one rights decision and that blocked sources declare no ingest provider. A corpus build verifies document IDs, checksums, required metadata, cross-mentor contamination, and environment rules. Production adds an owner-attestation gate for the exact edition and launch territories.
Runtime tests then check mentor-required APIs, isolated engine resolution, citation ID enforcement, no-production-fallback policy, and safe custom-corpus paths. Finally, the user interface must use honest language: a registered source map is not called an indexed corpus until import and search verification have succeeded. The trust contract is the chain, not a single RAG prompt.
Worked example · Illustrative scenario
Traceability lab: follow one claim from question to source
A user asks a strategy mentor whether a smaller force should avoid direct competition. The product returns a polished recommendation attributed to a historical thinker. The audit must determine whether that attribution came from the right corpus.
| Lens | Question | Evidence to inspect | Effect on the decision |
|---|---|---|---|
| Route | Which mentor and engine received the query? | A required mentor ID, a dedicated serving configuration, and no shared fallback target. | Stop the response if runtime routing cannot prove the intended corpus boundary. |
| Retrieve | Which passages were returned before generation? | Ranked passage IDs with mentor, work, edition, locator, rights, and source metadata. | Exclude results with the wrong mentor ID or incomplete provenance. |
| Generate | Which evidence was available to the model? | The user question, bounded mission context, retrieved passages, and explicit citation constraints. | Reject citations that do not correspond to the retrieved passage set. |
| Present | Can the reader distinguish source from application? | Quoted context within fair-use limits, a stable locator, edition details, and labelled interpretation. | Show insufficiency when the corpus does not support a modern operational claim. |
The attributed recommendation is publishable only when the log shows the correct isolated engine, the cited passage belongs to that mentor and registered edition, and the interface labels the present-day recommendation as an interpretation.
Sample grounded answers after every corpus or retrieval change. Track wrong-corpus results, unsupported citation IDs, weak-evidence refusals, and source-opening behaviour rather than evaluating quality from answer style alone.
Free practical field kit · No signup required
Corpus-grounding inspection checklist
Use this technical checklist to evaluate whether a named AI mentor is genuinely retrieval-grounded. Ask the product owner to demonstrate each control against a live query and an unsupported query.
- 01
Source registry
Identify the exact files, editions, rights state, checksums, locators, and mentor ID admitted to the corpus.
- 02
Retrieval boundary
Confirm that the request addresses one mentor-specific data store and cannot fall back to a shared corpus.
- 03
Retrieved evidence
Inspect the passage IDs, source metadata, relevance, and query-to-passage relationship before generation.
- 04
Citation integrity
Verify that every cited ID belongs to the retrieved set and resolves to the visible source passage.
- 05
Failure-closed test
Ask an out-of-corpus question and record whether retrieval, generation, and the interface expose insufficiency honestly.
Copy these prompts into your working document, or use your browser’s Print command to save this field kit as a PDF. The worksheet is available without an email gate.
Inspect mentor source maps →FAQ
Frequently asked questions
What is a corpus in an AI mentor?
It is the governed collection of documents and passage metadata that the mentor retrieval system is allowed to search.
Does retrieval-augmented generation prevent hallucinations?
No. It reduces and exposes some failure modes, but interpretation can still be wrong. Citation validation, insufficiency, testing, and human judgment remain necessary.
Why use a separate index for every mentor?
Separate targets prevent accidental cross-mentor retrieval, make rights and releases auditable, and preserve meaningful differences between council seats.
Sources and method
Trace the guide
This guide was developed with AI-assisted research and editorial tooling, then checked against Imaginal AI’s registered source maps, internal-link graph, and content-quality tests. Read the editorial standards, AI-assistance disclosure, and correction policy.
- Google Cloud Agent Search quotas and limitsCurrent allocation and rate limits for isolated search data stores and engines.
- Imaginal AI source rights and provenanceThe gate before a document becomes eligible for corpus build.
- Project Gutenberg copyright guidanceExplains the United States scope of Project Gutenberg copyright determinations.