
AI / GenAI2026In build· Architecture specification, v1.0
Grounded Retrieval Engine
Citation-first retrieval for an AI-native LMS
A retrieval service where every answer resolves to an exact document, page and paragraph, and tenant isolation is a CI test rather than a paragraph in a design doc.
01 Architecture
- Retrieval as a service: the engine is the sole owner of the indices. Producers upload, consumers call
retrieve(), and nothing else touches the stores. - Split by cost profile: ingestion is async and heavy, retrieval is sync and fast, so a large upload can never slow a query.
- Four stores behind one interface: a canonical DB, a vector index, a sparse BM25 index and blob storage, with hybrid search plus reranking across them.
- A citation and provenance resolver walks chunk to blocks to page, paragraph and bounding box, so every claim points at the exact place it came from.
- Tenant isolation is enforced at the index layer off a signed JWT claim, not in application code, with an adversarial CI test asserting one school's queries never return another's chunks.
- Object storage sits beside the engine: uploads land there first and emit an ingest event.
02 What is in it
- Ingest covers books, class notes, scanned handwriting, slides, images and lecture audio and video.
- Six AI consumers share one retrieval path: assignment generation, test generation, answer evaluation, flash cards, video generation and the learner model.
- Staged across four phases with a prior-art review and an implementation roadmap. Phase 0 is born-digital PDFs, a single tenant and dense-only pgvector.
- The security claim is a test, not a sentence: the isolation guarantee fails CI if it regresses.
- Knowledge tracing and an explicit latency budget are part of the spec rather than an afterthought.
Numbers
- 4
- index and store types
- 6
- AI consumers served
- 4
- delivery phases
Stack
RetrievalpgvectorBM25RerankingMultimodalProvenanceMulti-tenancy
Availability
In buildA v1.0 architecture document rather than a running system. Nothing in it is claimed to work before the phase that builds it.