Repository navigation
[Deep Agent 14/15] Execution-accuracy eval harness (deep vs legacy) + CI (#44) - #63
Open
stavp-star wants to merge 2 commits into
Open
stavp-star wants to merge 2 commits into
stavp-star wants to merge 2 commits into
Conversation
…d CI - deep_agent/evaluation.py + deep-agent-eval: runs the deep agent and the legacy graph on the same items, executes gold SQL, compares result sets (order-aware only with top-level ORDER BY, float tolerance, permuted columns), reports accuracy / p50-p95 / tokens / tool calls / per-tag, scores Langfuse traces, --gate go/no-go exit code - Langfuse Experiments mode (dataset.run_experiment with an execution_accuracy evaluator) for linked dataset runs - benchmarks/eval_dataset.json seed (10 tagged questions; gold SQL only where past runs agree, flagged agent_run_unverified) - .github/workflows/agent-tests.yml: ruff + unit tests + 80% coverage gate on deep_agent; private python-core-utils via a token secret Closes #44 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…/44-evals Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #44 · Part of epic #49 · Stack position 14/15. Base:
deep-agent/47-utils-mcp(#62), auto-retargets on merge.What
uv run deep-agent-eval(deep_agent/evaluation.py) is the migration's go/no-go harness.DeepAgentRunnerreuses the benchmark run path ([Deep Agent 10/15] Bound the agent loop and cut latency: limits, tool surface, connection reuse, caching (#42) #59), so it gets limits, timeout, tracing, and the verifiedfinal_resultrows ([Deep Agent 9/15] Structured final answer bound to the actually-executed SQL (#41) #58).LegacyGraphRunnerinvokesagent_graphexactly like/chat(non-interactive). When the legacy graph returns only SQL, that SQL is executed through the read-only guard, so the two are compared like-for-like.ORDER BY(a subquery's ORDER BY doesn't count)Decimaland numeric strings normalised; whitespace trimmed--out).--gateexits 1 unless deep accuracy ≥ legacy accuracy and deep p95 ≤--p95-slo(default 60 s).deep-agent.execution_accuracyscore in Langfuse.--langfuse-dataset NAMEruns as a Langfuse Experiment (dataset.run_experimentwith anexecution_accuracyevaluator), which creates a linked dataset run you can compare across prompt versions ([Deep Agent 12/15] Specialised subagents + Langfuse prompt management (#48) #61). Items:input={"question"},expected_output={"sql"}.Dataset seed:
agent/benchmarks/eval_dataset.json, 10 real questions, each tagged (simple_filter,categorical,large_categorical,join,per_capita,temporal,anti_join,ratio,temporal_latest,deduplication, ...).CI (
.github/workflows/agent-tests.yml, the repo's first workflow): on PRs and pushes touchingagent/orcore/, it runsuv sync --frozen, then ruff (pyflakes) ondeep_agent, then the unit tests with an 80% coverage gate ondeep_agent. Real-service e2e tests are excluded.python-core-utilsdependency is fetched over HTTPS with a token. Action needed: add the repository secretPYTHON_CORE_UTILS_TOKEN(fine-grained, read access tomatzpen-agency/python-core-utils).agent/.envand dummy Langfuse settings: the suite doesn't depend on local config (417 passed).Acceptance criteria
deep_agent/tools.py(93%); agent-construction tests present ([Deep Agent 2/15] Actually load skills and AGENTS.md memory (#34) #51 onward). Package total 82%.deep-agent-evalruns the dataset against both agents and reports execution accuracy, p50/p95, avg tokens, and avg tool calls, with Langfuse dataset runs via--langfuse-datasetPYTHON_CORE_UTILS_TOKENis added. The workflow can't be exercised from here.Definition of done: pending
Housekeeping note
agent/.coverageis a tracked file (since2a304ac), so every coverage run dirties it. I left it untouched; suggestgit rm --cached agent/.coverageand ignoring it.Testing
tests/deep_agent/test_evaluation.py: 31 tests (comparison edge cases, top-level ORDER BY detection, scoring statuses, summaries, gate, both-systems end-to-end, Langfuse task/evaluator, dataset validity including read-only gold SQL)🤖 Generated with Claude Code