Skip to content
中文

Retrieval & evidence ​

Kit · Optional business libraries · Back to layer index

SymbolKindPurpose
defineEvidenceChecklistfunctionCompile a reusable completion checklist over actual observations. A requirement is satisfied when at least one observation satisfies the provider registered for its kind; isComplete requires every requirement to be satisfied, and missing returns those that are not. Hosts define evidence semantics.
defineEvidenceProjectionfunctionCompile a projection that keeps only the sources a caller asked to see. No selection retains the complete evidence; a selection narrows registered source-bearing results. Observations whose tool has no provider pass through untouched, so the projection can only ever remove sources it knows how to name.
defineRetrievalfunctionCompile a retrieval runner from its declared ports and effects. Rejected queries stay in the caller's seen set, so a retry is reported as a duplicate instead of silently repeating the adapter call; only successful results increment the query count.
Evidenceconstant
EvidenceProjectionDefinitioninterfaceProjection configuration, keyed by the tool that produced an observation.
EvidenceProjectionProviderinterfaceDescribes which sources an observation can cite, and how to narrow it to cited ones.
EvidenceProviderinterfaceAdjudicates one evidence kind against real observations.
EvidenceRequirementinterfaceRequirements describe evidence that must already exist, never a model's assertion of success.
FusedRankinterfaceOne fused result with the per-source ranks that produced its score.
RankedListinterfaceOne retriever's ordered result, optionally weighted.
reciprocalRankFusionfunctionFuse ranked lists with one-based reciprocal rank fusion. Raw retriever scores are intentionally not mixed. Ties break on id, so the output is deterministic for a given input.
Retrievalconstant
RetrievalDefinitiontypeRetrieval ports specialized to an App operation context.
RetrievalEffectinterfaceOne effect applied after a successful query, in declaration order.
RetrievalPortsinterfaceHost ports and policy for one retrieval kind.
RetrievalReasontypeLazy rejection wording: a fixed message, a pre-built error, or a factory bound to the query.
RetrievalReceiptinterfaceFacts of one accepted query.
RetrievalResultinterfaceAdapter output for one accepted query; the Kit renames each source before returning it.
RetrievalRunnerinterfaceCompiled retrieval runner.
RetrievalSourceinterfaceRequest-local citation reference; the App may separately carry its content entity id.
RetrievalStateinterfaceRequest-owned state. Clearing current evidence must not replenish spent budgets or seen keys.
TextSearchclassOptional App-side full-text index. No storage, identity, model calls or Core dependencies. Only declared fields are indexed and only storedFields come back with a hit, so a document never leaks extra properties into search results.
TextSearchHitinterfaceOne ranked match; terms are post-tokenization and only stored fields are returned.
TextSearchOptionsinterfaceApp supplies fields, tokenizer and its own schema/tokenizer revision.
TextSearchQueryinterfaceSearch input: a hard result limit and an App-owned filter, both required on every query.
TextSearchSnapshotinterfaceSerialized index; the revision pair proves the snapshot matches the current configuration.
VectorSearchclassExact cosine search for a bounded embedded corpus. Identity and metadata are App-owned. Vectors arrive as plain arrays and are stored normalized in Float32Array form, so query time only needs a dot product per candidate.
VectorSearchHitinterfaceOne search hit; the document is a cloned snapshot, not the indexed instance.
VectorSearchQueryinterfaceSearch options excluding the query vector, which search takes alongside them.
VectorSearchSpaceinterfaceEmbedding space identity and width; vectors from another space must never be mixed in.

API reference, usage examples and developer guides.