Skip to content

Evaluate fuzzy matching library for ToolNotFoundPolicy #1485

@jasperblues

Description

@jasperblues

Context

The AutoCorrectionPolicy in ToolNotFoundPolicy currently uses a simple fuzzy matching algorithm (case-insensitive containment + token-based matching on _/- delimited segments) to suggest corrections when the LLM hallucinates a tool name.

Suggestion

Evaluate whether a dedicated fuzzy matching library (e.g. fuzzywuzzy, or similar) would improve match quality over the current approach.

Considerations

  • The current algorithm handles known hallucination patterns (e.g. ragbot_vectorSearchvectorSearch)
  • A library may handle edge cases better (edit distance, partial ratio matching)
  • Tradeoff: additional dependency vs marginal improvement for a small input space (tool names)

Raised during review of #1478.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions