Skip to content

RAGVIDENCE / Documentation

CLI v0.2.1
Browse documentation
Docs/Core concepts

Retrieval depth k

Control final depth, candidate stages and exact context budgets.

v0.2.1Local CLI · Offline reports
Download .md

Use the context your application actually sends

k caps final returned units. Larger k can recover evidence while adding irrelevant context. Compare techniques at a matched final depth or an explicit matched context budget; do not credit evidence your generation step never receives.

OptionCap
--branch-kCandidates per lexical/dense hybrid branch
--child-kChildren before parent deduplication
--query-kEach original/variant search and fused pool
--rerank-kCandidates scored by the cross-encoder
--kFinal returned source units
--context-budgetComplete rendered context count

Context budgets

Whole ranked passages that do not fit are skipped and remaining ranks are renumbered. Text is not silently cut. IDs, headings and separators count. The default counter uses exact Unicode characters; --tokenizer-file selects and hashes a local Hugging Face tokenizer JSON for token counts with padding/truncation/special tokens disabled.

Those counts exclude generation instructions and provider framing. Model adapters can independently truncate ranking inputs; exact per-model truncation counts are unavailable. Small explicit candidate caps can return fewer than k passages.

Was something unclear? Send documentation feedback.