Skip to main content

Crate synaptic_retrieval

Crate synaptic_retrieval 

Source

Structs§

BM25Retriever
BM25 (Best Matching 25) retriever using Okapi BM25 scoring.
ContextualCompressionRetriever
A retriever that retrieves documents from a base retriever and then compresses/filters them using a DocumentCompressor.
Document
A document with content and metadata, used throughout the retrieval pipeline.
EmbeddingsFilter
Filters documents based on cosine similarity between the query embedding and document content embeddings.
EnsembleRetriever
A retriever that combines results from multiple retrievers using Reciprocal Rank Fusion (RRF) with configurable weights.
InMemoryRetriever
A simple retriever that stores documents in memory and returns all of them for any query.
MetadataFieldInfo
Describes a metadata field for the LLM to understand available filters.
MultiQueryRetriever
A retriever that generates multiple query variants using a ChatModel, runs each through a base retriever, and deduplicates results by document id.
ParentDocumentRetriever
Splits parent documents into children, stores both, and returns parent documents when child chunks match a query.
SelfQueryRetriever
Uses a ChatModel to parse a user query into a structured query + metadata filters, then applies those filters to results from a base retriever.

Traits§

DocumentCompressor
Trait for compressing or filtering a set of documents based on a query.
Retriever
Trait for retrieving relevant documents given a query string.