Repository navigation
Conversation
Each unified search tool was named after the provider's display name, which is translated into the user's language, with every character outside [A-Za-z0-9_-] replaced. For languages written in a non-Latin script the names collapse: in Ukrainian 21 of 24 providers became the same tool, `search__`, so the model called the wrong provider or none. Name the tool after the provider id, which is stable and ASCII, and mention the id in the tool's description as well, so the model can tell e.g. the full-text provider from the file name search even when the display name says little about it. Signed-off-by: Volodymyr Fesko <vladimir.fesko@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ex_app/lib/all_tools/search.pynames each unified search tool after the provider's display name, which Nextcloud translates into the user's language, and then replaces every character outside[A-Za-z0-9_-]with_.For languages in a non-Latin script the names collapse into one. With a Ukrainian user, 21 of 24 providers on our instance became the same tool,
search__. The model then called the wrong provider (e.g.search__with{"type": "deck-board"}while looking for text in files), or none at all, and answered that nothing was found. In English the names stay distinct, so the problem does not show up there.(#125 fixed whitespace in the same names; this is the same function, the non-ASCII case.)
Change
provider['id'](stable, ASCII, unique) instead ofprovider['name'], e.g.search_fulltextsearch,search_files.Searches Контекстний пошук (search provider 'fulltextsearch') in Nextcloud.Without the id, a translated name such as "Контекстний пошук" says little to the model about what the provider searches.Testing
Running 2.9.1 with this change on our Nextcloud 35 instance (vLLM, Mistral Small) with a Ukrainian user: all 24 providers get distinct tool names, and a request for a phrase inside the user's documents now reaches the full-text search tool (in 3 of 4 runs; the 4th picked the file-name search) instead of the collapsed
search__.