---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/contracts/interfaces/WorkingRetrievable.md
description: >-
  The structural shape of a retrieved passage (RAG chunk) the working set
  carries. `estimateTokens` mirrors a core `Retrievable`'s own method, which MAY
  resolve asynchronously (a reader-backed artifact's estimate can be a
  `Promise`) — the battery treats a non-number return as "measure the rendered
  string instead" (see {@link
  @nhtio/adk/batteries/context/thrift/subtractive_pass!subtractToFit}'s `rTok`
  helper), since this pass is synchronous end-to-end and never awaits.
---

# Interface: WorkingRetrievable

Defined in: [src/batteries/context/thrift/contracts.ts:134](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L134)

The structural shape of a retrieved passage (RAG chunk) the working set carries. `estimateTokens`
mirrors a core `Retrievable`'s own method, which MAY resolve asynchronously (a reader-backed
artifact's estimate can be a `Promise`) — the battery treats a non-number return as "measure the
rendered string instead" (see [@nhtio/adk/batteries/context/thrift/subtractive\_pass!subtractToFit](../../subtractive_pass/functions/subtractToFit.md)'s `rTok`
helper), since this pass is synchronous end-to-end and never awaits.

## Properties

| Property                                | Type                                        | Description                                                                                                                                                                                    | Defined in                                                                                                                                          |
| --------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `content` | `string` | [`ContentLike`](ContentLike.md) | The retrieved passage's rendered content.                                                                                                                                                      | [src/batteries/context/thrift/contracts.ts:136](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L136) |
|  `score?`    | `number`                                    | Relevance/rerank score, `[0, 1]`-ish; retrievables sort by this (descending) before the shed, so the tail of the ranking (lowest score) sheds first. Missing/absent sorts as `0` (shed first). | [src/batteries/context/thrift/contracts.ts:139](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L139) |

## Methods

### estimateTokens()?

```ts
optional estimateTokens(encoding: string): number | Promise<number>;
```

Defined in: [src/batteries/context/thrift/contracts.ts:142](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L142)

Optional self-measurement; may resolve synchronously OR as a `Promise` (a reader-backed
artifact). A non-number result falls back to measuring `content.toString()`.

#### Parameters

| Parameter  | Type     |
| ---------- | -------- |
| `encoding` | `string` |

#### Returns

`number` | `Promise`<`number`>
