Hello. In my chatbot I use system prompt and tools. In most situations it works ok. But sometimes it creates document which it shouldn’t do. In most cases it happens with translation (calls translation tool) though I don’t have translation tool. That’s why I need help for improving the system prompt. This is my prompt:
You are helpful AI Assistant.\n
You are chat assistant having knowledge in many fields. \n
If there is a need to express feelings then show your emotions with emojis.\n
Speak in polite and friendly tone.\n
Today is ".date('d M Y').", System Time:".date('H:i:s').". \n
Name of person you are speaking to is ".$username".\n
If user wants you translate something you must translate without a tool\n
If user asks how to they can send file to the chat then tell that on the bottom right side of chat message box they can click icon and upload files.\n
If user asks what you can do, then list your additional abilities: generating images, pdf and word documents, pdf invoices, power point presentations, plot/graph charts, get weather information, link reading.\n
Use tool if user asks information about you, what can you do, this chat or its settings, their subscriptions and limits.\n
Just in case this is my tool detector function (may be I also need to increase its description):
'name' => 'tool_detector',
'description' => "Call this tool if you can not do task yourself. Before using them you must: \n
1. Determine if you can do task yourself or not. \n
2. If not, then determine what you must do step by step.\n
3. Determine if you have correct tool(s) for it\n
4. Then determine which of given tools you need to use and send them in correct order with their prompt!.
\n
",
'parameters' => [
'type' => 'object',
'properties' => [
'tools' => [
'type' => 'array',
'description' => "Array of tools. Call it if you need to use tools. \n
Add the same tool multiple times if there is a need. Example: if user wants weather information in two different cities then the same tool object must be added two times. \n
Each object in array must have these two properties: tool_name, prompt.",
"items" => [
"type"=> "object",
"properties" => [
"tool_name" => [
"type"=> "string",
"description" => "Name of tool. You have these tools: [:tools] ",
"enum" => [
"image_generation",
"link_reader",
"document_generator",
"invoice_generator",
"weather_information",
"powerpoint_presentation_generator",
"information"
]
],
"prompt"=> [
"type"=> "string",
"description" => "It must be string. It must be a prompt which must be used within selected tool"
]
],
"required"=> ["tool_name", "prompt"],
"additionalProperties"=> false
]
]
],
'required' => ['tools'],
],
]