Interface: SelectRelevantTurnsOptions
Defined in: src/batteries/context/thrift/relevance.ts:248
Options for selectRelevantTurns.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
encoding? | string | The encoding to measure under. Default: 'cl100k_base' (see @nhtio/adk/batteries/context/thrift/subtractive_pass!DEFAULT_ENCODING for the rationale — this module makes the identical choice for the identical reason). | src/batteries/context/thrift/relevance.ts:257 |
estimateTokens | EstimateTokensFn | REQUIRED. Measures a turn's combined qa text's token cost. There is no default — this battery ships with no bundled tokenizer. | src/batteries/context/thrift/relevance.ts:253 |
floorCurve? | number | Override for RELEVANCE_FLOOR_CURVE. Same caveat as floorMin. | src/batteries/context/thrift/relevance.ts:279 |
floorMax? | number | Override for RELEVANCE_FLOOR_MAX. Same caveat as floorMin. | src/batteries/context/thrift/relevance.ts:277 |
floorMin? | number | Override for RELEVANCE_FLOOR_MIN. Overriding without re-running the oracle calibration forfeits the calibrated guarantee — see that constant's TSDoc before changing it. | src/batteries/context/thrift/relevance.ts:275 |
historyBudget | number | The token budget available for OLDER (non-keepRecent) history — used only to compute window UTILIZATION for scaledRelevanceFloor (how full is the older-history slice already, before any turns are dropped), not as a hard cap this function enforces itself (that is subtractToFit's job, downstream). A historyBudget of 0 scores utilization as 0 (maximally permissive floor). | src/batteries/context/thrift/relevance.ts:272 |
keepRecent? | number | How many of the MOST RECENT turns to always keep regardless of relevance score — coreference ("it", "that file", "the one you just showed me") needs the immediately preceding turns present no matter what a lexical-overlap score says about them. Default: 2, the flagship reference agent's own calibrated value (KEEP_RECENT_TURNS). | src/batteries/context/thrift/relevance.ts:264 |