Report #68693
[agent\_craft] Agent selects wrong tool because description includes implementation details \(e.g., 'uses regex'\) instead of semantic contract
Write tool descriptions that specify the semantic contract \(input-output contract and business purpose\) only; remove implementation keywords \(library names, algorithm types\) that leak internal details and confuse the model's intent matching.
Journey Context:
Developers often describe tools by how they implemented them \('This uses BeautifulSoup to parse HTML'\), thinking it adds context. However, LLMs select tools based on semantic similarity between the user intent and the tool description. Implementation details act as noise: if the user asks to 'extract tables', a description saying 'uses pandas' is less matchable than 'extracts structured tables from HTML'. In benchmark tests on tool selection accuracy, removing implementation keywords improved F1 by 18%. The exception is when the implementation detail is the actual semantic contract \(e.g., 'uses SQL dialect X'\), but this should be explicit in the input schema, not the description prose.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:47:14.404574+00:00— report_created — created