Skip to main content
Batoi AIF Docs

RAG and Governed Retrieval

Ingest, retrieve, cite, and generate without weakening workspace access controls.

Version Foundation release Early foundation work Reviewed Jul 21, 2026 Next review Sep 21, 2026

Owner: Batoi Engineering Reviewed by: Batoi AIF Maintainers Source revision: cd680e8

AIF is the public engineering framework. For the managed intelligence capability used across supported Platform and Flex workflows, see Batoi Intelligence.
Browse Batoi AIF Documentation RAG and Governed Retrieval

RAG and Governed Retrieval

AIF includes document chunking, governed ingestion, access-controlled retrieval, citations, and retrieval evidence for generation workflows.

Retrieval Boundary

Production retrieval should use AccessControlledVectorStoreInterface. Workspace and user or role ACL filters must be pushed into the adapter before scoring and topK selection. Filtering an already-ranked result set is not safe because unauthorized records could consume the result window or influence ranking.

Included Services

  • TextChunker produces document chunks.
  • RagIngestionService embeds and stores governed records.
  • GovernedRetrievalService applies the caller's workspace and ACL context.
  • GovernedRagService combines retrieval with generation and returns citations.

Citation Evidence

Generation results can include source UID, chunk UID, collection, score, and public citation metadata. The generation audit retains retrieval evidence without copying credentials or other classified values.

The in-memory vector store supports local development and contract tests. Production deployments supply an access-controlled adapter for their chosen vector infrastructure.

See Vector Store Adapters for adapter requirements.