Filters, rewriting and compression
Inspect typed filters, cosine MMR and bounded model transformations.
On this page
Typed metadata filters
{"all":[{"field":"record_metadata.product","op":"eq","value":"Orion"}]}eq, in, gt, gte, lt and lte combine with AND. Missing fields/type mismatches exclude a source; CSV values remain strings. Strings compare lexically without date/version conversion. Filters apply before ranking and parent expansion cannot reintroduce excluded sources.
Cosine MMR
MMR trades query cosine relevance against maximum cosine similarity to already selected candidates. --mmr-lambda controls that balance; --mmr-candidates caps the pool. It needs an embedding provider, even after lexical ranking. Diversity can displace needed similar passages.
Bounded model queries
rewrite requests one query; auto-multi-query requests up to three by default, configurable 1–8. Set --rewrite-model and --rewrite-provider, with RAGVIDENCE_TRANSFORM_BASE_URL/API_KEY for your service. The model receives the question and instruction, without corpus, answers or reviewed evidence IDs. Strict JSON is required. --rewrite-failure original explicitly permits a disclosed fallback; default fail does not invent a successful result.
Exact-span compression
ragvi compress ./docs --questions ./questions.txt --compression-max-spans 2The default sentence selector ranks punctuation/newline spans by lexical question-word overlap, keeping up to two positive-overlap spans per source. An explicit --compression-model can select exact offsets from candidate bodies. No added summary earns evidence credit. Removed conditions lose credit even when an output passes validation.
Model and suite bounds
Timeouts, output caps, prompt/JSON/query sizes and suite call bounds are validated. Invalid model output fails unless explicit original-text fallback is selected and disclosed. The CLI does not supply the server, API access or an answer correctness judge.