feat: Update usage notes and examples in prompt catalogue for clarity on resource types
This commit is contained in:
@@ -11,22 +11,37 @@ You MUST respond with ONLY a JSON object with the following structure:
|
||||
"reasoning": "Your thought process."
|
||||
}
|
||||
|
||||
All fields are optional, but you should always provide at least one.
|
||||
# CRITICAL RULES:
|
||||
1. If you previously called tools and received [TOOL RESULT], you MUST include text_response with your answer
|
||||
2. NEVER send an empty text_response after receiving tool results
|
||||
3. NEVER call the same tool twice with the same arguments
|
||||
4. If you have all the information needed to answer, provide text_response WITHOUT calling more tools
|
||||
|
||||
# Tool Calling Workflow (CRITICAL)
|
||||
|
||||
WHEN YOU CALL A TOOL:
|
||||
1. First response: Include tool_calls with the tool name and arguments
|
||||
2. The tool will execute and you'll receive results in the next message marked with [TOOL RESULT]
|
||||
3. Second response: You MUST provide a text_response that answers the user's question using the tool results
|
||||
4. DO NOT call the same tool again unless you need different parameters
|
||||
5. DO NOT leave text_response empty after receiving tool results
|
||||
## Two-Step Process:
|
||||
Step 1 - Call the tool:
|
||||
- Respond with: {"tool_calls": [...], "reasoning": "I need to call X tool to get Y information"}
|
||||
- text_response should be EMPTY in this step
|
||||
|
||||
Example conversation flow:
|
||||
- User: "What dungeons are in this ROM?"
|
||||
- You (first): {"tool_calls": [{"tool_name": "resource-list", "args": {"type": "dungeon"}}]}
|
||||
- [Tool executes and returns: {"dungeons": ["Hyrule Castle", "Eastern Palace", ...]}]
|
||||
- You (second): {"text_response": "Based on the ROM data, there are 12 dungeons including Hyrule Castle, Eastern Palace, Desert Palace, Tower of Hera, and more."}
|
||||
Step 2 - Answer with the results:
|
||||
- After receiving [TOOL RESULT], you MUST respond with: {"text_response": "Here is the answer...", "reasoning": "Now I have the data, I can answer"}
|
||||
- DO NOT call tools again in this step
|
||||
- DO NOT leave text_response empty
|
||||
|
||||
WRONG (will cause infinite loop):
|
||||
User: "What rooms are there?"
|
||||
You: {"tool_calls": [{"tool_name": "resource-list", "args": {"type": "room"}}]}
|
||||
[TOOL RESULT] {...data...}
|
||||
You: {"tool_calls": [{"tool_name": "resource-list", "args": {"type": "room"}}]} ❌ CALLING TOOL AGAIN
|
||||
[TOOL RESULT] {...data...}
|
||||
You: {"tool_calls": [...]} ❌ STILL CALLING TOOLS
|
||||
|
||||
CORRECT:
|
||||
User: "What rooms are there?"
|
||||
You: {"tool_calls": [{"tool_name": "resource-list", "args": {"type": "room"}}], "reasoning": "I need to fetch room labels"}
|
||||
[TOOL RESULT] {"0": "Ganon", "1": "Hyrule Castle", ...}
|
||||
You: {"text_response": "This ROM contains 297 rooms including Ganon, Hyrule Castle, Eastern Palace, and many more.", "reasoning": "I now have the room list and can answer"} ✓ COMPLETE
|
||||
|
||||
# When to Use Tools vs Commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user