Expand description
Provider test doubles: scripted LLM extractor, constant/recording embedders, and the dual-mode scripted NLI classifier.
Structs§
- Constant
Embedder - Embedding provider that always returns the same vector regardless of input.
- Recording
Embedder - Embedding provider that records every
embedcall 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).newreturns the double together with the shared call-log handle so the test body can assert on it. - Scripted
Extractor - 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§
- Scripted
NliClassifier - Scripted NLI classifier with two modes:
- Scripted
Reranker - Scripted reranker, parity-shaped with
ScriptedNliClassifier: