mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Show more specific warning to llm on duplicate tool use during research
This commit is contained in:
@@ -197,7 +197,7 @@ async def apick_next_tool(
|
||||
if i.warning is None and isinstance(i.query, ToolCall)
|
||||
}
|
||||
if (parsed_response.name, dict_to_tuple(parsed_response.args)) in previous_tool_query_combinations:
|
||||
warning = "Repeated tool, query combination detected. Skipping iteration. Try something different."
|
||||
warning = f"Repeated tool, query combination detected. You've already called {parsed_response.name} with args: {parsed_response.args}. Try something different."
|
||||
# Only send client status updates if we'll execute this iteration and model has thoughts to share.
|
||||
elif send_status_func and not is_none_or_empty(response.thought):
|
||||
async for event in send_status_func(response.thought):
|
||||
|
||||
@@ -588,7 +588,7 @@ tools_for_research_llm = {
|
||||
description=dedent(
|
||||
"""
|
||||
To have the tool AI semantic search through the user's knowledge base.
|
||||
Helpful to answer questions for which finding some relevant notes or documents can complete the search. Example: "When was Tom born?"
|
||||
Helpful to answer questions for which finding some relevant notes or documents can be useful. Example: "When was Tom born?"
|
||||
This tool AI cannot find all relevant notes or documents, only a subset of them.
|
||||
It is a good starting point to find keywords, discover similar topics or related concepts and some relevant notes or documents.
|
||||
For a given query, the tool AI can perform a maximum of {max_search_queries} semantic search subqueries per iteration.
|
||||
|
||||
Reference in New Issue
Block a user