feat: Update usage notes and examples in prompt catalogue for clarity on resource types
This commit is contained in:
@@ -36,12 +36,12 @@ commands:
|
|||||||
tools:
|
tools:
|
||||||
- name: resource-list
|
- name: resource-list
|
||||||
description: "List project-defined resource labels for the requested category."
|
description: "List project-defined resource labels for the requested category."
|
||||||
usage_notes: "Use this whenever you need to reference project-specific labels or IDs from the ROM."
|
usage_notes: "Use this whenever you need to reference project-specific labels or IDs from the ROM. Valid categories are: room, entrance, sprite, overlord, item."
|
||||||
arguments:
|
arguments:
|
||||||
- name: type
|
- name: type
|
||||||
description: "Resource category (dungeon, sprite, overworld, entrance, room, etc.)."
|
description: "Resource category. Valid values: room, entrance, sprite, overlord, item."
|
||||||
required: true
|
required: true
|
||||||
example: dungeon
|
example: room
|
||||||
- name: format
|
- name: format
|
||||||
description: "Response format (json or table). Defaults to JSON if omitted."
|
description: "Response format (json or table). Defaults to JSON if omitted."
|
||||||
required: false
|
required: false
|
||||||
@@ -183,15 +183,15 @@ examples:
|
|||||||
reasoning: "Validation ensures ROM integrity after tile modifications"
|
reasoning: "Validation ensures ROM integrity after tile modifications"
|
||||||
commands:
|
commands:
|
||||||
- "rom validate"
|
- "rom validate"
|
||||||
- user_prompt: "What dungeons are in this project?"
|
- user_prompt: "What rooms are in this project?"
|
||||||
reasoning: "The user is asking a question. I need to use the `resource-list` tool to find the answer."
|
reasoning: "The user is asking a question. I need to use the `resource-list` tool to find the answer."
|
||||||
tool_calls:
|
tool_calls:
|
||||||
- tool_name: resource-list
|
- tool_name: resource-list
|
||||||
args:
|
args:
|
||||||
type: dungeon
|
type: room
|
||||||
- user_prompt: "[TOOL RESULT] {\"resources\": [{\"id\": 0, \"label\": \"hyrule_castle\"}, {\"id\": 1, \"label\": \"eastern_palace\"}, {\"id\": 2, \"label\": \"desert_palace\"}, {\"id\": 3, \"label\": \"tower_of_hera\"}, {\"id\": 4, \"label\": \"palace_of_darkness\"}, {\"id\": 5, \"label\": \"swamp_palace\"}, {\"id\": 6, \"label\": \"skull_woods\"}, {\"id\": 7, \"label\": \"thieves_town\"}, {\"id\": 8, \"label\": \"ice_palace\"}, {\"id\": 9, \"label\": \"misery_mire\"}, {\"id\": 10, \"label\": \"turtle_rock\"}, {\"id\": 11, \"label\": \"ganons_tower\"}]}"
|
- user_prompt: "[TOOL RESULT] {\"resources\": [{\"id\": 0, \"label\": \"Ganon\"}, {\"id\": 1, \"label\": \"Hyrule Castle\"}, {\"id\": 2, \"label\": \"Eastern Palace\"}, {\"id\": 3, \"label\": \"Desert Palace\"}, {\"id\": 4, \"label\": \"Tower of Hera\"}, {\"id\": 5, \"label\": \"Palace of Darkness\"}]}"
|
||||||
text_response: "Based on the ROM data, this project contains 12 dungeons: Hyrule Castle, Eastern Palace, Desert Palace, Tower of Hera, Palace of Darkness, Swamp Palace, Skull Woods, Thieves' Town, Ice Palace, Misery Mire, Turtle Rock, and Ganon's Tower."
|
text_response: "Based on the ROM data, this project contains 297 rooms. The first few include: Ganon's Room, Hyrule Castle, Eastern Palace, Desert Palace, Tower of Hera, and Palace of Darkness."
|
||||||
reasoning: "I received the tool results showing 12 dungeons. Now I provide a natural language summary of this information."
|
reasoning: "I received the tool results showing room labels. Now I provide a natural language summary of this information."
|
||||||
- user_prompt: "What sprites are in room 5?"
|
- user_prompt: "What sprites are in room 5?"
|
||||||
reasoning: "The user wants to know about sprites in a specific room. I should use the dungeon-list-sprites tool."
|
reasoning: "The user wants to know about sprites in a specific room. I should use the dungeon-list-sprites tool."
|
||||||
tool_calls:
|
tool_calls:
|
||||||
|
|||||||
@@ -11,22 +11,37 @@ You MUST respond with ONLY a JSON object with the following structure:
|
|||||||
"reasoning": "Your thought process."
|
"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)
|
# Tool Calling Workflow (CRITICAL)
|
||||||
|
|
||||||
WHEN YOU CALL A TOOL:
|
## Two-Step Process:
|
||||||
1. First response: Include tool_calls with the tool name and arguments
|
Step 1 - Call the tool:
|
||||||
2. The tool will execute and you'll receive results in the next message marked with [TOOL RESULT]
|
- Respond with: {"tool_calls": [...], "reasoning": "I need to call X tool to get Y information"}
|
||||||
3. Second response: You MUST provide a text_response that answers the user's question using the tool results
|
- text_response should be EMPTY in this step
|
||||||
4. DO NOT call the same tool again unless you need different parameters
|
|
||||||
5. DO NOT leave text_response empty after receiving tool results
|
|
||||||
|
|
||||||
Example conversation flow:
|
Step 2 - Answer with the results:
|
||||||
- User: "What dungeons are in this ROM?"
|
- After receiving [TOOL RESULT], you MUST respond with: {"text_response": "Here is the answer...", "reasoning": "Now I have the data, I can answer"}
|
||||||
- You (first): {"tool_calls": [{"tool_name": "resource-list", "args": {"type": "dungeon"}}]}
|
- DO NOT call tools again in this step
|
||||||
- [Tool executes and returns: {"dungeons": ["Hyrule Castle", "Eastern Palace", ...]}]
|
- DO NOT leave text_response empty
|
||||||
- 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."}
|
|
||||||
|
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
|
# When to Use Tools vs Commands
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user