--- id: ai-rag-corpus area: ai level: 3 title: "Artefact — Retrieval corpus and query graph" claim: "Retrieval is filtered by metadata before it searches — a tagged corpus · a four-node LangGraph query graph · and a deliberate replacement of ChromaDB with Qdrant." confidence: running period: "2020–" tech: [Qdrant, LangGraph, Prefect, n8n, ChromaDB] metrics: [{label: "retrieval stores used over time", value: 2}] artefacts: [] public: true last_verified: 2026-10-26 tags: [ai, retrieval, rag, artefact] --- Ingest and index are live; the diagram below shows both sides, and the query path is labelled as the design it is until Phase 5 ships. ## What the artefact is The ingest and query path: documents are chunked and tagged with metadata at ingest, stored in Qdrant, and filtered on that metadata before a similarity search runs. The LangGraph graph has four nodes; the fourth decides whether the answer can be given from what was retrieved. ## What it proves Retrieval designed around payload filtering and a hard stop, plus the reasoning for moving off ChromaDB — heavier footprint and weaker filtering — recorded as a decision rather than a migration. ## The pipeline ![Two lanes. Ingest reads the content tree and estate notes, excludes secrets, chunks and tags every block, then embeds through the model gateway and upserts into the resume_corpus and resume_graph collections in Qdrant. The query lane runs classify, route, retrieve, compose and verify, and only composes from retrieved context.](../../assets/diagrams/rag-pipeline.svg) The separating line is the design decision: metadata is written at ingest, so the query can filter by area, level and source before it pays for a similarity search. The fourth node is the hard stop — an answer that cannot be supported by what was retrieved is refused rather than improvised. ## When it is delivered Ingest is delivered and measured (this site's own corpus, Phase 4). The query path is delivered in Phase 5; the streaming console is the visitor-facing half of it.