---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/relevance/functions/selectNaiveTurns.md
---

# Function: selectNaiveTurns()

```ts
function selectNaiveTurns<M, TC>(
  turns: readonly HistoryTurn<M, TC>[],
  historyBudget: number,
  options: SelectNaiveTurnsOptions,
): HistoryTurn<M, TC>[];
```

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

The recency (FIFO) baseline: keep the newest turns, oldest-first-dropped, until `historyBudget` is
exhausted — walking backward from the newest turn and stopping (WITHOUT including) the first turn
that would push the running total over budget. The single newest turn is always kept even if it
alone exceeds `historyBudget`.

## Type Parameters

| Type Parameter                                                           | Default type                                              |
| ------------------------------------------------------------------------ | --------------------------------------------------------- |
| `M` *extends* [`RelevanceMessage`](../interfaces/RelevanceMessage.md)    | [`RelevanceMessage`](../interfaces/RelevanceMessage.md)   |
| `TC` *extends* [`RelevanceToolCall`](../interfaces/RelevanceToolCall.md) | [`RelevanceToolCall`](../interfaces/RelevanceToolCall.md) |

## Parameters

| Parameter       | Type                                                                  | Description                                                              |
| --------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `turns`         | readonly [`HistoryTurn`](../interfaces/HistoryTurn.md)<`M`, `TC`>\[] | The full grouped history, chronological.                                 |
| `historyBudget` | `number`                                                              | The token budget to fit turns into, newest-first.                        |
| `options`       | [`SelectNaiveTurnsOptions`](../interfaces/SelectNaiveTurnsOptions.md) | See [SelectNaiveTurnsOptions](../interfaces/SelectNaiveTurnsOptions.md). |

## Returns

[`HistoryTurn`](../interfaces/HistoryTurn.md)<`M`, `TC`>\[]

The surviving turns, in their original chronological order.

## Remarks

This function exists as an honest COMPARISON BASELINE, not a recommended default — it is the
"before" arm the flagship reference agent's evaluation measured [selectRelevantTurns](selectRelevantTurns.md) against.
The evaluation's own honest finding: naive recency is not merely worse in the general case, it can
COLLAPSE entirely on a reasoning-heavy model under enough context pressure — one matrix cell
observed the naive baseline degrade to keeping essentially nothing useful (effectively `floor 0.08`
/ `3` turns of real signal) once the window filled, while relevance selection kept answering
correctly at the same pressure. Use `selectRelevantTurns` unless you specifically need a
recency-only policy or are reproducing that comparison yourself.
