Skip to main content

Module knowledge

Module knowledge 

Source

Structs§

EmbeddingFingerprint
Identity of an embedding space: vectors are comparable only when all three fields match. Recorded on a knowledge base at ingest and compared with the active query backend before every retrieval.
EmbeddingSpaceMismatch
A knowledge base was indexed in a different embedding space than the one the active backend produces. Searching it would compare incompatible vectors and silently return nothing, so callers must surface this instead.
KbConfig
Configuration for a knowledge base’s processing pipeline.
KnowledgeBase
A named knowledge base container for RAG document scoping. Each KB has its own embedding model, chunking strategy, and document collection.
KnowledgeChunk
A chunk of knowledge from a processed document.
KnowledgeDocument
Tracks a source document ingested into a knowledge base.
KnowledgeMatch
A search result matching a knowledge chunk.
KnowledgeRegeneration
The durable cohort rebuilt from retained document sources.

Enums§

DocumentStatus
Status of document processing.
KnowledgeRegenerationState

Constants§

DEFAULT_RETRIEVAL_MIN_SCORE
Minimum similarity a chunk needs to be retrieved into an agent’s prompt when a knowledge base sets no retrieval_min_score.
DEFAULT_RETRIEVAL_TOP_K
Chunks retrieved per agent turn when no knowledge base sets retrieval_top_k.
MAX_RETRIEVAL_TOP_K
Upper bound the API accepts for retrieval_top_k.

Functions§

retrieval_params
How many chunks to retrieve and how similar they must be, for an agent that searches configs together. Each KB falls back to the defaults for what it leaves unset. Across KBs the most permissive setting wins (lowest min_score, highest top_k), so a KB tuned for a lower-scoring embedding space is not filtered out by another KB’s stricter setting.