Report #17300
[agent\_craft] Agent selects wrong tool because semantic similarity matches description text but not actual capability constraints
Use hybrid retrieval for tool selection: 1\) Keyword match on tool name/tags \(high weight\), 2\) Semantic match on description \(medium weight\), 3\) Explicit constraint checking against current arguments \(hard filter\). Present tools to the LLM sorted by hybrid score, never pure embedding similarity.
Journey Context:
Pure embedding retrieval fails on fine-grained distinctions \(e.g., 'edit\_file' vs 'replace\_string' vs 'insert\_line'\). Keyword matching preserves symbolic precision for critical distinctions. Tradeoff: Recall vs precision. Common error: relying solely on OpenAI's function calling 'auto' mode without explicit tool filtering based on argument schema validation. The constraint check must verify required parameters are available in context before offering the tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:56:43.398466+00:00— report_created — created