Repository navigation
fix(eval): point five scenarios at a real agent, and reject unknown agent types - #3906
Conversation
…gent types csv_analysis and the four real_world xlsx scenarios requested the removed 'data' agent, so every turn got the canned agent-unavailable reply and the scenarios reported INFRA_ERROR without ever reaching the model. They now target the flagship 'gaia' agent, whose full profile carries the scratchpad and analyze_data_file tools. Session create and update now return 422 naming the registered agent ids when agent_type resolves to nothing, instead of storing a session that can never answer. A unit guard checks every scenario agent_type resolves against built-in agents, hub entry points, and legacy aliases. Fixes amd#3883
Approve with suggestionsFive spreadsheet/CSV eval scenarios were pointed at an agent that no longer exists, so they silently reported infra errors instead of scores. This PR retargets them at the flagship agent, adds a CI guard that fails the moment any scenario names an agent that can't resolve, and makes the Agent UI backend refuse to create or retype a session to an unknown agent instead of handing back a session that can never answer. The direction and the guard test are both right. The one thing worth doing before merge: nobody has yet run the five scenarios end to end to confirm they now produce a score. The PR is candid about this — the eval box in the test plan is unchecked — but it means the fix is still unproven, and the committed rag_quality baseline keeps a passing score for the CSV scenario that was recorded back when the removed agent existed. Whoever runs the next comparison will be diffing against a number no current checkout can reproduce. One eval run (or a note pinning the baseline as stale) closes that. Smaller points, all non-blocking: when an agent is installed but failed to import, the new rejection message tells the user to install it from the Agent Hub, dropping the load-failure reason the backend already has recorded; the list of valid ids in that message doesn't quite match what the check actually accepts; and the new eval guard would reject a scenario aimed at the email agent even though the backend allows it. No security concerns found. Real-world evidenceN/A — no evidence bundle was produced for this PR, and the description carries only pytest results. The new 422 behaviour is an HTTP surface the CI lane could have exercised with a real request/response against 🔍 Technical detailsIssues🟡 The eval fix is unverified, and the baseline it will be compared against is stale ( The test plan's 🟢 The 422 discards the recorded load-error reason (
🟢 The advertised id list doesn't match what's accepted (
🟢 The guard can't express a sidecar-backed scenario (
🟢 The helpful 422 body never reaches the user in the UI (
Strengths
|
…pted id An installed agent that failed to import was told to install itself; the 422 now carries the recorded load error. The id list names every id the endpoint accepts, including the email sidecar, and the scenario guard accepts the same ids the endpoint does. The csv_analysis entry in the three rag_quality baselines is marked stale: it was recorded before the scenario ran the gaia agent, and needs re-baselining from the next rag_quality run.
|
Merged main and addressed the review. When an installed agent failed to import, the rejection now says why instead of telling the user to install it. The error lists every agent id the endpoint accepts, and the scenario guard accepts Still open: the 🔍 Technical details
|
|
Synced this branch onto current An unknown agent id is rejected on both session create and session retype, with a message naming every id the server actually accepts. The rejected create leaves no session behind, and the rejected retype leaves the existing session's agent untouched — so the failure mode this prevents (a session bound to an agent that can never answer) is closed on both paths. Worth calling out: the first probe accidentally ran against One thing this does not prove, stated rather than glossed over: nobody has run 🔍 Technical detailsVerified on The 422, against a live serverBackend booted with no Lemonade running (a session-create rejection needs no inference). Control, proving the endpoint works: Rejection: The accidental control run against
|
Five spreadsheet and CSV eval scenarios asked for the removed
dataagent, so every run of them was an INFRA_ERROR that never reached the model. Because infra errors are left out of the category average, nobody noticed. They now target the flagshipgaiaagent, which carries the scratchpad andanalyze_data_filetools that replaced the analyst agent. The Agent UI backend now refuses to create or retype a session to an unknown agent id. Its 422 lists every id it accepts and, for an installed agent that failed to import, the load error, so this kind of drift fails immediately instead of producing a session that can never answer.gaiaand not adataalias: the existing aliases only cover-litemodel tiers of agents that still exist.datawas removed on purpose, and its work now lives in the flagship'sfullprofile. Thedocprofile only loadsanalyze_data_fileon demand and has no scratchpad tables. An alias would quietly keep the dead id alive.csv_analysisnow runs a different agent from the rest ofrag_quality. A scenario's ownagent_typewins over--agent-type, so this one runsgaiawhile the other six rundoc, and the category scorecard mixes the two agents by design.scorecard_rag_quality.jsonbaselines were recorded before the scenario rangaia, so theircsv_analysisPASS (9.82 / 9.83 / 9.15) is not a number any current run can reproduce. Each entry now carries a_stale_notesaying so. Re-baseline from the firstrag_qualityrun on this branch.agent_typestops resolving to an id the session endpoint accepts: a registered agent, a legacy alias, or a sidecar likeemail. It needs no Lemonade.Test plan
pytest tests/unit/eval/test_scenario_agent_types.py: every scenarioagent_typeresolves, and a sidecar id passes like the endpoint accepts itpytest tests/unit/chat/ui/ tests/unit/eval/: 1539 passed, including 422 tests for create and update (unknown id rejected with no session left behind, known id accepted, update leaves the stored type alone, load error named, every accepted id listed)pytest tests/integration/test_chat_ui_integration.py -k test_custom_agent_model_id_honored_through_api: custom~/.gaia/agentsids still create sessionsgaia eval agent --category rag_quality --agent-type doc:csv_analysisnow runs and gets a score instead of INFRA_ERROR, then re-baseline it. Runs in the self-hosted CI job once the branch is pushed to amd/gaia.Fixes #3883