> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.id/llms.txt
> Use this file to discover all available pages before exploring further.

# retrieve_evidence

> Search raw conversation history for exact quotes and context.

# retrieve\_evidence

Searches the raw conversation history using 7-message sliding windows. Returns original conversation text -- not synthesized summaries. This is the tool to use when you need the exact wording from a past conversation.

## Parameters

| Parameter | Type    | Required | Default | Description                             |
| --------- | ------- | -------- | ------- | --------------------------------------- |
| `query`   | string  | Yes      | --      | Search term or semantic concept to find |
| `limit`   | integer | No       | `5`     | Max windows to return                   |

## Read-only

Yes. This tool only reads from your memory.

## Example usage

```json theme={null}
{
  "query": "database migration strategy"
}
```

```json theme={null}
{
  "query": "the exact error message from the deploy",
  "limit": 10
}
```

## When to use

* You need exact quotes from a past conversation
* You need code snippets that were shared in a previous session
* You need raw historical context that hasn't been distilled into entities yet
* You want to verify the original wording of a decision or statement

<Note>
  Prefer `ask_question` or `memory_search` for general queries. `retrieve_evidence` is the last resort in the tool priority chain -- use it only when you need the original wording, not a summary.
</Note>

## How it works

BaseLayer stores raw conversation history and indexes it for semantic search. Results come back as 7-message windows centered around the matching content, giving you enough surrounding context to understand the match.

<Tip>
  The 7-message window means you'll see a few messages before and after the match. This is intentional -- context around a quote is often as important as the quote itself.
</Tip>
