Repository navigation
🐛 Fix(evaluation): require a selected evaluator and remove Jiuwen scoring fallback - #4337
Open
cj2026-bit wants to merge 2 commits into
Open
cj2026-bit wants to merge 2 commits into
cj2026-bit wants to merge 2 commits into
Conversation
cj2026-bit
requested review from
Dallas98,
WMC001,
YehongPan,
hhhhsc701 and
jeffwu-1999
as code owners
November 12, 2026 13:38
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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.
Problem
JiuwenSDKAdapterunconditionally inmanagement/services/evaluation/execution.pyandruns.py._evaluate_querysilently fell back toadapter.evaluate_semantic_consistency(...)whenever the preloaded evaluator map was empty, so a run with no usable evaluator produced{"semantic_consistency": ...}scores outside the selected-evaluator contract instead of failing._evaluate_query.Fix
management/services/evaluation/execution.pyandmanagement/services/evaluation/runs.py. No new adapter is introduced._evaluate_querynow rejects an empty evaluator map before the agent is called (AGENT_EVALUATION_EVALUATOR_REQUIRED), and always scores through_score_with_evaluators.evaluator_ids, an empty set of PUBLISHED evaluators raisesAppExceptionbefore agent execution. The config API now forwards the runtime's structured error response (code/message/HTTP status) instead of collapsing it to a generic 500, so callers receive160209with a clear message.response.ok. A non-2xx response shows the backendmessage/detailas an error toast and does not populate the success result modal; network failures show the localized fallbackagentEvaluation.trialFailed(zh/en).execute_agent_evaluation_runpreloads PUBLISHED evaluators from the frozen run config and raises before iterating cases when none are usable. The existing outer handler marks the runFAILEDand stores the reason inerror_message. This covers both with-set and no-set runs because both dispatch to the same execution entry.AGENT_EVALUATION_EVALUATOR_REQUIRED = "160209"(HTTP 400) to contracts with its default message. Existing API payloads, evaluator scoring, and persistence contracts are unchanged; selected LLM/code evaluators still produce the same{evaluator_name: score}/ reason payloads.prompt_serviceand its adapter are intentionally untouched; only evaluation usage is removed.Verification
test/run_all_test.pyisolation):test/backend/services/test_agent_evaluation_service.py: 153 passed, 4 skippedtest/backend/services/test_evaluation_pure_logic.py: 27 passedtest/backend/app/test_agent_evaluation_app.py: 51 passedtest/backend/app/test_agent_evaluation_runtime_app.py: 11 passedtest/backend/app/test_evaluation_delete_app.py: 19 passedpy_compileand the pre-commit ruff rule set were run on the changed files. The diff adds no new ruff findings;runs.py/the evaluation test file already carry pre-existing F401/I001 debt on the base commit (split-module re-exports), which is why the backend commit was made with--no-verify. Counts before/after are unchanged for those files.npm run type-checkpasses and Prettier reports no formatting changes on the three UI/locale files.93c8f54d7: 16/16 checks pass, includingtest(pytest + coverage generation and Codecov upload) andcodecov/patch;type-check, CodeQL and all image builds also pass.worktrees/deploychecked out at this branch head, config/runtime started from WSL against the local historical PostgreSQL data, frontend served from the same commit. Backend behavior was verified at905fabcac; the trial error display was re-verified at93c8f54d7.答案准确性: agent answer returned and score keyed by the selected evaluator ({"答案准确性": 0.0}; expected answer is empty in trial mode), nosemantic_consistency.evaluator_ids: HTTP 400,{"code":"160209","message":"At least one published evaluator is required for a trial run."}. Same result with a nonexistent evaluator id.At least one published evaluator is required for a trial run.COMPLETED, 12/12 cases passed, overall 0.97, per-evaluator stats keyed by答案准确性.COMPLETED, 2/2 cases scored by答案准确性, overall 0.00 (generated weather queries have no expected answer).FAILEDbefore any case ran (0/12) witherror_message = "No usable evaluator is configured for this run. Select at least one published evaluator and retry."FAILED(0/2) with the same reason.v2.9.0_008,v2.9.0_009(both files), andv2.9.0_010were applied through the repository migration runner. A pre-migrationpg_dumpwas kept atC:\Users\cj\IdeaProjects\nexent\artifacts\eval-remove-jiuwen-20261112\nexent-before-migrate.dump.Screenshots (local evidence, to be attached)