Skip to main content

beam_knowledge

beam_knowledge ingests text into a vector store and retrieves the closest chunks for a query.

beam_knowledge = { path = "../riverbeam/crates/beam_knowledge", features = ["postgres"] }
FeatureEffect
postgresPgVectorStore, ensure_knowledge_schema
polars-ingestIngest statistics computed with Polars

Types​

ItemRole
EmbedderTrait: name, dimensions, embed, embed_query
HashEmbedder, MockEmbedderHermetic embedders for development and tests
OpenAiCompatEmbedder::openai(..), ::nvidia(..)HTTP embedders (POST {base_url}/embeddings)
VectorStoreTrait: upsert, query, delete, replace_document_chunks
InMemoryVectorStore, PgVectorStoreCosine similarity in memory or with pgvector
Chunker, SimpleChunkerParagraph packing, 800 characters by default
Retriever, DenseRetrieverEmbed the query and search the store
KnowledgeBuilderChunk, embed and upsert; with_chunker
KnowledgeManageringest, delete_document, retrieve
RagContextStrategyRender hits as a context block
build_knowledge, build_knowledge_from_env, KnowledgeBuildRequest, EmbedderKind, StoreKindThe factory
KnowledgeScope, RetrievalFilter, Hit, Chunk, VectorRecord, NamespaceData types
IngestionResult, IngestStats, ingest_statsIngest outcome and statistics

The environment variables, the fallback rules and the current limitations are in Knowledge.