feat(ops): P1-4 LLM intent router with rule fallback - #235
Merged
Conversation
…le fallback - Add api/ops/intent_router.py: JSON intent / slots / confidence via LLM. - Wire classify_intent in core.py to use LLM router when OPS_CHAT_LLM_ROUTER=1. - Fallback to rule classifier on low confidence or LLM error. - Record intent_router.fallback events via append_event when run_id/store provided. - Add tests/ops/test_intent_router.py covering success, low confidence, invalid JSON, timeout, disabled, and classify_intent integration. - Include 30 invoke and 40 self-check prompt.
Generate 50-self-check invoke snapshot for P1-4 LLM Router.
Backfill 40 commit 5c4f05c into 50-self-check invoke.
Add 40-self-check invoke snapshot for P1-4 LLM Router.
|
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/intent_router.py:轻量 JSON LLM intent router,输出intent/slots/confidenceapi/ops/orchestrator/core.py:当OPS_CHAT_LLM_ROUTER=1时classify_intent优先走 LLM router,否则保持原规则不变intent_router.fallbackeventTest plan
pytest tests/ops tests/ops_desk -m "not intent_eval and not intent_benchmark" -q && ruff check api/opspytest tests/ops/test_intent_router.py -k fallback -q→ 3 passedScope
仅 P1-4;未改 P1-1 artifact、P1-2 checkpoint、P1-3 clarify、Session 生产图、Agently lab、前端。
Harness 30/40/50 全链通过;HG-TASK-DRAFT / HG-AUDIT-R1 approved。