feat: Add Advanced RAG harness evaluator by sjrl · Pull Request #3932 · deepset-ai/haystack-core-integrations · GitHub
Skip to content

feat: Add Advanced RAG harness evaluator - #3932

Draft
sjrl wants to merge 1 commit into
feat/harness-optimization-experimentfrom
codex/agent-pack-harness-optimization
Draft

sjrl wants to merge 1 commit into
feat/harness-optimization-experimentfrom
codex/agent-pack-harness-optimization

Conversation

@sjrl

@sjrl sjrl commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Related Issues

  • part of deepset-ai/haystack-private#498

Proposed Changes:

Third part of the harness optimization work: a harness evaluator for Advanced RAG agents, so the experiment from #4069 can optimize them.

  • AdvancedRAGHarnessEvaluator scores an agent on RetrievalEvalCases:
    • per eval case as AdvancedRAGEvalCaseMetrics: retrieved and cited recall, citations, tool calls and errors, and a digest of the run
    • in aggregate as mean_budgeted_recall, which is 0 for a run over its tool-call budget
    • to_dict/from_dict, so the optimizer agent holding it can be serialized
  • Evaluation helpers it uses: ToolRunStats, tool budgets (resolve_tool_budgets, budgets_exceeded) and digest_agent_run with AgentRunDigestPolicy.
  • The Advanced RAG system prompt asks for one filter covering every source a question spans.
  • Examples: advanced_rag_harness_optimization.py runs a full experiment; advanced_rag_eval.py scores one agent.

How did you test it?

Unit tests for the evaluator and the evaluation helpers, plus tests/advanced_rag/test_optimization_e2e.py, which runs an experiment against scripted agents. hatch run test:unit, hatch run test:types and hatch run fmt-check pass locally.

Notes for the reviewer

Checklist

@github-actions github-actions Bot added integration:agent-pack type:documentation Improvements or additions to documentation labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

@sjrl
sjrl force-pushed the codex/agent-pack-harness-optimization branch 2 times, most recently from dda9893 to 5d41b32 Compare October 1, 2026 15:31
@sjrl
sjrl changed the base branch from main to feat/harness-optimizer-agent October 1, 2026 15:31
@sjrl sjrl changed the title feat: Add Pipeline/harness optimizer agent feat: Add harness optimization experiment and advanced RAG harness evaluator Oct 1, 2026
@sjrl sjrl self-assigned this Oct 8, 2026
@sjrl
sjrl changed the base branch from feat/harness-optimizer-agent to feat/harness-optimization-experiment October 8, 2026 07:42
@sjrl sjrl changed the title feat: Add harness optimization experiment and advanced RAG harness evaluator feat: Add Advanced RAG harness evaluator Oct 8, 2026
@sjrl
sjrl force-pushed the feat/harness-optimization-experiment branch from 9632d65 to 2aa3740 Compare October 15, 2026 12:42
@sjrl
sjrl force-pushed the codex/agent-pack-harness-optimization branch from 47f29c6 to 4eae335 Compare October 15, 2026 12:42
@sjrl
sjrl force-pushed the feat/harness-optimization-experiment branch from 2aa3740 to 79533c2 Compare October 20, 2026 09:37
@sjrl
sjrl force-pushed the codex/agent-pack-harness-optimization branch from 4eae335 to b74e753 Compare October 20, 2026 09:37
@sjrl
sjrl force-pushed the codex/agent-pack-harness-optimization branch from b74e753 to a5893f5 Compare October 20, 2026 10:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:agent-pack type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant