contextual-rag · service and data flow

Ingestion-time chunk enrichment followed by hybrid retrieval, optional reranking, and generation

contextual-rag service and data flowEach chunk is enriched with a model-generated document context before embedding, then queried through the contextual collection. ATLAS COMPOSE STACK · RAG TRACKCONTEXTUAL INGESTION · ENRICH ONCE PER CHUNKQUERY PATH · REUSE ENRICHED INDEX Corpus documentssource files Atlas ingestionparse · chunk · metadata Weaviate · RagBasecompleted plain chunks Showcase post-stepread chunks + source docs contextual_blurbdocument window + chunk Enrich + embedprefix + chunk → nomic RagContextualenriched text + vectors CallerOpen WebUI / API LiteLLMmodel: contextual-rag Contextual pluginretrieve · prompt · metrics Query embeddingnomic-embed-text RagContextualhybrid search TEI rerankeroptional cross-encoder light_genenriched evidence + question OpenAI responseanswer · sources · metrics 1request2dispatch 3embed4vector 5candidates6top context7answer MESSAGE CONTRACT AND EXECUTION PHASES 0A · ENRICHRagBase chunk + source window → contextual_blurbShowcase post-step owns the derived collection.Cost is paid after Atlas ingestion, not per query. 0B · INDEXcontext prefix + chunk → embeddingRagContextual is distinct from RagBase.Re-ingestion is required after prompt/model changes. 1–6 · RETRIEVE + RERANKquestion vector → contextual hybrid candidatesOptional TEI reranking bounds top_n context.Retrieved text includes the generated prefix. 7 · GENERATE + RETURNlight_gen consumes enriched evidence.Response preserves source and dataset metadata.No graph is created or traversed.