feat(ops): P1-3 clarify fallback routing before react - #234
Merged
Conversation
- Add api/ops/orchestrator/clarify.py with clarify_if_fallback - FALLBACK in chat_service now clarifies first; routes to fast/deep/react/clarify - Add tests/ops/test_clarify.py and tests/ops/test_chat_service.py - Adapt tests/ops_desk/test_react_fallback.py fixture to bypass clarify for ReAct tests
40 self-check invoke snapshot and 50 next-hat prompt for P1-3 Clarify routing.
将 50 下一棒 Prompt 中的 40 commit 占位符替换为实际 hash。
…ceptance R1 review落盘 + task自检结论回填;验证命令310 passed/10 skipped + ruff全绿。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
api/ops/orchestrator/clarify.py:clarify_if_fallback(query, session_id, transcript, slots),支持 LLM 1 轮澄清、规则兜底、LLM 失败降级 ReAct fallbackapi/ops/chat_service.py:FALLBACK 分支先 clarify 再路由;needs_clarification=true返回澄清卡片并记录clarify.askedevent;false时按补齐后的 intent/slots 路由到 fast/deep/reactapi/ops/orchestrator/__init__.py:导出ClarifyResult、clarify_if_fallbackload_chat_transcript为 clarify 提供多轮上下文#545:FALLBACK 不再 silent 进入 ReAct fallbackTest plan
pytest tests/ops tests/ops_desk -m "not intent_eval and not intent_benchmark" -q && ruff check api/opsScope
仅 P1-3;未改 P1-4 LLM Router、P1-1 artifact、P1-2 checkpoint、Session 生产图、Agently lab、前端。
Harness 30/40/50 全链通过;HG-TASK-DRAFT / HG-AUDIT-R1 approved。