Agent Systems: Knowledge Retrieval and Provenance

Figure

Knowledge retrieval and provenance

Figure: course architecture redraw. Query-time grounding is separated from index-time ingestion, with hybrid indexes, access metadata, reranking, provenance, freshness feedback, and a bounded context builder.

In one sentence. Ground claims in retrieved sources and carry provenance with them; a relevant-looking theorem with mismatched hypotheses is a retrieval failure disguised as a success.

Problem

Context is bounded, while a technical corpus is large. Internal model memory is not a reliable source for domain-specific or source-sensitive claims.

Intent and structure

corpus → index → retrieve → rerank/postprocess → grounded generation

The retrieval pattern includes more than a vector database. Lexical search, semantic indexing, metadata filters, hybrid retrieval, graph traversal, and node postprocessing solve different parts of the problem.

Mathematical retrieval

Retrieve definitions and notation before theorems; retrieve theorem statements with hypotheses; retrieve proof dependencies, examples, counterexamples, and source locations. A related theorem with mismatched hypotheses is a dangerous retrieval success, not a correct answer.

Provenance contract

Every important generated claim should point to a source record and preserve the retrieval query, location, and applicability judgment. Separate source text, interpretation, and new inference. Do not silently merge duplicate or stale statements.

Forces and failure modes

Retrieval improves grounding but can introduce irrelevant context, ranking bias, and citation drift. Evaluate recall and precision separately, cap context, rerank for applicability, and allow the system to say that no adequate source was found.

Real-world application

An internal policy assistant should retrieve the current policy version and return a claim with its source location, rather than answer from model memory. The retrieval boundary can enforce access control, freshness, and citation requirements before generation.

Reference basis

The RAG treatment follows Antonio Gulli, Agentic Design Patterns, Chapter 14, and Lakshmanan and Hapke, Generative AI Design Patterns, Chapter 3, including the RAG pattern. The foundational retrieval-plus-generation formulation is Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.