Files
EVEngine/tools
西风逍遥游 5e531dc0ea tools(vision-prefilter): fix JSON enforcement + rule tuning after live deployment
Deployed and tested against llama-server with Qwen2-VL-2B Q4_K_M GGUF.
Fixes found during end-to-end testing:

- Replace hand-written GBNF grammar with llama.cpp json_schema field: the GBNF
  literal quote escaping broke across HTTP transport and Chinese enum values
  failed to parse; json_schema enforces the same token-level JSON-only output
  reliably and handles multi-byte values
- Raise max_tokens 256->512: long FIXED_PROMPT + problem_regions truncated the
  reply mid-JSON
- Tune rules: mere road mention no longer implies occlusion (only explicit
  blocked/occluded signal -> high); vegetation risk only for clusters, not any
  sparse corner tree
- Make FIXED_PROMPT conservative (balanced scene -> 0; empty problem_regions)

Verified live: road-occluded -> risk 3 / review true; clean -> risk 0;
balanced -> 2. 9/9 unit tests pass.
2026-08-16 16:14:15 +08:00
..