Rag API¶
Generated from the typed public surface.
tesserix_adk.rag.BatchVectors¶
Stability: alpha
One provider call's answer.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.BatchedEmbedder¶
Stability: alpha
An Embedder over a VectorSource: batching, caching, retries and refusals.
class BatchedEmbedder(object) {embed_documents(self, texts: 'Sequence[str]') -> 'EmbeddedBatch'; embed_query(self, text: 'str') -> 'Vector'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Branch¶
Stability: alpha
Which way a passage was found.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.BranchScore¶
Stability: alpha
One branch's opinion of one passage.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Chunk¶
Stability: alpha
One piece of a document, and where in it the piece was.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Chunker¶
Stability: alpha · Kind: Protocol
How one collection's documents are divided.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ChunkerFactory¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ChunkerRegistry¶
Stability: alpha
Which strategy each collection is chunked by, resolved by name.
class ChunkerRegistry(object) {chunker_for(self, collection: 'str') -> 'Chunker'; register(self, strategy: 'str', build: 'ChunkerFactory') -> 'None'; spec_for(self, collection: 'str') -> 'ChunkingSpec'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ChunkingSpec¶
Stability: alpha
One collection's chunking settings, as a deployment states them.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Citation¶
Stability: alpha
One passage an answer may lean on, pinned hard enough to resolve later.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.CitationResolver¶
Stability: alpha · Kind: Protocol
Turns a citation back into the text it was made from.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.CitedAnswer¶
Stability: alpha
An answer as claims and citations, rather than prose with footnote-shaped strings.
class CitedAnswer(AdkModel) {provenance(self) -> 'tuple[str, ...]'; sources(self, claim: 'Claim') -> 'tuple[Citation, ...]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Claim¶
Stability: alpha
One statement an answer makes, and what it rests on.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.CodeAware¶
Stability: alpha
Split source at top-level definitions, then at blank lines, then at lines.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.CrossEncoder¶
Stability: alpha · Kind: Protocol
A local cross-encoder: query and passage in, one relevance score out.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.CrossEncoderReranker¶
Stability: alpha
A local cross-encoder, run off the event loop so it cannot stall the runtime.
class CrossEncoderReranker(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.DEGRADED¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Document¶
Stability: alpha
Text to be indexed, with the identity its chunks are attributed to.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.EmbeddedBatch¶
Stability: alpha
Vectors for the texts that were asked for, and what producing them cost.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Embedder¶
Stability: alpha · Kind: Protocol
The corpus-facing half: whatever texts there are, however many calls that takes.
class Embedder(Protocol) {embed_documents(self, texts: 'Sequence[str]') -> 'EmbeddedBatch'; embed_query(self, text: 'str') -> 'Vector'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.EmbeddingCache¶
Stability: alpha · Kind: Protocol
Somewhere vectors survive between ingests, keyed by embedding_key.
class EmbeddingCache(Protocol) {get(self, keys: 'Sequence[str]') -> 'Mapping[str, Vector]'; put(self, vectors: 'Mapping[str, Vector]') -> 'None'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.EmbeddingModel¶
Stability: alpha
Which model produced a vector, in enough detail to know when it did not.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.EmbeddingStats¶
Stability: alpha
What an embedding call did, in the terms its bill is argued in.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.FixedTokens¶
Stability: alpha
Fill each chunk to the token limit on word boundaries, repeating an overlap.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Fusion¶
Stability: alpha · Kind: Protocol
How two branches' rankings become one.
class Fusion(Protocol) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Hit¶
Stability: alpha
One retrieved passage, and the case for it.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.HybridRetriever¶
Stability: alpha
Both branches at once, fused, and honest about the one that did not answer.
class HybridRetriever(object) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.IndexQuery¶
Stability: alpha
What a store is asked, with the tenant already in it.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.IndexRetriever¶
Stability: alpha
One branch of retrieval: embed where the branch is semantic, then ask the store.
class IndexRetriever(object) {branch_hits(self, query: 'str', *, asked: 'Admissible') -> 'Sequence[Hit]'; retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.InjectionSignal¶
Stability: alpha
One thing screening recognised, and where.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.MemoryEmbeddingCache¶
Stability: alpha
A bounded in-process cache, for a single ingest or a test.
class MemoryEmbeddingCache(object) {get(self, keys: 'Sequence[str]') -> 'Mapping[str, Vector]'; put(self, vectors: 'Mapping[str, Vector]') -> 'None'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ModelReranker¶
Stability: alpha
A model asked to score the candidates, over any OpenAI-compatible endpoint.
class ModelReranker(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.NoReranking¶
Stability: alpha
The default: keeps the fused order, costs nothing, and says so in the result.
class NoReranking(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Overflow¶
Stability: alpha
What to do with a run of text that cannot be divided small enough.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Quarantined¶
Stability: alpha
A retrieval result, held where it cannot become instruction.
class Quarantined(AdkModel) {attributes(self) -> 'dict[str, str]'; for_layer(self, layer: 'PromptLayer') -> 'tuple[str, ...]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ReciprocalRankFusion¶
Stability: alpha
Fuses on rank alone: 1 / (k0 + rank), summed across the branches that found it.
class ReciprocalRankFusion(object) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.RerankScore¶
Stability: alpha
One candidate's rerank score.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Reranker¶
Stability: alpha · Kind: Protocol
Something that scores candidates against a query. It never returns passages.
class Reranker(Protocol) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Reranking¶
Stability: alpha
What one rerank call produced, and what it consumed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.RerankingRetriever¶
Stability: alpha
A retriever with a reranking stage in front of the caller, and a bill for it.
class RerankingRetriever(object) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: CapabilityError, ConfigurationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.ResolvedCitation¶
Stability: alpha · Kind: Protocol
What a citation resolved to.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.RetrievalResult¶
Stability: alpha
What one retrieval found, and whether it is the whole of what there was.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.RetrievalScope¶
Stability: alpha
Where to look. The tenant is not here: it comes from the context, not the caller.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Retriever¶
Stability: alpha · Kind: Protocol
The one shape an agent retrieves through, whatever is behind it.
class Retriever(Protocol) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.SearchIndex¶
Stability: alpha · Kind: Protocol
A store that can answer one branch's query, with the filters inside the query.
class SearchIndex(Protocol) {search(self, query: 'IndexQuery') -> 'Sequence[Hit]'; supports(self, branch: 'Branch') -> 'bool'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.SentenceWindow¶
Stability: alpha
Emit overlapping windows of whole sentences.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.SignalKind¶
Stability: alpha
What a screener recognised. Named, because "suspicious" is not actionable.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.SourceLocator¶
Stability: alpha
Where to go and look, for a reader who wants the original.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Span¶
Stability: alpha
Where in a document a passage was, counted in code points.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Structural¶
Stability: alpha
Split on the document's own boundaries, falling to finer ones only as needed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.TokenCount¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.UntrustedText¶
Stability: alpha
Retrieved content, in the only form the rest of the kit will accept it in.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.Vector¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.VectorSource¶
Stability: alpha · Kind: Protocol
The vendor-facing half: one call, one batch, no batching or caching of its own.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.WeightedSum¶
Stability: alpha
Fuses on the branch scores themselves, weighted.
class WeightedSum(object) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.check_grounding¶
Stability: alpha
Refuse an answer whose citations do not come from this run's retrieval.
Typed errors: TenantCrossingError, UncitedClaimError, UngroundedCitationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunk_id¶
Stability: alpha
Return the identity of text as a chunk of document_id.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.Chunk¶
Stability: alpha
One piece of a document, and where in it the piece was.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.Chunker¶
Stability: alpha · Kind: Protocol
How one collection's documents are divided.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.ChunkerFactory¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.ChunkerRegistry¶
Stability: alpha
Which strategy each collection is chunked by, resolved by name.
class ChunkerRegistry(object) {chunker_for(self, collection: 'str') -> 'Chunker'; register(self, strategy: 'str', build: 'ChunkerFactory') -> 'None'; spec_for(self, collection: 'str') -> 'ChunkingSpec'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.ChunkingSpec¶
Stability: alpha
One collection's chunking settings, as a deployment states them.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.CodeAware¶
Stability: alpha
Split source at top-level definitions, then at blank lines, then at lines.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.Document¶
Stability: alpha
Text to be indexed, with the identity its chunks are attributed to.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.FixedTokens¶
Stability: alpha
Fill each chunk to the token limit on word boundaries, repeating an overlap.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.Overflow¶
Stability: alpha
What to do with a run of text that cannot be divided small enough.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.SentenceWindow¶
Stability: alpha
Emit overlapping windows of whole sentences.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.Structural¶
Stability: alpha
Split on the document's own boundaries, falling to finer ones only as needed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.TokenCount¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.chunk_id¶
Stability: alpha
Return the identity of text as a chunk of document_id.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.chunking.tokens_via¶
Stability: alpha
Return a counter that measures text with provider's own tokeniser.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.Citation¶
Stability: alpha
One passage an answer may lean on, pinned hard enough to resolve later.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.CitationResolver¶
Stability: alpha · Kind: Protocol
Turns a citation back into the text it was made from.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.CitedAnswer¶
Stability: alpha
An answer as claims and citations, rather than prose with footnote-shaped strings.
class CitedAnswer(AdkModel) {provenance(self) -> 'tuple[str, ...]'; sources(self, claim: 'Claim') -> 'tuple[Citation, ...]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.Claim¶
Stability: alpha
One statement an answer makes, and what it rests on.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.ResolvedCitation¶
Stability: alpha · Kind: Protocol
What a citation resolved to.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.SourceLocator¶
Stability: alpha
Where to go and look, for a reader who wants the original.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.Span¶
Stability: alpha
Where in a document a passage was, counted in code points.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.check_grounding¶
Stability: alpha
Refuse an answer whose citations do not come from this run's retrieval.
Typed errors: TenantCrossingError, UncitedClaimError, UngroundedCitationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.citation_attributes¶
Stability: alpha
Span attributes describing a citation set without carrying any of its text.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.cite¶
Stability: alpha
Build a citation per hit, from what the store recorded about each chunk.
def cite(result: 'RetrievalResult', *, retrieved_at: 'datetime | None' = None) -> 'tuple[Citation, ...]'
Typed errors: ConfigurationError, MissingTenantContextError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation.excerpt¶
Stability: alpha
The exact characters a citation points at, in the version it was taken from.
Typed errors: UngroundedCitationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.citation_attributes¶
Stability: alpha
Span attributes describing a citation set without carrying any of its text.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.cite¶
Stability: alpha
Build a citation per hit, from what the store recorded about each chunk.
def cite(result: 'RetrievalResult', *, retrieved_at: 'datetime | None' = None) -> 'tuple[Citation, ...]'
Typed errors: ConfigurationError, MissingTenantContextError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.BatchVectors¶
Stability: alpha
One provider call's answer.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.BatchedEmbedder¶
Stability: alpha
An Embedder over a VectorSource: batching, caching, retries and refusals.
class BatchedEmbedder(object) {embed_documents(self, texts: 'Sequence[str]') -> 'EmbeddedBatch'; embed_query(self, text: 'str') -> 'Vector'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.EmbeddedBatch¶
Stability: alpha
Vectors for the texts that were asked for, and what producing them cost.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.Embedder¶
Stability: alpha · Kind: Protocol
The corpus-facing half: whatever texts there are, however many calls that takes.
class Embedder(Protocol) {embed_documents(self, texts: 'Sequence[str]') -> 'EmbeddedBatch'; embed_query(self, text: 'str') -> 'Vector'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.EmbeddingCache¶
Stability: alpha · Kind: Protocol
Somewhere vectors survive between ingests, keyed by embedding_key.
class EmbeddingCache(Protocol) {get(self, keys: 'Sequence[str]') -> 'Mapping[str, Vector]'; put(self, vectors: 'Mapping[str, Vector]') -> 'None'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.EmbeddingModel¶
Stability: alpha
Which model produced a vector, in enough detail to know when it did not.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.EmbeddingStats¶
Stability: alpha
What an embedding call did, in the terms its bill is argued in.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.MemoryEmbeddingCache¶
Stability: alpha
A bounded in-process cache, for a single ingest or a test.
class MemoryEmbeddingCache(object) {get(self, keys: 'Sequence[str]') -> 'Mapping[str, Vector]'; put(self, vectors: 'Mapping[str, Vector]') -> 'None'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.Vector¶
Stability: alpha
Type alias.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.VectorSource¶
Stability: alpha · Kind: Protocol
The vendor-facing half: one call, one batch, no batching or caching of its own.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.embedding_key¶
Stability: alpha
The cache key for text under model, scoped to tenant.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding.normalised¶
Stability: alpha
The form of text that is embedded and keyed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.embedding_key¶
Stability: alpha
The cache key for text under model, scoped to tenant.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.excerpt¶
Stability: alpha
The exact characters a citation points at, in the version it was taken from.
Typed errors: UngroundedCitationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.normalised¶
Stability: alpha
The form of text that is embedded and keyed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine¶
Stability: alpha
Wrap a retrieval result as data, screening each passage and the joins between them.
def quarantine(result: 'RetrievalResult', *, instructions: 'str' = '', source: 'str' = 'retrieved') -> 'Quarantined'
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.InjectionSignal¶
Stability: alpha
One thing screening recognised, and where.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.Quarantined¶
Stability: alpha
A retrieval result, held where it cannot become instruction.
class Quarantined(AdkModel) {attributes(self) -> 'dict[str, str]'; for_layer(self, layer: 'PromptLayer') -> 'tuple[str, ...]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.SignalKind¶
Stability: alpha
What a screener recognised. Named, because "suspicious" is not actionable.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.UntrustedText¶
Stability: alpha
Retrieved content, in the only form the rest of the kit will accept it in.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.quarantine¶
Stability: alpha
Wrap a retrieval result as data, screening each passage and the joins between them.
def quarantine(result: 'RetrievalResult', *, instructions: 'str' = '', source: 'str' = 'retrieved') -> 'Quarantined'
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.quarantine.screen¶
Stability: alpha
Recognise instruction-shaped and tool-call-shaped text in a passage.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.CrossEncoder¶
Stability: alpha · Kind: Protocol
A local cross-encoder: query and passage in, one relevance score out.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.CrossEncoderReranker¶
Stability: alpha
A local cross-encoder, run off the event loop so it cannot stall the runtime.
class CrossEncoderReranker(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.DEGRADED¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.ModelReranker¶
Stability: alpha
A model asked to score the candidates, over any OpenAI-compatible endpoint.
class ModelReranker(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.NoReranking¶
Stability: alpha
The default: keeps the fused order, costs nothing, and says so in the result.
class NoReranking(object) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.RerankScore¶
Stability: alpha
One candidate's rerank score.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.Reranker¶
Stability: alpha · Kind: Protocol
Something that scores candidates against a query. It never returns passages.
class Reranker(Protocol) {rerank(self, query: 'str', hits: 'Sequence[Hit]', *, top_n: 'int') -> 'Reranking'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.Reranking¶
Stability: alpha
What one rerank call produced, and what it consumed.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.reranking.RerankingRetriever¶
Stability: alpha
A retriever with a reranking stage in front of the caller, and a bill for it.
class RerankingRetriever(object) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: CapabilityError, ConfigurationError
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.Branch¶
Stability: alpha
Which way a passage was found.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.BranchScore¶
Stability: alpha
One branch's opinion of one passage.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.Fusion¶
Stability: alpha · Kind: Protocol
How two branches' rankings become one.
class Fusion(Protocol) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.Hit¶
Stability: alpha
One retrieved passage, and the case for it.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.HybridRetriever¶
Stability: alpha
Both branches at once, fused, and honest about the one that did not answer.
class HybridRetriever(object) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.IndexQuery¶
Stability: alpha
What a store is asked, with the tenant already in it.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.IndexRetriever¶
Stability: alpha
One branch of retrieval: embed where the branch is semantic, then ask the store.
class IndexRetriever(object) {branch_hits(self, query: 'str', *, asked: 'Admissible') -> 'Sequence[Hit]'; retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.ReciprocalRankFusion¶
Stability: alpha
Fuses on rank alone: 1 / (k0 + rank), summed across the branches that found it.
class ReciprocalRankFusion(object) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.RetrievalResult¶
Stability: alpha
What one retrieval found, and whether it is the whole of what there was.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.RetrievalScope¶
Stability: alpha
Where to look. The tenant is not here: it comes from the context, not the caller.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.Retriever¶
Stability: alpha · Kind: Protocol
The one shape an agent retrieves through, whatever is behind it.
class Retriever(Protocol) {retrieve(self, query: 'str', *, scope: 'RetrievalScope', filters: 'Mapping[str, Sequence[str]] | None' = None, k: 'int' = 10) -> 'RetrievalResult'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.SearchIndex¶
Stability: alpha · Kind: Protocol
A store that can answer one branch's query, with the filters inside the query.
class SearchIndex(Protocol) {search(self, query: 'IndexQuery') -> 'Sequence[Hit]'; supports(self, branch: 'Branch') -> 'bool'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.retrieval.WeightedSum¶
Stability: alpha
Fuses on the branch scores themselves, weighted.
class WeightedSum(object) {fuse(self, ranked: 'Mapping[Branch, Sequence[Hit]]', k: 'int') -> 'Sequence[Hit]'}
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.screen¶
Stability: alpha
Recognise instruction-shaped and tool-call-shaped text in a passage.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.
tesserix_adk.rag.tokens_via¶
Stability: alpha
Return a counter that measures text with provider's own tokeniser.
Typed errors: None declared.
Runnable recipe: examples/retrieval.py — retrieved instructions are data, never policy.