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

# Financial analyst across quarters

> Ask what changed between Q2 and Q4 and get an answer grounded in what was said at the time.

[← All use cases](/use-cases/overview)

<div className="uc-examples"><a href="https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/time_travel.py">time\_travel.py</a><a href="https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/memory_basics.py">memory\_basics.py</a></div>

## The scenario

The numbers are in a spreadsheet. The *reasons* are in eight earnings
transcripts, a dozen board memos and a year of management commentary — and the
question you actually have is "what did they say about margin in Q2, and does it
still hold?"

A search engine over those documents returns the paragraphs. It does not tell
you what changed.

## Step 1 — Load the documents, dated

```python theme={null}
for path, when in [("q2-earnings.pdf", "2026-06-30"), ("q3-earnings.pdf", "2026-09-30")]:
    client.upload_file(space_id="filings", file=path, tags=[f"period:{when[:7]}"])
```

Tags carry the period so a later question can be pinned to one, and uploads are
asynchronous — poll `get_job`, or take the
[webhook route](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/webhooks_and_settings.py).

## Step 2 — Bound the question by when things happened

```python theme={null}
client.retrieve(
    space_id="filings",
    query="gross margin commentary",
    occurred_after="2026-04-01T00:00:00Z",
    occurred_before="2026-07-01T00:00:00Z",
)
```

`occurred_after` / `occurred_before` filter on when the thing *happened*, not
when you uploaded it. That distinction is the whole feature: everything was
ingested on one afternoon, and none of it happened then.

## Step 3 — Ask the comparative question

```python theme={null}
print(client.reason(
    space_id="filings",
    query="What did management say about margin pressure in Q2, and how did that change by Q3?",
))
```

## Step 4 — Keep the receipt

```python theme={null}
res = client.retrieve_receipt(space_id="filings", query="margin pressure", receipt_detail="full")
print(res.receipt_id)
```

Store the receipt id next to the answer. When somebody challenges the number six
months from now, [the receipt says exactly what the model
saw](/use-cases/why-the-answer-used-what-it-used).

## Evals

1. Load two consecutive quarters where you know a metric moved.
2. Ask the comparative question. Check both periods are actually represented in
   the answer, not just the more recent one.
3. Re-run with the window narrowed to one quarter and confirm the other drops
   out — if it does not, your documents are not carrying event time.
4. Pull the receipt and confirm the cited memories come from both filings.

## Guardrails

<Warning>
  **This is not investment advice, and it must not be presented as any.** The
  system retrieves and summarises what was said. It does not know whether the
  guidance was met, and it will summarise a misleading statement as confidently
  as an accurate one.
</Warning>

* **Numbers in prose are the weakest part.** An extracted memory is text, and a
  figure that matters should be checked against the filing rather than trusted
  from a summary. The receipt gives you the path back.
* **`relevance_score` can exceed 1.0** and is not a confidence. It is a ranking
  signal within one result set.
* **Undated uploads collapse into one day.** If event time matters — and here it
  is the entire point — set it on write or carry it in the document.

## Built from

Both are complete, runnable scripts:
[`time_travel.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/time_travel.py),
[`memory_basics.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/memory_basics.py).
