Guiding the platform toward an enterprise-grade RAG stack
All upgrades align with the layered architecture and bounded contexts described on the Architecture page.
Five pillars unlock reproducibility, experimentation, memory, human oversight, and evaluation.
Outcome: a multi-tenant RAG surface that respects domain boundaries while keeping agents extensible.
KbSourceVersion
snapshots; KbSource
retains a pointer to the active version.source_version_id
for full lineage.IdxVectorCollection
and IdxSparseCollection
track strategy, provider, and version scope.DocPropertySchema
.Outcome: reproducible rebuilds, rollback capabilities, and side-by-side source comparisons.
ParseRun
logs parsers, token counts, and errors per source version.ChunkRun
stores strategy, window size, and overlap decisions.EmbeddingRun
captures model, latency, cost, and chunk outcomes.SparseRun
records BM25/SPLADE index inserts by variant.UpsertRun
links batches pushed into FAISS, pgvector, or Elastic collections.RetrievalRun
represents each query with filters, latency, and status.ComponentRecallRun
aggregates dense and sparse scores for diagnostics.FusionResultRun
stores the hybrid ordering with fusion parameters.Outcome: experiment toggles backed by data, quick root-cause analysis, and per-tenant analytics.
MemoryStream
aggregates per tenant/user to organize episodic, semantic, and profile memories.MemoryFact
(structured data) and MemoryEmbedding
(vectorized recall).MemoryCondenseRun
jobs that distill recent conversations into durable facts with decay policies.MemorySnapshot
versions that align with KbSourceVersion
to keep knowledge and memory in sync.Outcome: richer personalization, fewer repeated questions, and auditable cross-session recall.
RetrievalRun
records to enrich evaluation datasets.Outcome: trustable workflows where humans catch high-risk answers, reinforce model learning, and satisfy regulatory requirements.
Entity/Table | Description |
---|---|
KbSourceVersion | Immutable snapshot of a knowledge source with JSONB metadata, retention flags, and audit columns. |
IdxVectorCollection | Represents a dense index configuration (model, dimension, distance metric) scoped per tenant. |
IdxSparseCollection | Parallel sparse index strategy (BM25, SPLADE, Elastic) with connection details and parameters. |
ParseRun / ChunkRun / EmbeddingRun / SparseRun / UpsertRun | Telemetry aggregates for each stage of the indexing pipeline with status, metrics, and ownership. |
RetrievalRun | Captures a retrieval attempt end-to-end, linking query context to the active source version and collections. |
ComponentRecallRun | Dense and sparse retrieval scores before fusion, enabling diagnostics and AB comparison. |
FusionResultRun | Final ranked results with fusion weights and attribution for debugging hybrid logic. |
EvaluationRun | Stores evaluation dataset references, metrics, prompts, and decision outcomes. |
MemoryStream / MemoryFact / MemoryEmbedding / MemorySnapshot | Tiered memory aggregates that capture episodic, semantic, and vectorized context with snapshot history. |
KbChunk
, IdxVectorCollectionItem
, IdxSparseCollectionItem
gain source_version_id
and collection_id
.KbSource
retains active_version_id
plus retention settings per tenant.RetrievalConversation
links to MemoryStream
for context injection and auditing.Add KbSourceVersion
aggregate, migration scripts, retention policies, and UI support to select active versions.
Deliverables: schema migrations, repository/service updates, admin tools for manual version pinning.
Emit structured events from indexing and retrieval supervisors into the new run tables with correlation ids.
Deliverables: background job telemetry, AB experiment toggles, dashboards for run statistics.
Integrate evaluation datasets, orchestrate EvaluationRun
, and surface comparison reports in the admin UI.
Deliverables: regression alerts, exportable reports, automated checks in deployment pipelines.
Design memory schemas, condensation jobs, privacy controls, and retrieval hooks across agents.
Deliverables: memory management UI, retention/expiration policies, automated memory AB validation.