dmtrKovalenko / dmtrKovalenko/fff

LLM gets cognitive overload from overlapping tool names fff_grep and fff_multi_grep

Open
#311 3 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
Rust
Stars
10.7k
Forks
446
Avg merge
1d 21h
Merged PRs (30d)
39

Description

This is GLM-4.7 justyfing why it did not succeeded on the tool use at the first attempt:

```
fff_grep:
"query": required, type: string

fff_multi_grep:
"patterns": required, type: array of strings

The tool schemas are clearly presented to me. My mistake was:

1. Mental confusion - I was thinking "I want to search for multiple things" so I defaulted to patterns
2. Tool mix-up - I conflated fff_grep (single query) with fff_multi_grep (array of patterns)
3. Not checking the schema - The description says "use ONE specific term" but I ignored it and assumed I could pass an array

The correct approach would have been:
- For multiple terms → use fff_multi_grep with {"patterns": ["term1", "term2"]}
- For single term → use fff_grep with {"query": "term"}
```

My proposal - one tool fff_grep with array for patterns:

```
{
"name": "fff_grep",
"description": "Searches for one or more specific terms or regex patterns. To search for a single term, pass an array with one item.",
"parameters": {
"type": "object",
"properties": {
"patterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of strings or regex patterns to search for. Example for single: ['term']. Example for multiple: ['term1', 'term2']."
}
},
"required": ["patterns"]
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.