---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/relevance/interfaces/SelectRelevantTurnsOptions.md
description: 'Options for [`selectRelevantTurns`](https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/relevance/functions/selectRelevantTurns).'
---

# Interface: SelectRelevantTurnsOptions

Defined in: [src/batteries/context/thrift/relevance.ts:248](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L248)

Options for [selectRelevantTurns](../functions/selectRelevantTurns.md).

## 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](../../subtractive_pass/variables/DEFAULT_ENCODING.md) for the rationale — this module makes the identical choice for the identical reason).                                                                                                                                                      | [src/batteries/context/thrift/relevance.ts:257](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L257) |
|  `estimateTokens` | [`EstimateTokensFn`](../../contracts/type-aliases/EstimateTokensFn.md) | 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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L253) |
|  `floorCurve?`        | `number`                                                               | Override for [RELEVANCE\_FLOOR\_CURVE](../variables/RELEVANCE_FLOOR_CURVE.md). Same caveat as `floorMin`.                                                                                                                                                                                                                                                                                                                               | [src/batteries/context/thrift/relevance.ts:279](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L279) |
|  `floorMax?`            | `number`                                                               | Override for [RELEVANCE\_FLOOR\_MAX](../variables/RELEVANCE_FLOOR_MAX.md). Same caveat as `floorMin`.                                                                                                                                                                                                                                                                                                                                   | [src/batteries/context/thrift/relevance.ts:277](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L277) |
|  `floorMin?`            | `number`                                                               | Override for [RELEVANCE\_FLOOR\_MIN](../variables/RELEVANCE_FLOOR_MIN.md). 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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L275) |
|  `historyBudget`   | `number`                                                               | The token budget available for OLDER (non-`keepRecent`) history — used only to compute window UTILIZATION for [scaledRelevanceFloor](../functions/scaledRelevanceFloor.md) (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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L272) |
|  `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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L264) |
