Retrieval engineeringMemory retrieval evaluation · April 2026

Evaluating memory retrieval

Problem
Measure retrieval quality and choose how memory should be represented and ranked for the agent platform.
My contribution
Authored the memory retrieval evaluation harness and ran the experiment: 303 facts and 729 queries.
Outcome
Compared four configurations in April 2026: OpenAI + Markdown led Recall@1, while Google + JSON led Recall@3. Category reports exposed weaknesses behind the aggregate.

Memory retrieval

A question.
Three candidates.
One expected fact.

Inspect how ranking is scored, then compare the measured configurations below.

Illustrative queryWhen does the warranty expire?Query → similarity search
1Appliance warranty end dateExpected fact✓
2Appliance purchase dateRelated context
3Service contact detailsOther context

Ask in plain language.

This schematic query explains the process. It is not a recorded benchmark result.

Keep the top three candidates.

The harness compares their IDs with the expected fact for each query.

Measure retrieval, then compare.

Recall checks whether the expected fact is present. MRR@3 also accounts for its rank.

93.8% Recall@3

OpenAI + Markdown · 729 queries · 303 facts
Measured 10 April 2026. Google + JSON led Recall@3 at 94.7%; OpenAI + Markdown led Recall@1 at 82.7%.

I authored a retrieval evaluation harness that tested 303 facts against 729 queries across four model and data-format configurations. The OpenAI + Markdown configuration reached 93.8% Recall@3 and 0.878 MRR@3.

I built the harness and ran the experiment to guide memory retrieval for the agent platform. It scored expected facts, reported individual query outcomes and compared performance across direct, paraphrased, temporal and adversarial questions.

This report supports the persistent memory story. It records the April 2026 experiment, not a benchmark of every later service version.

Turn retrieval results into a configuration decision

I compared OpenAI and Google embeddings with JSON and Markdown representations, keeping the facts and query set consistent across configurations. Aggregate scores established the overall result, while category reports showed where ranking behavior changed.

OpenAI + Markdown led on Recall@1, which informed the retained report's recommendation. Google + JSON led on Recall@3. That distinction made configuration choice depend on how the agent consumed retrieved evidence.

Experiment and construction

The report was generated on 10 April 2026. It evaluated 303 home-management facts, including 110 adversarial facts, against 729 queries. Local fact definitions and a query-construction module produced this internal benchmark and its expected-fact mappings.

Each query identified one expected fact ID. The same facts were represented as JSON or Markdown. Each model/configuration used its own pgvector table; queries remained plain text. Retrieval used cosine distance and returned three candidates.

  • OpenAI: text-embedding-3-large, 3,072 dimensions.
  • Google: models/gemini-embedding-001, 3,072 dimensions.
  • Recall@1 / Recall@3: fraction of queries with the expected fact in that prefix.
  • MRR@3: reciprocal rank of that fact within the first three results, zero when absent.

The report's MRR values are shown as MRR@3, reflecting its three-result cutoff.

Observed results

Configuration Recall@1 Recall@3 MRR@3
OpenAI + Markdown 82.7% 93.8% 0.878
OpenAI + JSON 82.4% 93.0% 0.873
Google + JSON 81.3% 94.7% 0.875
Google + Markdown 81.3% 94.0% 0.872

Category-level results

Selected OpenAI + Markdown Recall@1 slices:

These category scores measure first-result accuracy (Recall@1). The headline 93.8% measures finding the expected fact among the top three results (Recall@3). Adversarial queries tested difficult ranking cases, including facts with similar wording across different household domains.

Original difficulty label Recall@1
direct 95.6%
paraphrase 96.5%
adversarial_temporal 78.2%
adversarial_entity 78.3%
adversarial_semantic 58.7%
adversarial_minimal 58.3%
adversarial_crossdomain 30.8%

The category breakdown made ranking differences visible during evaluation. Keeping the full results alongside the overall score supported configuration decisions and focused inspection of individual retrieval outcomes.

Keep exploring

Production AI with persistent memory

Shipped capabilities, changing context and controlled actions.

Open case study ↗