Expand description
Composable candidate generation and optional late-interaction reranking.
Query -> CandidateGenerator -> [Reranker] -> deterministic top-kA Query is raw text plus named Features, each stamped with the
Representation that produced it. Stages name documents by
DocumentKey, the corpus and ID the system of record gives them, and
each reads its own indexes, which writers anywhere move independently:
every stage result says how fresh it is, and SearchPipeline ranks only
the documents every stage holds and reports the oldest commit it read.
MaxSimReranker scores MultiVectorSources, one per corpus, such as
a VectorStore, which reads what a VectorStoreWriter or any other
writer of its format commits.
Structs§
- Candidate
- One gathered document;
provenancenames what produced it. - Document
Key - A document as every stage names it: the corpus it belongs to and the ID the system of record gives it. Engines map keys to their own internal positions privately, so they never have to agree on one.
- Feature
- One query representation stamped with the encoder that produced it.
- Gathered
- What a gatherer found, and how fresh the index it searched was: every
write committed to that index before
as_ofis reflected in it. - MaxSim
Reranker - MaxSim between the query’s token matrix and each candidate’s document, read from the source of the candidate’s corpus.
- Packed
Documents - Token vectors of documents: a row-major float32
[sum(lengths), dimension]matrix holding each document’s tokens contiguously, inlengthsorder. - Query
- Raw text plus the named features stages may consume.
- Ranked
Document - Representation
- Identity of the encoder that produced a vector feature.
- Resource
Budget - Bounded execution is caller policy; each reranker maps it onto its own representation.
- Scored
scores[i]scores candidatei, or isNonewhen the reranker’s index does not hold that document: not written to it yet, or already deleted. Every write committed to that index beforeas_ofis reflected in it.- Search
Diagnostics - Search
Pipeline - A gatherer, optionally followed by a reranker.
- Search
Request - Per-search parameters.
- Search
Result - Search
Timings - Store
View - One commit of a
VectorStore. It stays readable after later commits. - Subset
- The documents a search is restricted to, by corpus. A corpus it does not name contributes no documents; an ID an index does not hold is ignored. Cloning shares each corpus’s restriction rather than copying its IDs.
- Token
Matrix - A row-major float32
[tokens, dimension]matrix. - Vector
Store - Reads a vector store, following what its writer commits.
- Vector
Store Writer - Stages appends, deletes, and compactions of one store, and publishes them
together on
commit.
Enums§
- Encoding
- Error
- Ranking
Error - Restriction
- Which documents of one corpus a search may return.
Constants§
- DEFAULT_
FEATURE - The feature name a
MaxSimRerankerreads unless told otherwise. - MANIFEST_
FILE - STORE_
FORMAT - The
formatevery manifest this version reads declares.
Traits§
- Candidate
Generator - First stage: selects candidate documents.
- Feature
Value - Whatever an encoder produced for the query text: a token matrix, a dense vector, a sparse weighting. Stages downcast to the type they consume.
- Multi
Vector Source - Where a MaxSim reranker reads one corpus’s document vectors from.
- Reranker
- Second stage: one qualified score, or
None, for every candidate it is given, in candidate order, read from one consistent state of each index it scores. A candidate from a corpus the reranker cannot score at all is an error, notNone. Gather scores never influence a reranked result. - Vector
View - One consistent state of a
MultiVectorSource: the vectors a document ID names never change for the life of the view.
Functions§
- maxsim_
scores - MaxSim of one query against packed documents.
Type Aliases§
- Requirements
- Feature name to the representation a stage was built for.
- Result