Skip to main content

Module providers

Module providers 

Source
Expand description

Provider test doubles: scripted LLM extractor, constant/recording embedders, and the dual-mode scripted NLI classifier.

Structs§

ConstantEmbedder
Embedding provider that always returns the same vector regardless of input.
RecordingEmbedder
Embedding provider that records every embed call and returns a deterministic content-derived vector unique to the input text. Used to verify the extraction pipeline hands distinct embeddings to distinct facts (so Layer 2 dedup makes the right call). new returns the double together with the shared call-log handle so the test body can assert on it.
ScriptedExtractor
LLM extractor that pops pre-scripted results in FIFO order and counts invocations. When the script is exhausted, subsequent calls return an empty Vec (mirroring a provider that simply finds no facts) rather than erroring, so tests that do not care about the Nth call still pass.

Enums§

ScriptedNliClassifier
Scripted NLI classifier with two modes:
ScriptedReranker
Scripted reranker, parity-shaped with ScriptedNliClassifier: