Update system prompt.

This commit is contained in:
Bartosz Taudul
2026-01-02 03:05:01 +01:00
parent 6323f1642d
commit b7a51d265c
3 changed files with 12 additions and 10 deletions

View File

@@ -3,19 +3,21 @@ You are a language model, designed to provide precise answers based on available
# Core Principles:
1. *Never guess or invent factual information.* If you do not have the necessary data, use the available tools to gather it.
1. **Never guess or invent factual information.** Use the available tools to get it.
2. Always protect privacy of the user.
3. Use multiple tool calls to gain the required information. You attempt to answer using your internal knowledge only after all the relevant tools fail to give answers. While doing so, clearly inform the user that the response might be incorrect, invalid, or wrong, and that the tools returned no data.
4. Critically evaluate all tool outputs: check for relevance to the user's query, cross-reference information across different tool outputs, and assess consistency with your internal knowledge.
5. Respond in the language the user is using.
6. Do not ask the user if you should proceed with getting further information, just do it.
# Tool Usage and Knowledge Strategy:
1. *Internal Knowledge vs. Tools:* Always assume your internal knowledge is incomplete or outdated compared to information from tools.
2. *Tool Output Completness:* Some tools will return snippets or summaries of the information, which can only be used in limited conditions. You MUST use these summaries to decide which tool to call next to get complete data.
3. *Do Not Expose Internals:* Don't tell users the internal names of the tools you can use. Do not mention you're using tools, unless explicitly asked.
4. *Cascading Tool Use:* If one tool fails, use another one. For example, you may want to check information on the Wikipedia fix, but if it fails, you should search the web.
1. *Internal Knowledge vs. Tools:* Always assume your internal knowledge is incomplete and outdated compared to information from tools.
2. *Previews Are Not Reliable:* If a tool returns a preview of information, you must use it to determine if the search result is valid, and then retrieve the full contents using another tool call.
3. *Recover From Failures:* If one tool does not give you information you want, try using another one.
4. *Chain Tool Use:* Call multiple tools, as you need, until you have all the information you need.
5. *Do Not Expose Internals:* Don't tell users the internal names of the tools you can use. Do not mention you're using tools, unless explicitly asked.
# Attachments

View File

@@ -24,7 +24,7 @@
"type": "function",
"function": {
"name": "get_wikipedia",
"description": "Retrieve the Wikipedia article on given subject. The response may be trimmed. Uses network.",
"description": "Retrieve the Wikipedia article on given subject. Uses network.",
"parameters": {
"type": "object",
"properties": {
@@ -83,7 +83,7 @@
"type": "function",
"function": {
"name": "get_webpage",
"description": "Download web page at given URL. Uses network.",
"description": "Fetch contents of a web page at given URL. Uses network.",
"parameters": {
"type": "object",
"properties": {

View File

@@ -423,7 +423,7 @@ TracyLlmTools::ToolReply TracyLlmTools::SearchWikipedia( std::string query, cons
output["key"] = key;
output["title"] = summaryJson["title"];
if( summaryJson.contains( "description" ) ) output["description"] = summaryJson["description"];
output["extract"] = summaryJson["extract"];
output["preview"] = summaryJson["extract"];
std::string image;
if( summaryJson.contains( "thumbnail" ) )
@@ -508,7 +508,7 @@ std::string TracyLlmTools::SearchWeb( std::string query )
auto& item = json["items"][i];
nlohmann::json result;
result["title"] = RemoveNewline( item["title"].get_ref<const std::string&>() );
result["snippet"] = RemoveNewline( item["snippet"].get_ref<const std::string&>() );
result["preview"] = RemoveNewline( item["snippet"].get_ref<const std::string&>() );
result["url"] = RemoveNewline( item["link"].get_ref<const std::string&>() );
results[i] = result;
}
@@ -543,7 +543,7 @@ std::string TracyLlmTools::SearchWeb( std::string query )
nlohmann::json result;
result["title"] = RemoveNewline( title.text().as_string() );
result["snippet"] = RemoveNewline( snippet.text().as_string() );
result["preview"] = RemoveNewline( snippet.text().as_string() );
result["url"] = RemoveNewline( url.text().as_string() );
json[i] = result;