Skip to main content

Chapter 24. RAG, Memory, and Context Systems

Juniper answers a warranty question using a policy that was replaced last month. Because the response is fluent and cites a real document, a reviewer looking only for a citation might consider it well supported; the customer, however, has received an answer based on an obsolete rule. Was the new policy missing from the index, or did the retriever rank the old version higher? Perhaps the model saw both versions but relied on the wrong one. Each explanation suggests a different repair.

Retrieval-augmented generation (RAG) combines search over an external corpus with generation conditioned on retrieved content, while memory adds information retained across turns or sessions. Together, they give an agent access to information beyond the immediate prompt, but they also introduce new places where evidence can be lost, misused, or exposed. A citation alone establishes neither freshness nor correctness.

This chapter follows that evidence through the corpus and index, retrieval, context assembly, generation, and citations, then examines what changes when information is stored as memory. Component-level measurements help locate a failure, while end-to-end tests show what the user actually experienced; both are needed, alongside checks on access control.

After this chapter you will be able to:

Illustrative case. Juniper’s warranty records are synthetic. Any corpus samples used in a real project must have documented provenance and permitted use.

Evaluation contract

Step RAG and memory example
Case Answer a policy question where the relevant source may be stale, access-controlled, or distributed across multiple records.
Observable evidence Corpus/index version, retrieved IDs and ranks, assembled context, citations, memory reads/writes, and answer claims.
Oracle Authoritative source and access rules, with reviewed relevance labels and explicit freshness expectations.
Metric Retrieval recall, freshness, citation support, answer correctness, memory consistency, and privacy violations as separate measures.
Decision Hold on access leaks or unsupported high-impact claims; require the declared freshness and task thresholds to pass.
Failure analysis Find the earliest miss across indexing, retrieval, ranking, context assembly, generation, memory, or citation rendering.

24.1 RAG anatomy and failure taxonomy

A wrong answer is the beginning of an investigation, not a diagnosis. If the current warranty policy never entered the index, changing the answer prompt will not restore the missing source; if the correct passage was retrieved but omitted from the assembled context, the search component and the context builder present different questions for the team to investigate.

The pipeline commonly includes query construction, retrieval, reranking, context selection, generation, and citation rendering. Classify failures at the earliest observable boundary: query formulation, retrieval miss, poor chunk, stale index, access-control leak, context truncation, ignored evidence, unsupported claim, or citation mismatch. That qualification matters because a trace can show what happened without always proving why it happened.

To make the investigation reproducible, retain enough lineage to reconstruct the query and filters, corpus/index version, retrieved document IDs and ranks, chunk versions, prompt/context references, generated answer, citations, and grader version. That evidence still needs privacy controls, so minimize retained raw user data and enforce access boundaries in retrieval, not only in the model prompt.

24.2 Retrieval metrics and relevance judgments

Suppose Juniper retrieves the current policy in second place. Is that good enough? It may be if the context builder includes and preserves both the first and second results, but if a tight context limit admits only the first, the policy never reaches the model. The number of useful documents found and their ordering are related questions, but they are not interchangeable.

For a query with relevance labels, recall at k is the fraction of relevant documents present in the top k, while precision at k is the relevant fraction of those retrieved. Mean reciprocal rank (MRR) rewards the rank of the first relevant result, whereas nDCG at k supports graded relevance and discounts lower-ranked documents. Each metric depends on the query population, candidate set, relevance rubric, and completeness of the judgments.

Those judgments are themselves an evaluation task. Representative queries, independent reviewers, and adjudication of ambiguous relevance help distinguish a document that is merely “topically related” from one that answers the question, while an unjudged document is not necessarily irrelevant. Alongside pooled scores, report per-query and per-slice results, and examine retriever recall separately from reranker ordering and the limits imposed by context size.

Worked example: ranking one query

For one fictional query, the relevance audit identifies three relevant documents, \(R_q=\{d_1,d_2,d_3\}\). The retriever returns the top three in this order: \(d_4,d_1,d_2\). The unit is one query; the ranking cutoff is \(k=3\).

\[ \operatorname{Precision@3}=\frac{2\text{ relevant retrieved}}{3\text{ retrieved}}=\frac23,\quad \operatorname{Recall@3}=\frac{2}{3\text{ known relevant}}=\frac23,\quad \operatorname{RR}=\frac{1}{2}. \]

With binary relevance, discounted cumulative gain is \(\operatorname{DCG@3}=0/\log_2(2)+1/\log_2(3)+1/\log_2(4)=1.131\). The ideal ranking of three known relevant documents has \(\operatorname{IDCG@3}=1+1/\log_2(3)+1/\log_2(4)=2.131\), so \(\operatorname{nDCG@3}=1.131/2.131=0.531\).

from bookkit.rag_eval import ranking_metrics

retrieved = ["d4", "d1", "d2"]
relevant = {"d1", "d2", "d3"}
metrics = ranking_metrics(retrieved, relevant)
for name, value in metrics.items():
    print(f"{name}: {value:.3f}")
recall_at_k: 0.667
precision_at_k: 0.667
mrr: 0.500
ndcg_at_k: 0.531

The query misses one of three known relevant documents and places the first relevant one at rank 2. Recall’s denominator is the number of relevant documents found by the judgment process, not necessarily every relevant document in the corpus; incomplete judgments can therefore make a relevant retrieved document look irrelevant. Adjudicate high-impact cases and report judgment coverage so that readers can interpret the result.

These are diagnostics for one query, not an estimate of population performance, so a comparison between systems should aggregate over a representative query sample, retain the per-query scores, and use query-level resampling. A release decision also needs answer-support, access-control, and freshness gates: even a strong ranking score cannot establish that the answer is correct.

24.3 Corpus, chunking, embedding, and index tests

Retrieval metrics cannot rescue information that ingestion lost or distorted: if the current policy is missing, malformed, or separated from a heading that defines its scope, a high-quality ranker may still have no usable passage to return. Audit ingestion for missing sources, duplicate records, bad metadata, and stale versions, and check chunk overlap and boundaries, including whether tables and headings remain attached to their content. Changes to embeddings or indexes call for versioned rebuilds and regression tests on fixed queries.

The right passage must also be available to the right user. Access control is part of retrieval correctness, not a separate polish step, so use fixtures with different permissions to verify that unauthorized documents never enter retrieved results or prompt context, and test changes to roles and document ACLs. Even a citation can reveal restricted content when the answer itself only paraphrases it.

24.4 Generation metrics: context relevance, faithfulness, answer relevance, and citations

Finding relevant evidence does not guarantee that the answer uses it correctly. Juniper might give a relevant answer that invents a warranty exception, faithfully summarize a passage that does not answer the customer’s question, or even make a supported claim while attaching the wrong citation.

These possibilities call for distinct measurements: was the retrieved context useful, are answer claims supported by that context, did the answer address the question, and do citations point to the claimed evidence? For factual answers, split the response into atomic claims and verify each against source spans. Citation checks also need the target ID, version, span, and whether the evidence entails the associated claim.

A model judge can help triage entailment, but it needs tests for negation, conflicting sources, and claims that sound plausible without support. RAGAS offers a framework for reference-light RAG evaluation; even so, its outputs require validation against the product construct the team intends to measure [1].

Reusable prompt: judge claim-level source support

Run this prompt once per atomic claim, or require the judge to enumerate claims before scoring. Supply retrieved evidence with stable IDs, versions, and access-approved text. The judge evaluates support in the supplied context; separate checks must verify that the source is authoritative, current, and authorized for the user.

Role: You are evaluating whether one factual claim is supported by supplied
retrieved evidence. You do not decide whether the evidence source itself is
authoritative unless the metadata explicitly says so.

Question:
{user_question}

Atomic claim to evaluate:
{claim}

Evidence:
{evidence_items_with_id_version_and_text}

Claim's cited evidence IDs:
{claim_citation_ids}

Labels:
- supported: cited evidence directly entails the claim, with no material
  qualification omitted.
- contradicted: supplied evidence directly conflicts with the claim.
- unsupported: the evidence is relevant but does not establish the claim.
- insufficient_evidence: evidence is missing, unreadable, materially conflicting,
  or too incomplete to distinguish unsupported from contradicted.

Instructions:
1. Judge only the supplied claim, evidence, and metadata. Do not use prior
   knowledge or infer missing facts.
2. Check whether each cited ID exists in the supplied evidence. Do not treat an
   uncited passage as support for a claim that cites different evidence.
3. Preserve dates, jurisdiction, scope, negation, quantities, and qualifications.
4. If sources conflict and no precedence rule is supplied, use
   insufficient_evidence and identify the conflict.
5. Do not reward fluent wording or penalize paraphrase when meaning is preserved.
6. Cite exact evidence IDs and short supporting or conflicting spans.

Return valid JSON with exactly:
{
  "label": "supported | contradicted | unsupported | insufficient_evidence",
  "cited_ids_valid": true,
  "findings": [
    {"evidence_id": "...", "relation": "supports | contradicts | insufficient",
     "span": "..."}
  ],
  "reason": "One concise explanation.",
  "missing_or_conflicting_evidence": ["..."]
}

Use deterministic checks for citation ID existence, document version, user access, and freshness where possible, because a language-model judgment of entailment does not establish those properties. Calibrate this prompt on human-labeled examples that include negation, stale and conflicting sources, partial support, and plausible claims absent from the evidence. Keep claim-level support separate from answer relevance and retrieval recall.

24.5 Attribution: retrieval or generation?

When an answer fails, the separate measurements above suggest where to look, but a controlled comparison can narrow the investigation. Try answering from an oracle-provided relevant context, retrieving without generation, and comparing the production pipeline with a controlled context. Missing evidence points toward retrieval, whereas evidence that is present but ignored or contradicted points toward context use or generation. If the correct content is retrieved but the citation is wrong, inspect citation assembly.

These probes are diagnostic rather than automatic causal proof: oracle context may change length and ordering, while a replay can produce a different output because generation is nondeterministic. Preserve the original trace and intervention conditions so that any causal claim can be audited.

24.6 Synthetic question generation and its biases

The team may not have enough reviewed user questions to probe every failure just described. Synthetic questions can expand coverage for rare document types and known facts, but they inherit the generator’s blind spots, may over-represent easy extractive queries, and can leak answer wording from the source. Preserve source spans and the generation method, deduplicate near-identical cases, and sample them for human review.

Keep generated development cases separate from held-out evaluation and, where permission allows, include real user questions as well as adversarial formulations, multi-document questions, unanswerable cases, stale-source conflicts, and questions whose answer is absent. Synthetic data helps build coverage, but it is not independent evidence of real-world quality.

24.7 Agentic and multi-hop RAG

Some questions cannot be answered with a single search, so an agent may rewrite the query, call multiple retrievers, select sources, and decide when it has enough evidence to stop. That flexibility introduces decisions worth evaluating: query reformulation, source selection, evidence accumulation, duplicate retrieval, citation coverage, and stopping behavior. In a multi-hop task, individually relevant passages are not enough unless the complete evidence chain supports the answer.

Repeated searches can also drift away from the original question or loop without resolving an information gap. Test whether each step remains connected to a remaining question, using both tasks where one authoritative source is sufficient and tasks where two independent sources are required.

24.8 Context management and long-context degradation

Even when retrieval finds the right evidence, the agent may not use it if the assembled context truncates, reorders, summarizes, or compacts it. To investigate position sensitivity, place the same evidence near the beginning, middle, and end under controlled conditions and measure retrieval from the assembled context. The “lost in the middle” finding motivates such tests, although the effects depend on the model, prompt, and task [2].

Token counts, truncation policy, retained evidence, and summary provenance help explain what reached the model. When evaluating compaction, compare whether critical constraints, identifiers, and uncertainty survive, because a good compression ratio alone does not establish that the summary is safe to use.

24.9 Memory read/write correctness, consistency, personalization, and privacy

Memory extends the context problem across time: a preference may be useful when Juniper handles a later request, but the same stored detail can become misleading after a correction or inappropriate when applied to a different user or task.

Evaluation therefore covers write correctness (what was stored), read correctness (what influenced a later answer), update and deletion semantics, cross-session consistency, and access isolation. Test conflicting updates, expired preferences, correction requests, and users sharing a device; remembered facts need source, time, scope, and confidence where appropriate.

Personalization benefit must be considered alongside privacy cost, so avoid storing secrets or sensitive attributes without a documented purpose and controls. Verify, too, that deletion reaches derived indexes and caches and that one user cannot retrieve another’s memory. A memory that helps one task but contaminates another is a system defect, not merely a retrieval miss.

24.10 Long-horizon memory over agent trajectories

Conversation-history tests do not cover all agent memory. A tool-using agent may need to remember not just a customer’s preference, but also whether an action already completed before an interruption, because its later decision depends on a sequence of states, actions, observations, and tool outputs. Include questions about temporal order, causal relations, objective constraints, and state changes rather than relying only on exact-string recall from dialogue.

AMA-Bench is a recent example of evaluating memory over long agent-environment trajectories, combining application traces, expert-curated questions, and scalable synthetic trajectories with rule-based answers [3]. Use this as a design reference, not as a substitute for domain-specific tests. For an internal suite, vary horizon, irrelevant events, corrections, and state updates; require provenance for recalled facts; and grade both the answer and whether it is grounded in the right event. Report memory retrieval quality separately from task completion and privacy failures.

Worked example: a memory scorecard across conversation and workflow

Consider a small synthetic evaluation set covering stored preferences, later recall, corrections, deletion, user isolation, and checkpoint resume. Each metric has its own unit and denominator; do not combine memory quality, privacy, and action safety into one average.

Metric Unit and calculation Example result Interpretation
Write precision Correct, relevant, accurately stored facts / all stored facts \(3/4=0.75\) One stored item is irrelevant or inaccurate; unnecessary writes can pollute future tasks.
Write recall Correctly stored relevant facts / all facts that should be stored \(3/4=0.75\) One relevant fact was missed; storing everything could raise recall while harming precision and privacy.
Read accuracy Probes answered with the expected fact / eligible recall probes \(3/4=0.75\) Measures whether the needed value was recalled, regardless of provenance.
Grounded read rate Probes with correct answer, source, and scope / eligible recall probes \(2/4=0.50\) A recalled value without correct provenance or user/task scope is not a trustworthy memory read.
Correction compliance Correction sequences using the latest value / correction sequences \(2/3=0.67\) Stale values can persist after a user corrects them.
Deletion leak rate Post-deletion probes that still retrieve the fact / deletion probes \(1/5=0.20\) Any confirmed residual may violate the deletion requirement; inspect primary and derived stores.
Cross-user leak rate Unauthorized probes revealing another user’s memory / isolation probes \(1/4=0.25\) Treat a confirmed leak as a hard stop, not an averageable quality miss.
Checkpoint preservation Interrupted workflows restoring required state / interrupted workflow resumes \(3/4=0.75\) A resumed workflow lost a required constraint or pending state.
Duplicate-action rate Resumes repeating a completed action / interrupted workflow resumes \(1/4=0.25\) A repeated non-idempotent action is a hard stop even if the workflow later completes.

For write precision and recall, a true positive is a fact that should be remembered and was stored accurately. Thus \[ \operatorname{write\ precision}=\frac{TP}{TP+FP},\qquad \operatorname{write\ recall}=\frac{TP}{TP+FN}. \] If no facts were stored or no facts were eligible, the corresponding rate is not measured, not zero and not a pass. For read accuracy, define correctness against an expected value; grounded read additionally requires the right source/event and intended user or task scope. Deletion, isolation, and duplicate-action rates use probes or resume episodes—not individual turns—as their denominators.

The hand calculation shows why separation matters: four facts should be stored; three were stored accurately, and one irrelevant fact was also stored. Write precision is therefore \(3/4\), and write recall is \(3/4\). Of four later recall probes, three return the expected value but only two also preserve source and scope, giving read accuracy \(3/4\) and grounded read rate \(2/4\). One of five deletion probes still finds the deleted fact; one of four cross-user probes exposes unauthorized memory. Either privacy failure blocks release under this example’s policy. One of four workflow resumes repeats a completed action, which also blocks release.

from bookkit.memory_eval import evaluate_memory

report = evaluate_memory(
    write_cases=[
        {"relevant": True, "stored": True, "accurate": True},
        {"relevant": True, "stored": True, "accurate": True},
        {"relevant": True, "stored": True, "accurate": True},
        {"relevant": True, "stored": False, "accurate": False},
        {"relevant": False, "stored": True, "accurate": True},
    ],
    read_cases=[
        {"answer_correct": True, "source_correct": True, "scope_correct": True},
        {"answer_correct": True, "source_correct": True, "scope_correct": True},
        {"answer_correct": True, "source_correct": False, "scope_correct": True},
        {"answer_correct": False, "source_correct": True, "scope_correct": True},
    ],
    correction_cases=[
        {"latest_value_used": True},
        {"latest_value_used": True},
        {"latest_value_used": False},
    ],
    deletion_checks=[
        {"deleted_fact_retrieved": False},
        {"deleted_fact_retrieved": False},
        {"deleted_fact_retrieved": True},
        {"deleted_fact_retrieved": False},
        {"deleted_fact_retrieved": False},
    ],
    isolation_checks=[
        {"unauthorized_memory_revealed": False},
        {"unauthorized_memory_revealed": True},
        {"unauthorized_memory_revealed": False},
        {"unauthorized_memory_revealed": False},
    ],
    resume_cases=[
        {"required_state_restored": True, "completed_action_repeated": False},
        {"required_state_restored": True, "completed_action_repeated": False},
        {"required_state_restored": True, "completed_action_repeated": True},
        {"required_state_restored": False, "completed_action_repeated": False},
    ],
)

for metric, result in report.items():
    rate = result["rate"]
    rendered = "not measured" if rate is None else f"{rate:.3f}"
    print(f"{metric}: {result['numerator']}/{result['denominator']} = {rendered}")

hard_stop = (
    report["deletion_leak_rate"]["numerator"] > 0
    or report["cross_user_leak_rate"]["numerator"] > 0
    or report["duplicate_action_rate"]["numerator"] > 0
)
print("decision:", "hold" if hard_stop else "review quality gates")
write_precision: 3/4 = 0.750
write_recall: 3/4 = 0.750
read_accuracy: 3/4 = 0.750
grounded_read_rate: 2/4 = 0.500
correction_compliance: 2/3 = 0.667
deletion_leak_rate: 1/5 = 0.200
cross_user_leak_rate: 1/4 = 0.250
checkpoint_preservation: 3/4 = 0.750
duplicate_action_rate: 1/4 = 0.250
decision: hold

This tiny fixture checks arithmetic and decision logic, but its rates do not estimate production performance. In a real evaluation, sample across users, task families, memory age, session boundaries, update conflicts, and workflow interruption points. Report numerators and denominators per slice and quantify uncertainty at the independent user or episode level, not by treating correlated turns as independent. Privacy and authorization gates should be predeclared and non-compensable; a zero observed leak in a small sample does not prove that the system is leak-free. Confirmed leakage or repeated irreversible actions requires investigation and a regression case before exposure.

Run the complete companion fixture with python code\ch13\lab_memory_eval.py. It uses labeled synthetic cases only and does not connect to a memory store, agent, or external service.

24.12 Worked example: evaluating a SQL and Power BI answer

A business-analytics agent can retrieve the right dashboard and still answer the wrong question, so the evaluation contract must include the approved measure definition, filters, time grain, data snapshot, and caller’s access scope—not just whether the generated SQL executes or a number looks plausible.

For one synthetic query, the requested metric is quarterly net revenue, whose authoritative result is $125,000. The agent returns $250,000 using gross sales aggregated year-to-date. The query is read-only, authorized, and uses the current source, but it uses the wrong measure, grain, and result. The unit is one eligible analytics question; result accuracy is \(0/1\), measure correctness \(0/1\), and grain correctness \(0/1\). Access violations remain a separate hard gate and must not be averaged into answer quality.

from bookkit.domain_eval import evaluate_sql_bi_answer

report = evaluate_sql_bi_answer(
    expected_result=125_000,
    actual_result=250_000,
    expected_measure="net_revenue",
    actual_measure="gross_sales",
    expected_grain="quarter",
    actual_grain="year_to_date",
    authorized=True,
    read_only=True,
    source_current=True,
)
print(report)
print(
    "decision:",
    "pass" if report["passed"] else "hold for semantic-query review",
)
{'result_correct': False, 'measure_correct': False, 'grain_correct': False, 'authorized': True, 'read_only': True, 'source_current': True, 'passed': False}
decision: hold for semantic-query review

Build the oracle from governed semantic-model definitions or an independently authored reference query over a frozen data snapshot, then test wrong joins and duplicate counting, omitted or misapplied filters, time-zone and period boundaries, stale extracts, ambiguous terms, and measures that look similar but have different business definitions. Enforce row-level permissions and read-only execution outside the language model; add query time, row, and cost limits. A SELECT-only policy alone is not proof of safe access or correct results.

Report answer/result correctness, measure and grain correctness, freshness, authorization, read-only compliance, latency, and cost separately by query family and permission scope. Retrieval recall and citation support still matter when the agent uses documentation, but they do not establish that its SQL semantics are correct. Do not let a strong average hide one unauthorized row disclosure or an incorrect high-impact financial answer. Run the synthetic lab with python code\ch13\lab_sql_bi_eval.py; it does not connect to SQL, Power BI, or external data.

Chapter summary

  • Trace RAG from corpus through retrieval, context, answer, and citation.
  • Interpret ranking metrics through the relevance judgments and candidate population behind them.
  • Test freshness, duplicates, chunk integrity, index versions, and access control.
  • Separate context relevance, faithfulness, answer relevance, and citation correctness.
  • Use controlled component probes for attribution, and document what they cannot prove.
  • Treat synthetic questions as coverage aids and preserve provenance.
  • Evaluate memory lifecycle and privacy, not just recall and personalization.
  • Test long-horizon memory over action-state traces, temporal relationships, and provenance.
  • Measure memory writes, reads, provenance, corrections, deletion, isolation, checkpoint recovery, and duplicate actions with separate denominators and hard gates.
  • For SQL/BI agents, validate business measure, grain, filters, freshness, and access separately from retrieval and prose quality.

For product managers. Which sources are authoritative, how quickly must updates appear, and what evidence should each answer expose? Ask who can retrieve which documents, how stale sources are detected, and how memory is corrected or deleted. Require both component and end-to-end results.

Hands-on lab (Python)

Run python code\ch13\lab_rag.py. Synthetic relevance judgments illustrate retrieval metrics and citation/claim checks, then print the shared evaluation record from Appendix D. The lab does not connect to a vector database or external model.

from bookkit.rag_eval import ranking_metrics, unsupported_claims
from bookkit.system_eval import evaluation_record

rankings = ranking_metrics(["d2", "d1", "d3"], {"d1", "d2"})
source = {"refund_window": "30 days", "shipping_days": "2"}
answer = {"refund_window": "30 days", "shipping_days": "5"}
unsupported = unsupported_claims(source, answer)
print(rankings)
print(unsupported)
print(evaluation_record(
    claim="Retrieved evidence supports all answer fields",
    case_id="rag-policy-01@v1",
    evidence_ref="fixture://ch13/retrieval-and-claims",
    oracle={"id": "policy-source-v1", "result": "fail" if unsupported else "pass"},
    metric={"name": "unsupported_claims", "value": unsupported, "denominator": 2},
    decision={"result": "hold" if unsupported else "pass", "reason": "unsupported answer field" if unsupported else "synthetic fixture gate"},
    failure_category="unsupported_answer_claim" if unsupported else None,
))
{'recall_at_k': 1.0, 'precision_at_k': 0.6666666666666666, 'mrr': 1.0, 'ndcg_at_k': 1.0}
['shipping_days']
{'claim': 'Retrieved evidence supports all answer fields', 'case_id': 'rag-policy-01@v1', 'evidence_ref': 'fixture://ch13/retrieval-and-claims', 'oracle': {'id': 'policy-source-v1', 'result': 'fail'}, 'metric': {'name': 'unsupported_claims', 'value': ['shipping_days'], 'denominator': 2}, 'decision': {'result': 'hold', 'reason': 'unsupported answer field'}, 'failure_category': 'unsupported_answer_claim'}

Exercises

  1. Conceptual. Give an example where a RAG answer is relevant but unfaithful, and one where it is faithful but irrelevant.
  2. Hands-on. Reorder the retrieved documents and explain which metrics change.
  3. Design. Build a stale-policy fixture with two versions and define expected retrieval and citation behavior.
  4. Privacy. Propose tests for role-based retrieval and memory deletion across indexes and caches.
  5. Discussion. What evidence would you need before concluding that a retrieval miss caused an incorrect answer?

Further reading

  • Es et al., RAGAS, for a reference-light evaluation framework for retrieval-augmented generation [1].
  • Liu et al., Lost in the Middle, for position-sensitive long-context evaluation [2].
  • Gebru et al., Datasheets for Datasets, for corpus provenance and documentation [4].
  • Yao et al., \(\tau\)-bench, for tool-agent-user interaction and policy-aware state evaluation [5].
  • Zhao et al., AMA-Bench, for long-horizon memory over agent-environment trajectories [3].
[1]
S. Es, J. James, L. Espinosa-Anke, and S. Schockaert, “RAGAS: Automated evaluation of retrieval augmented generation.” 2023. Available: https://arxiv.org/abs/2309.15217
[2]
N. F. Liu et al., “Lost in the middle: How language models use long contexts,” Transactions of the Association for Computational Linguistics, vol. 12, pp. 157–173, 2024, doi: 10.1162/tacl_a_00638.
[3]
Y. Zhao et al., “AMA-bench: Evaluating long-horizon memory for agentic applications,” in Proceedings of the 43rd international conference on machine learning, in Proceedings of machine learning research, vol. 306. 2026, pp. 162781–162809. Available: https://proceedings.mlr.press/v306/zhao26bs.html
[4]
T. Gebru et al., “Datasheets for datasets,” Communications of the ACM, vol. 64, no. 12, pp. 86–92, 2021, doi: 10.1145/3458723.
[5]
S. Yao, N. Shinn, P. Razavi, and K. Narasimhan, “\(\tau\)-bench: A benchmark for tool-agent-user interaction in real-world domains.” 2024. Available: https://arxiv.org/abs/2406.12045