Publish NeMo Gym conversational tool-use assets
Browse files- README.md +13 -11
- conversational_tool_use_agent/prompts/agent_parallel_system.txt +12 -0
- conversational_tool_use_agent/prompts/agent_system.txt +12 -0
- conversational_tool_use_domain_generation/prompts/domain_followup.txt +1 -0
- conversational_tool_use_domain_generation/prompts/domain_generation.txt +20 -0
- conversational_tool_use_policy_tool_generation/prompts/cohesion_judge.txt +28 -0
- conversational_tool_use_policy_tool_generation/prompts/general_policy.txt +38 -0
- conversational_tool_use_policy_tool_generation/prompts/general_policy_refine.txt +27 -0
- conversational_tool_use_policy_tool_generation/prompts/general_tools.txt +20 -0
- conversational_tool_use_policy_tool_generation/prompts/golden_judge.txt +20 -0
- conversational_tool_use_policy_tool_generation/prompts/proactive_policy.txt +42 -0
- conversational_tool_use_policy_tool_generation/prompts/proactive_policy_refine.txt +35 -0
- conversational_tool_use_policy_tool_generation/prompts/proactive_tools.txt +21 -0
- conversational_tool_use_policy_tool_generation/prompts/tools_refine.txt +27 -0
- conversational_tool_use_scenario_generation/prompts/scenario_system.txt +7 -0
- conversational_tool_use_scenario_generation/prompts/scenario_user.txt +2 -0
- conversational_tool_use_simulation/prompts/agent_conversation_evaluation_system.txt +27 -0
- conversational_tool_use_simulation/prompts/agent_message_evaluation_system.txt +28 -0
- conversational_tool_use_simulation/prompts/complete_conversation.txt +3 -0
- conversational_tool_use_simulation/prompts/environment_conversation.txt +4 -0
- conversational_tool_use_simulation/prompts/environment_conversation_message.txt +3 -0
- conversational_tool_use_simulation/prompts/environment_message_evaluation_system.txt +32 -0
- conversational_tool_use_simulation/prompts/environment_simulator_system.txt +21 -0
- conversational_tool_use_simulation/prompts/environment_user_model_message.txt +2 -0
- conversational_tool_use_simulation/prompts/message_conversation.txt +7 -0
- conversational_tool_use_simulation/prompts/message_system_prefix.txt +14 -0
- conversational_tool_use_simulation/prompts/text_message.txt +4 -0
- conversational_tool_use_simulation/prompts/tool_call_message.txt +5 -0
- conversational_tool_use_simulation/prompts/tool_definition.txt +6 -0
- conversational_tool_use_simulation/prompts/tool_execution_message.txt +4 -0
- conversational_tool_use_simulation/prompts/user_agent_environment_conversation_evaluation_system.txt +42 -0
- conversational_tool_use_simulation/prompts/user_message_evaluation_system.txt +29 -0
- conversational_tool_use_simulation/prompts/user_simulator_system.txt +16 -0
README.md
CHANGED
|
@@ -5,21 +5,23 @@ pretty_name: NeMo Gym Conversational Tool-Use Assets
|
|
| 5 |
|
| 6 |
# NeMo Gym Conversational Tool-Use Assets
|
| 7 |
|
| 8 |
-
This dataset repository stores the
|
| 9 |
-
It is an asset bundle for Gym components, not a training or evaluation dataset.
|
| 10 |
|
| 11 |
## Contents
|
| 12 |
|
| 13 |
-
- `
|
| 14 |
-
|
| 15 |
-
- `conversational_tool_use_policy_tool_generation/
|
| 16 |
-
|
| 17 |
-
- `
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
|
| 23 |
```bash
|
| 24 |
-
python -m
|
| 25 |
```
|
|
|
|
| 5 |
|
| 6 |
# NeMo Gym Conversational Tool-Use Assets
|
| 7 |
|
| 8 |
+
This dataset repository stores the prompts and reference assets used by NeMo Gym's conversational tool-use generation
|
| 9 |
+
and simulation pipeline. It is an asset bundle for Gym components, not a training or evaluation dataset.
|
| 10 |
|
| 11 |
## Contents
|
| 12 |
|
| 13 |
+
- `conversational_tool_use_domain_generation/prompts`: domain generation and follow-up prompts.
|
| 14 |
+
- `conversational_tool_use_domain_generation/prompt_history`: historical domain-generation prompt revisions.
|
| 15 |
+
- `conversational_tool_use_policy_tool_generation/prompts`: policy, tool, refinement, and judge prompts.
|
| 16 |
+
- `conversational_tool_use_policy_tool_generation/golden_policies`: eight policy/tool reference pairs used in prompts.
|
| 17 |
+
- `conversational_tool_use_policy_tool_generation/prompt_history`: historical policy/tool-generation prompt revisions.
|
| 18 |
+
- `conversational_tool_use_scenario_generation/prompts`: scenario-generation system and user prompts.
|
| 19 |
+
- `conversational_tool_use_agent/prompts`: policy-agent system prompts for serial and parallel tool calls.
|
| 20 |
+
- `conversational_tool_use_simulation/prompts`: user simulator, tool simulator, and verifier prompt templates.
|
| 21 |
|
| 22 |
+
Run the conversational tool-use simulation resource server's preparation command once per checkout to download and
|
| 23 |
+
checksum-validate all runtime prompts and references:
|
| 24 |
|
| 25 |
```bash
|
| 26 |
+
python -m resources_servers.conversational_tool_use_simulation.prepare
|
| 27 |
```
|
conversational_tool_use_agent/prompts/agent_parallel_system.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a customer service agent that helps the user. The policy that determines how you should respond to requests from users is described below between the <policy> and </policy> tags.
|
| 2 |
+
|
| 3 |
+
In each turn you can either:
|
| 4 |
+
- Send a message to the user.
|
| 5 |
+
- Make one or more tool calls.
|
| 6 |
+
You cannot do both at the same time.
|
| 7 |
+
|
| 8 |
+
<policy>
|
| 9 |
+
{domain_policy}
|
| 10 |
+
</policy>
|
| 11 |
+
|
| 12 |
+
Try to be helpful and always follow the policy.
|
conversational_tool_use_agent/prompts/agent_system.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a customer service agent that helps the user. The policy that determines how you should respond to requests from users is described below between the <policy> and </policy> tags.
|
| 2 |
+
|
| 3 |
+
In each turn you can either:
|
| 4 |
+
- Send a message to the user.
|
| 5 |
+
- Make a tool call.
|
| 6 |
+
You cannot do both at the same time.
|
| 7 |
+
|
| 8 |
+
<policy>
|
| 9 |
+
{domain_policy}
|
| 10 |
+
</policy>
|
| 11 |
+
|
| 12 |
+
Try to be helpful and always follow the policy.
|
conversational_tool_use_domain_generation/prompts/domain_followup.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Do not repeat these domains. Try looking for other domains or find specific sub-domains.
|
conversational_tool_use_domain_generation/prompts/domain_generation.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Please give me list of all business/industry sectors that may benefit from having a customer-facing internet chatbot agent helper.
|
| 2 |
+
Imagine that the chatbot will have a set of executable tools that interface with a system to help the customer's needs.
|
| 3 |
+
Please generate at least 50 domains.
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
Please format your response as a JSON such as:
|
| 7 |
+
```json
|
| 8 |
+
[
|
| 9 |
+
{
|
| 10 |
+
"name": <name of item>,
|
| 11 |
+
"applications": [
|
| 12 |
+
{
|
| 13 |
+
"function": <name of functionality the chatbot can have that can help the user>
|
| 14 |
+
},
|
| 15 |
+
...
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
...
|
| 19 |
+
]
|
| 20 |
+
```
|
conversational_tool_use_policy_tool_generation/prompts/cohesion_judge.txt
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to judge the policy.md and tools.jsonl for an automated agent for the {domain} domain.
|
| 2 |
+
Specifically, you must make a judgment about how consistent and cohesive the policy and tools are to each other.
|
| 3 |
+
|
| 4 |
+
Setting:
|
| 5 |
+
1. policy.md
|
| 6 |
+
- The policy is what the automated chatbot agent bases their actions upon. It includes the background, the tools provided to the agent, and the constraints for the actions.
|
| 7 |
+
2. tools.jsonl
|
| 8 |
+
- The list of tools that the agent can use to interact with the underlying system to address the customer's needs. Each tool contains a full json specification for the usage / inputs / outputs of each tool.
|
| 9 |
+
|
| 10 |
+
Your task is as follows:
|
| 11 |
+
1. Carefully read the policy.md and tools.jsonl and understand their usage.
|
| 12 |
+
2. Check for inconsistencies:
|
| 13 |
+
- If there are references to tools in the policy that are not in the tools list.
|
| 14 |
+
- If there are tools in the tools list that are not referred to in the policy.
|
| 15 |
+
- If the description of the tool is consistent with its counterpart in the policy.
|
| 16 |
+
3. Check for cohesion:
|
| 17 |
+
- Even if the policy and tools are consistent to each other, they must have synergy. If the contents of the tools and the policy may cause confusion for the automated agent, there is low cohesion and the policy / tools are not a good match for each other.
|
| 18 |
+
4. Write your judgment between <judgment> </judgment> tags. Write 'true' if the policy.md and tools.jsonl is consistent and cohesive to each other, or 'false' if not.
|
| 19 |
+
|
| 20 |
+
Make sure to deliberate deeply and provide resoning before providing a judgment.
|
| 21 |
+
|
| 22 |
+
<policy.md>
|
| 23 |
+
{policy}
|
| 24 |
+
</policy.md>
|
| 25 |
+
|
| 26 |
+
<tools.jsonl>
|
| 27 |
+
{tools}
|
| 28 |
+
</tools.jsonl>
|
conversational_tool_use_policy_tool_generation/prompts/general_policy.txt
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to generate the policy.md file for an automated agent for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the policy for an automated chatbot agent that a customer to a business in the {domain} domain can interact with.
|
| 3 |
+
A reference policy and tools is provided to help show an example output for the task.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Think about the {domain} domain and consider businesses that can span from that domain.
|
| 7 |
+
2. Choose a specific business that can benefit from deploying a chatbot agent that the business' customers can interact with for business-related tasks.
|
| 8 |
+
3. Deliberate about the tools that the chatbot agent can use to interact with an underlying system to resolve a customer's needs. Your tools can be in camel case or snake case. Think of at least 10 tools that can be used by the policy.
|
| 9 |
+
4. Create a policy.md file for the chatbot agent between <policy> </policy> tags.
|
| 10 |
+
|
| 11 |
+
When writing the policy, consider:
|
| 12 |
+
- Include the current time in the policy the model can refer to, which is {timestamp}.
|
| 13 |
+
- Add a statement to avoid answering questions that the chatbot isn’t qualified to handle—especially those that require advice not based on the policy.
|
| 14 |
+
- Always include a way for the agent to escalate the user's concerns to a real human or transfer to a human agent. When escalating, the model must tell the customer they are being transferred to a human agent.
|
| 15 |
+
|
| 16 |
+
In addition, you must add an agent limitations section that contains information regarding never taking actions not defined by the given tools or assuming any information was verified / actions were taken unless explicitly done through a tool execution.
|
| 17 |
+
It should contain in the minimum these core values:
|
| 18 |
+
- Do not answer questions or perform actions outside defined tool capabilities
|
| 19 |
+
- Never assume verification or action completion without explicit tool confirmation
|
| 20 |
+
|
| 21 |
+
You must also include the following sections:
|
| 22 |
+
1. A section for basic components and objects relevant to the policy:
|
| 23 |
+
- For example, the idea of a user (e.g. with name, email, etc) and business-specific objects (e.g. reservation for retail/airline/etc, tickets for service, etc.)
|
| 24 |
+
- This section does not have to be too detailed
|
| 25 |
+
- Design the objects so that tool parameters can be primitives, not full objects.
|
| 26 |
+
2. Sections for constraints and limitations relevant to interactions with such objects.
|
| 27 |
+
- For example, if this is an airline policy, there must be constraints for reservation changes, seat changes, baggage policies, etc.
|
| 28 |
+
- This is the most important part of the policy, and you must think hard and write a concise yet believable constraints.
|
| 29 |
+
|
| 30 |
+
Do not include the following in the policy:
|
| 31 |
+
- Tools that call other generative models such as pdfs / images / videos should not be added nor considered.
|
| 32 |
+
|
| 33 |
+
The policy.md is not a description of the business nor a helpful instruction to the agent.
|
| 34 |
+
Instead, it is a strict description of *how* the model should act and *what* constraints there are to its capabilities.
|
| 35 |
+
|
| 36 |
+
Make sure that the policy has an emphasis on customer service related to the business in the domain {domain}.
|
| 37 |
+
Do not make the generated policy sound like an example template. Make it highly specialized for the specific chatbot and business as if this were a real policy that could be used immediately.
|
| 38 |
+
Ensure that the style, brevity, and realism of the generated policy be akin to the reference policies.
|
conversational_tool_use_policy_tool_generation/prompts/general_policy_refine.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to edit the policy.md file for an automated agent for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the policy for an automated chatbot agent that a customer to a business in the {domain} domain can interact with.
|
| 3 |
+
You are given a list of reference policies to serve as a guidance for your policy generation.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Carefully read the reference policies and understand the brevity, realism, and style of each.
|
| 7 |
+
2. Find out areas of interest in the current policy that is too verbose, over-detailed, and unnecessary, and remove or edit such parts to mimic the level of detail in the reference policies.
|
| 8 |
+
3. Find out parts of the current policy that lack realism and refine such parts to the level of realism in the reference policies.
|
| 9 |
+
4. Find out styling issues in the current policy and correct them to a coherent styling.
|
| 10 |
+
5. Edit any sections where the agent send emails or texts to the user, as verification should be done by asking the user for their identifying information instead of text codes or etc.
|
| 11 |
+
6. Ensure that there is an explicit agent limitations section setting out clear instructions to avoid answering any questions or take any actions that are not covered by the underlying set of tools, and to not assume any information was verified or action was taken without explicit tool executions.
|
| 12 |
+
7. Write the new policy.md file for the chatbot agent between <policy> </policy> tags.
|
| 13 |
+
|
| 14 |
+
Make sure the agent limitations section contains in the minimum these core values:
|
| 15 |
+
- Do not answer questions or perform actions outside defined tool capabilities
|
| 16 |
+
- Never assume verification or action completion without explicit tool confirmation
|
| 17 |
+
|
| 18 |
+
When writing the policy, consider:
|
| 19 |
+
- Keep all original keywords and ideas from the policy.
|
| 20 |
+
|
| 21 |
+
The new policy should be ready to be directly deployed as the {domain} agent's policy.
|
| 22 |
+
|
| 23 |
+
{reference_policies}
|
| 24 |
+
|
| 25 |
+
<original_policy>
|
| 26 |
+
{policy}
|
| 27 |
+
</original_policy>
|
conversational_tool_use_policy_tool_generation/prompts/general_tools.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to generate the tools.jsonl file for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the tools specification for an automated chatbot agent that assists a customer based on the given policy.
|
| 3 |
+
A reference policy and tools is provided to help show an example output for the task.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Read and think about the provided policy and list out the tools that are mentioned in the policy or should exist to support the agent's actions in the policy.
|
| 7 |
+
2. Deliberate about the input properties and the return types of the tools.
|
| 8 |
+
4. Devise a description and docstring for each tool, as it will be provided to the agent to to be used for interaction with a downstream system.
|
| 9 |
+
5. Create a functional json specification of the tools with correct formatting. Each tool must have the top level keys 'name', 'doc', 'params', and 'returns' with deeper keys including 'properties', 'required' and typing keys as necessary.
|
| 10 |
+
6. Write the tools.jsonl file for the chatbot agent between <tools> </tools> tags.
|
| 11 |
+
|
| 12 |
+
In addition to the tools in the policy, consider:
|
| 13 |
+
1. The created tools must cover all use cases in the policy. The agent should not be able to perform any concrete action without the use of tools.
|
| 14 |
+
2. Likewise, all actions that the policy can make the user take must be grounded on the agent's use of tools.
|
| 15 |
+
3. Always add an escalation tool, which should be simple and only include a parameter for a summary.
|
| 16 |
+
4. Return types must be explicit and simple. Do not use 'returns' as a return type property name.
|
| 17 |
+
|
| 18 |
+
Do not write the actual code for tools. Only generate the tool specifications in the form of a jsonl.
|
| 19 |
+
You must include all tools listed in the original policy.
|
| 20 |
+
Ensure that the style, detail, and realism of the generated policy be akin to the reference policies.
|
conversational_tool_use_policy_tool_generation/prompts/golden_judge.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to judge the policy.md and tools.jsonl for an automated agent.
|
| 2 |
+
Specifically, given a list of (policy, tools) pairs that are intended for use by a chatbot agent, choose the worst set of policy and tools that you believe will not work in a real-life setting.
|
| 3 |
+
|
| 4 |
+
Setting:
|
| 5 |
+
1. policy.md
|
| 6 |
+
- The policy is what the automated chatbot agent bases their actions upon. It includes the background, the tools provided to the agent, and the constraints for the actions.
|
| 7 |
+
2. tools.jsonl
|
| 8 |
+
- The list of tools that the agent can use to interact with the underlying system to address the customer's needs. Each tool contains a full json specification for the usage / inputs / outputs of each tool.
|
| 9 |
+
|
| 10 |
+
Your task is as follows:
|
| 11 |
+
1. Carefully read the policy.md and tools.jsonl pairs for all the provided chatbots.
|
| 12 |
+
2. Check for styling:
|
| 13 |
+
- If the policy is well-written, the content is cohesive and the style is consistent.
|
| 14 |
+
- If the tools specifications are complete, make sense in the context of the policy and have no errors.
|
| 15 |
+
3. Check for realism and functional value:
|
| 16 |
+
- If the policy and tools have real-life use cases and functionalities rather than being toy problems.
|
| 17 |
+
- If the policy and tools are adopted by an automated chatbot agent, if the agent will bring real value to a business and their customers.
|
| 18 |
+
4. Write your judgment between <judgment> </judgment> tags. For the judgment, Write the index of the single worst policy/tools pair.
|
| 19 |
+
|
| 20 |
+
Make sure to deliberate deeply and provide resoning before providing a judgment.
|
conversational_tool_use_policy_tool_generation/prompts/proactive_policy.txt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to generate the policy.md file for an automated agent for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the policy for an automated chatbot agent that a customer to a business in the {domain} domain can interact with.
|
| 3 |
+
A reference policy and tools is provided to help show an example output for the task.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Think about the {domain} domain and consider businesses that can span from that domain.
|
| 7 |
+
2. Choose a specific business that can benefit from deploying a chatbot agent that the business' customers can interact with for business-related tasks.
|
| 8 |
+
3. Deliberate about the tools that the chatbot agent can use to interact with an underlying system to resolve a customer's needs. Your tools can be in camel case or snake case. Think of at least 10 tools that can be used by the policy.
|
| 9 |
+
4. Create a policy.md file for the chatbot agent between <policy> </policy> tags.
|
| 10 |
+
|
| 11 |
+
When writing the policy, consider:
|
| 12 |
+
- Include the current time in the policy the model can refer to, which is {timestamp}.
|
| 13 |
+
- Add a statement to avoid answering questions that the chatbot isn’t qualified to handle—especially those that require advice not based on the policy.
|
| 14 |
+
- Always include a way for the agent to escalate the user's concerns to a real human or transfer to a human agent. When escalating, the model must tell the customer they are being transferred to a human agent.
|
| 15 |
+
|
| 16 |
+
Make sure the policy contains at least:
|
| 17 |
+
- A few sections for different functionalities of the customer service agent (i.e. enrollment changes, booking modifications, etc).
|
| 18 |
+
- At least one functionality which requires proactive asking from the agent to the user (i.e. can you confirm if you received the invoice? (after sending an invoice and before posting the new payment) or can you check your new status? (after making a status change request and before executing next action)).
|
| 19 |
+
|
| 20 |
+
In addition, you must add an agent limitations section that contains information regarding never taking actions not defined by the given tools or assuming any information was verified / actions were taken unless explicitly done through a tool execution.
|
| 21 |
+
It should contain in the minimum these core values:
|
| 22 |
+
- Do not answer questions or perform actions outside defined tool capabilities
|
| 23 |
+
- Never assume verification or action completion without explicit tool confirmation
|
| 24 |
+
|
| 25 |
+
You must also include the following sections:
|
| 26 |
+
1. A section for basic components and objects relevant to the policy:
|
| 27 |
+
- For example, the idea of a user (e.g. with name, email, etc) and business-specific objects (e.g. reservation for retail/airline/etc, tickets for service, etc.)
|
| 28 |
+
- This section does not have to be too detailed
|
| 29 |
+
- Design the objects so that tool parameters can be primitives, not full objects.
|
| 30 |
+
2. Sections for constraints and limitations relevant to interactions with such objects.
|
| 31 |
+
- For example, if this is an airline policy, there must be constraints for reservation changes, seat changes, baggage policies, etc.
|
| 32 |
+
- This is the most important part of the policy, and you must think hard and write a concise yet believable constraints.
|
| 33 |
+
|
| 34 |
+
Do not include the following in the policy:
|
| 35 |
+
- Tools that call other generative models such as pdfs / images / videos should not be added nor considered.
|
| 36 |
+
|
| 37 |
+
The policy.md is not a description of the business nor a helpful instruction to the agent.
|
| 38 |
+
Instead, it is a strict description of *how* the model should act and *what* constraints there are to its capabilities.
|
| 39 |
+
|
| 40 |
+
Make sure that the policy has an emphasis on customer service related to the business in the domain {domain}.
|
| 41 |
+
Do not make the generated policy sound like an example template. Make it highly specialized for the specific chatbot and business as if this were a real policy that could be used immediately.
|
| 42 |
+
Ensure that the style, brevity, and realism of the generated policy be akin to the reference policies.
|
conversational_tool_use_policy_tool_generation/prompts/proactive_policy_refine.txt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to edit the policy.md file for an automated agent for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the policy for an automated chatbot agent that a customer to a business in the {domain} domain can interact with.
|
| 3 |
+
|
| 4 |
+
Your task is as follows:
|
| 5 |
+
1. Carefully read the given policy and understand the brevity, realism, and style of each.
|
| 6 |
+
2. Find out areas of interest in the current policy that is too verbose, over-detailed, and unnecessary, and remove or edit such parts to maintain usability of the policy.
|
| 7 |
+
3. Find out parts of the current policy that lack realism and refine such parts to the level of realism of a real customer service agent.
|
| 8 |
+
4. Find out styling issues in the current policy and correct them to a coherent styling.
|
| 9 |
+
5. Ensure that there is an explicit agent limitations section setting out clear instructions to avoid answering any questions or take any actions that are not covered by the underlying set of tools, and to not assume any information was verified or action was taken without explicit tool executions.
|
| 10 |
+
6. Ensure there is a domain basics section which writes out succinctly key objects and their fields relating to the domain the policy is based in.
|
| 11 |
+
7. Edit out / remove an explicit section for a list of tools.
|
| 12 |
+
8. Write the new policy.md file for the chatbot agent between <policy> </policy> tags.
|
| 13 |
+
|
| 14 |
+
Make sure the policy contains at least:
|
| 15 |
+
- A few sections for different functionalities of the customer service agent (i.e. enrollment changes, booking modifications, etc).
|
| 16 |
+
- At least one functionality which requires proactive asking from the agent to the user (i.e. can you confirm if you received the invoice? (after sending an invoice and before posting the new payment) or can you check your new status? (after making a status change request and before executing next action)).
|
| 17 |
+
|
| 18 |
+
If there is a section for verifying the identity of the user through a code confirmation sent through SMS / email, make sure the policy explicitly instructs the agent to:
|
| 19 |
+
1. Ask the user for their email / phone number
|
| 20 |
+
2. Call a code-sending tool to send an authentication code to the user at their email / number
|
| 21 |
+
3. Receive the code back from the user
|
| 22 |
+
4. Authenticate the code against the database by calling a verification tool on the code the user provides.
|
| 23 |
+
|
| 24 |
+
Make sure the agent limitations section contains in the minimum these core values:
|
| 25 |
+
- Do not answer questions or perform actions outside defined tool capabilities
|
| 26 |
+
- Never assume verification or action completion without explicit tool confirmation
|
| 27 |
+
|
| 28 |
+
When writing the policy, consider:
|
| 29 |
+
- Keep all original keywords and ideas from the policy.
|
| 30 |
+
|
| 31 |
+
The new policy should be ready to be directly deployed as the {domain} agent's policy.
|
| 32 |
+
|
| 33 |
+
<original_policy>
|
| 34 |
+
{policy}
|
| 35 |
+
</original_policy>
|
conversational_tool_use_policy_tool_generation/prompts/proactive_tools.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to generate the tools.jsonl file for the {domain} domain.
|
| 2 |
+
Specifically, you will be writing the tools specification for an automated chatbot agent that assists a customer based on the given policy.
|
| 3 |
+
A reference policy and tools is provided to help show an example output for the task.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Read and think about the provided policy and list out the tools that are mentioned in the policy or should exist to support the agent's actions in the policy.
|
| 7 |
+
2. Deliberate about the input properties and the return types of the tools.
|
| 8 |
+
4. Devise a description and docstring for each tool, as it will be provided to the agent to to be used for interaction with a downstream system.
|
| 9 |
+
5. Create a functional json specification of the tools with correct formatting. Each tool must have the top level keys 'name', 'doc', 'params', and 'returns' with deeper keys including 'properties', 'required' and typing keys as necessary.
|
| 10 |
+
6. Write the tools.jsonl file for the chatbot agent between <tools> </tools> tags.
|
| 11 |
+
|
| 12 |
+
In addition to the tools in the policy, consider:
|
| 13 |
+
1. The created tools must cover all use cases in the policy. The agent should not be able to perform any concrete action without the use of tools.
|
| 14 |
+
2. For instance, if verification is done by sending the user a verification code, make sure there is a tool to send the verification code to the user (after asking the user for their email / phone number) and there is a tool to verify the code the user mentions after.
|
| 15 |
+
3. Likewise, all actions that the policy can make the user take must be grounded on the agent's use of tools.
|
| 16 |
+
4. Always add an escalation tool, which should be simple and only include a parameter for a summary.
|
| 17 |
+
5. Return types must be explicit and simple. Do not use 'returns' as a return type property name.
|
| 18 |
+
|
| 19 |
+
Do not write the actual code for tools. Only generate the tool specifications in the form of a jsonl.
|
| 20 |
+
You must include all tools listed in the original policy.
|
| 21 |
+
Ensure that the style, detail, and realism of the generated policy be akin to the reference policies.
|
conversational_tool_use_policy_tool_generation/prompts/tools_refine.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your job is to edit the tools.jsonl file for the {domain} domain given the policy.md.
|
| 2 |
+
Specifically, you will be writing the tools specification for an automated chatbot agent that assists a customer based on the given policy.
|
| 3 |
+
You are given a list of reference tools to serve as a guidance for your tool generation.
|
| 4 |
+
|
| 5 |
+
Your task is as follows:
|
| 6 |
+
1. Carefully read the provided policy.md and existing tools.jsonl and check if the original tools fit naturally for the use cases of the policy.
|
| 7 |
+
2. If a tool is referenced in the policy but omitted in the tools.jsonl, draft a new tool specification to be provided to the agent based on the description in the policy.
|
| 8 |
+
3. If an existing tool's execution result must be followed up with another tool, make sure that follow-up tool exists. If it does not exist, create the tool.
|
| 9 |
+
4. If the user can take any action based on the agent's directions as per the policy, make sure that agent's directions are grounded on a tool that exists. If it does not exist, create the tool.
|
| 10 |
+
5. Write the edited tools.jsonl file for the chatbot agent between <tools> </tools> tags.
|
| 11 |
+
|
| 12 |
+
When writing the the tools list, consider:
|
| 13 |
+
1. Do not change the original tools list too much unless needed.
|
| 14 |
+
2. For existing tools, if they should not be edited, leave them as they are. For tools that must be added or edited, make sure they match the styling of the existing tools and the specifications in the policy.
|
| 15 |
+
3. Make sure to create a functional json specification of the tools with correct formatting. Each tool must have the top level keys 'name', 'doc', 'params', and 'returns' with deeper keys including 'properties', 'required' and typing keys as necessary.
|
| 16 |
+
4. Return types must be explicit and simple. Do not use 'returns' as a return type property name.
|
| 17 |
+
|
| 18 |
+
Do not write the actual code for tools. Only generate the tool specifications in the form of a jsonl.
|
| 19 |
+
You must include all tools listed in the policy.
|
| 20 |
+
|
| 21 |
+
<policy>
|
| 22 |
+
{policy}
|
| 23 |
+
</policy>
|
| 24 |
+
|
| 25 |
+
<original_tools.jsonl>
|
| 26 |
+
{tools}
|
| 27 |
+
</original_tools.jsonl>
|
conversational_tool_use_scenario_generation/prompts/scenario_system.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Your task is to create example customer scenarios within a specified setting. In the setting, a customer service representative responds to requests for assistance from customers. The way that the representative handles requests is described below between the <policy> and </policy> tags.
|
| 2 |
+
|
| 3 |
+
<policy>
|
| 4 |
+
{domain_policy}
|
| 5 |
+
</policy>
|
| 6 |
+
|
| 7 |
+
Each customer scenario should describe the customer and the tasks that the customer is trying to complete by contacting the representative. Please make sure that in each scenario, the policy {policy_scope_instruction} the way the representative should handle a request that the customer would make to the representative to complete their tasks.
|
conversational_tool_use_scenario_generation/prompts/scenario_user.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Please create {scenario_count} different customer scenarios that describe customers who would contact the representative to complete tasks. Please output the collection of customer scenarios using the following JSON schema:
|
| 2 |
+
{scenarios_schema}
|
conversational_tool_use_simulation/prompts/agent_conversation_evaluation_system.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate the actions taken by a customer service representative in an interaction between a customer and the representative.
|
| 3 |
+
- The steps in the interaction are shown in order between the <steps> and </steps> tags.
|
| 4 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 5 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 6 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 7 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 8 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 9 |
+
- The definitions of the tools that are available to the representative for execution are provided below between the <tools> and </tools> tags, with each tool definition appearing between <tool> and </tool> tags.
|
| 10 |
+
- Whenever the representative takes an action, the representative can either send a message to the customer, or execute a tool.
|
| 11 |
+
- The actions of the representative should be considered a success if they are helpful in addressing the request from the customer.
|
| 12 |
+
- The actions of the representative should be considered a failure if they do not help to handle the customer's request, or are not consistent with the steps in the interaction that precede them or the policy for handling customer requests.
|
| 13 |
+
|
| 14 |
+
<policy>
|
| 15 |
+
{policy}
|
| 16 |
+
</policy>
|
| 17 |
+
|
| 18 |
+
<tools>
|
| 19 |
+
{tool_definitions}
|
| 20 |
+
</tools>
|
| 21 |
+
|
| 22 |
+
- The representative can transfer the customer to another agent. This should be done if the customer's request cannot be handled by the representative according to the policy, but should not be done if the representative can handle the request under the policy.
|
| 23 |
+
- In this interaction, the representative should {transfer_instruction}transfer the customer to another agent.
|
| 24 |
+
- The actions of the representative should be considered a failure if the representative transfers the customer to another agent when they should not transfer the customer, or if the representative does not transfer the customer to another agent when they should transfer the customer.
|
| 25 |
+
|
| 26 |
+
Please output the evaluation of the actions taken by the customer service representative and an explanation for the evaluation using the following JSON schema:
|
| 27 |
+
{evaluation_schema}
|
conversational_tool_use_simulation/prompts/agent_message_evaluation_system.txt
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate one step in an interaction between a customer and a customer service representative.
|
| 3 |
+
- The previous steps in the interaction are shown in order between the <previous_steps> and </previous_steps> tags.
|
| 4 |
+
- The step that you are to evaluate is the current step, which is shown between the <current_step> and </current_step> tags.
|
| 5 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 6 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 7 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 8 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 9 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 10 |
+
|
| 11 |
+
<policy>
|
| 12 |
+
{policy}
|
| 13 |
+
</policy>
|
| 14 |
+
|
| 15 |
+
- The definitions of the tools that are available to the representative for execution are provided below between the <tools> and </tools> tags, with each tool definition appearing between <tool> and </tool> tags.
|
| 16 |
+
|
| 17 |
+
<tools>
|
| 18 |
+
{tool_definitions}
|
| 19 |
+
</tools>
|
| 20 |
+
|
| 21 |
+
- The current step that you are to evaluate is an action by the representative.
|
| 22 |
+
- The representative can either send a message to the customer, or execute a tool.
|
| 23 |
+
- The current step should be considered a success if the action taken by the representative is helpful in addressing the request from the customer.
|
| 24 |
+
- The current step should be considered a failure if the action taken by the representative does not help to handle the customer's request, or is not consistent with the previous steps in the interaction or the policy for handling customer requests.
|
| 25 |
+
- If the current step is the execution of a tool, then the current step should be considered a success if the tool to be executed helps to address the customer's request, the arguments for the tool execution conform to the tool definition, and the arguments are consistent with the previous steps in the conversation. Otherwise, the current step should be considered a failure.
|
| 26 |
+
|
| 27 |
+
Please output the evaluation of the current step and an explanation for the evaluation using the following JSON schema:
|
| 28 |
+
{evaluation_schema}
|
conversational_tool_use_simulation/prompts/complete_conversation.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<steps>
|
| 2 |
+
{steps}
|
| 3 |
+
</steps>
|
conversational_tool_use_simulation/prompts/environment_conversation.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<conversation>
|
| 2 |
+
{conversation}
|
| 3 |
+
</conversation>
|
| 4 |
+
|
conversational_tool_use_simulation/prompts/environment_conversation_message.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<{sender}>
|
| 2 |
+
{message}
|
| 3 |
+
</{sender}>
|
conversational_tool_use_simulation/prompts/environment_message_evaluation_system.txt
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate one step in an interaction between a customer and a customer service representative.
|
| 3 |
+
- The previous steps in the interaction are shown in order between the <previous_steps> and </previous_steps> tags.
|
| 4 |
+
- The step that you are to evaluate is the current step, which is shown between the <current_step> and </current_step> tags.
|
| 5 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 6 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 7 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 8 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 9 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 10 |
+
|
| 11 |
+
<policy>
|
| 12 |
+
{policy}
|
| 13 |
+
</policy>
|
| 14 |
+
|
| 15 |
+
- The scenario that describes the customer and the tasks they are trying to complete is shown below between the <scenario> and </scenario> tags.
|
| 16 |
+
- The definitions of the tools that are available for execution are provided below between the <tools> and </tools> tags, with each tool definition appearing between <tool> and </tool> tags.
|
| 17 |
+
|
| 18 |
+
<scenario>
|
| 19 |
+
{customer_scenario}
|
| 20 |
+
</scenario>
|
| 21 |
+
|
| 22 |
+
<tools>
|
| 23 |
+
{tool_definitions}
|
| 24 |
+
</tools>
|
| 25 |
+
|
| 26 |
+
- The current step that you are to evaluate is the result of executing a tool.
|
| 27 |
+
- The previous step in the interaction should specify the tool to be executed and the arguments for execution.
|
| 28 |
+
- The current step should be considered a success if the tool execution result conforms to the definition of the tool being executed, and is consistent with the information about the customer in the scenario and the previous steps in the interaction.
|
| 29 |
+
- The current step should be considered a failure if the tool execution result is not consistent with the definition of the tool being executed, the information about the customer in the scenario, or the previous steps in the interaction.
|
| 30 |
+
|
| 31 |
+
Please output the evaluation of the current step and an explanation for the evaluation using the following JSON schema:
|
| 32 |
+
{evaluation_schema}
|
conversational_tool_use_simulation/prompts/environment_simulator_system.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to generate the result of executing a tool.
|
| 3 |
+
- The tool is executed by a customer service representative in the context of a conversation with a customer to retrieve information or accomplish a task.
|
| 4 |
+
- The conversation between the customer and the representative is shown between <conversation> and </conversation> tags, with each message sent by the customer appearing between <customer> and </customer> tags, and each message sent by the customer service representative appearing between <representative> and </representative> tags.
|
| 5 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 6 |
+
- The scenario that describes the customer and the tasks that they are trying to complete is shown below between the <scenario> and </scenario> tags.
|
| 7 |
+
- The definitions of the available tools are provided below between the <tools> and </tools> tags, with each tool definition appearing between <tool> and </tool> tags.
|
| 8 |
+
|
| 9 |
+
<policy>
|
| 10 |
+
{domain_policy}
|
| 11 |
+
</policy>
|
| 12 |
+
|
| 13 |
+
<scenario>
|
| 14 |
+
{customer_scenario}
|
| 15 |
+
</scenario>
|
| 16 |
+
|
| 17 |
+
<tools>
|
| 18 |
+
{tool_definitions}
|
| 19 |
+
</tools>
|
| 20 |
+
|
| 21 |
+
Please make sure that the tool execution result that you generate is consistent with the definition of the tool being executed, the information about the customer in the scenario, and the previous conversation between the customer and the representative. Please output only the execution result of the tool that is to be executed.
|
conversational_tool_use_simulation/prompts/environment_user_model_message.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{conversation}Tool to execute: {tool_name}
|
| 2 |
+
Arguments for tool execution: {arguments}
|
conversational_tool_use_simulation/prompts/message_conversation.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<previous_steps>
|
| 2 |
+
{previous_steps}
|
| 3 |
+
</previous_steps>
|
| 4 |
+
|
| 5 |
+
<current_step>
|
| 6 |
+
{current_step}
|
| 7 |
+
</current_step>
|
conversational_tool_use_simulation/prompts/message_system_prefix.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate one step in an interaction between a customer and a customer service representative.
|
| 3 |
+
- The previous steps in the interaction are shown in order between the <previous_steps> and </previous_steps> tags.
|
| 4 |
+
- The step that you are to evaluate is the current step, which is shown between the <current_step> and </current_step> tags.
|
| 5 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 6 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 7 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 8 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 9 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 10 |
+
|
| 11 |
+
<policy>
|
| 12 |
+
{policy}
|
| 13 |
+
</policy>
|
| 14 |
+
|
conversational_tool_use_simulation/prompts/text_message.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<message>
|
| 2 |
+
Sender: {sender}
|
| 3 |
+
Content: {content}
|
| 4 |
+
</message>
|
conversational_tool_use_simulation/prompts/tool_call_message.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<execute_tool>
|
| 2 |
+
Execution ID: {execution_id}
|
| 3 |
+
Tool name: {tool_name}
|
| 4 |
+
Arguments for execution: {arguments}
|
| 5 |
+
</execute_tool>
|
conversational_tool_use_simulation/prompts/tool_definition.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<tool>
|
| 2 |
+
Name: {name}
|
| 3 |
+
Documentation: {documentation}
|
| 4 |
+
Parameters in JSON Schema format: {parameters}
|
| 5 |
+
Return type in JSON Schema format: {return_type}
|
| 6 |
+
</tool>
|
conversational_tool_use_simulation/prompts/tool_execution_message.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<tool_result>
|
| 2 |
+
Execution ID: {execution_id}
|
| 3 |
+
Execution result: {execution_result}
|
| 4 |
+
</tool_result>
|
conversational_tool_use_simulation/prompts/user_agent_environment_conversation_evaluation_system.txt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate an interaction between a customer and a customer service representative.
|
| 3 |
+
- Please evaluate separately the actions of the customer, the actions of the representative, and the tool results in the interaction.
|
| 4 |
+
- The steps in the interaction are shown in order between the <steps> and </steps> tags.
|
| 5 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 6 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 7 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 8 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 9 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 10 |
+
- The definitions of the tools that are available to the representative for execution are provided below between the <tools> and </tools> tags, with each tool definition appearing between <tool> and </tool> tags.
|
| 11 |
+
- The scenario that describes the customer and the tasks they are trying to complete is shown below between the <scenario> and </scenario> tags.
|
| 12 |
+
|
| 13 |
+
<policy>
|
| 14 |
+
{policy}
|
| 15 |
+
</policy>
|
| 16 |
+
|
| 17 |
+
<tools>
|
| 18 |
+
{tool_definitions}
|
| 19 |
+
</tools>
|
| 20 |
+
|
| 21 |
+
<scenario>
|
| 22 |
+
{customer_scenario}
|
| 23 |
+
</scenario>
|
| 24 |
+
|
| 25 |
+
- The goal of the customer is to complete the tasks described in the scenario by communicating with the representative, while maintaining consistency with the information about the customer in the scenario.
|
| 26 |
+
- The actions of the customer should be considered a success if they follow naturally from the interaction with the representative and are consistent with the scenario.
|
| 27 |
+
- The actions of the customer should be considered a failure if they do not advance the interaction or are not consistent with the scenario.
|
| 28 |
+
- The customer should send the message '{complete_indicator}' to end the interaction with the representative when their tasks have been completed.
|
| 29 |
+
- The customer should send the message '{transfer_indicator}' when they have been transferred to another agent by the representative.
|
| 30 |
+
- The actions of the customer should be considered a failure if the customer ends the interaction when their tasks have not yet been completed, or sends the message '{transfer_indicator}' when they have not yet been transferred to another agent by the representative.
|
| 31 |
+
- Whenever the representative takes an action, the representative can either send a message to the customer, or execute a tool.
|
| 32 |
+
- The actions of the representative should be considered a success if they are helpful in addressing the request from the customer.
|
| 33 |
+
- The actions of the representative should be considered a failure if they do not help to handle the customer's request, or are not consistent with the steps in the interaction that precede them or the policy for handling customer requests.
|
| 34 |
+
- The representative can transfer the customer to another agent. This should be done if the customer's request cannot be handled by the representative according to the policy, but should not be done if the representative can handle the request under the policy.
|
| 35 |
+
- In this interaction, the representative should {transfer_instruction}transfer the customer to another agent.
|
| 36 |
+
- The actions of the representative should be considered a failure if the representative transfers the customer to another agent when they should not transfer the customer, or if the representative does not transfer the customer to another agent when they should transfer the customer.
|
| 37 |
+
- When the representative executes a tool, the tool execution step should specify the tool to be executed and the arguments for execution, and the next step should be the result of executing the tool.
|
| 38 |
+
- The tool results in the interaction should be considered a success if they conform to the definitions of the tools being executed, and are consistent with the arguments for execution, the information about the customer in the scenario, the interaction between the customer and the representative, and each other.
|
| 39 |
+
- The tool results in the interaction should be considered a failure if they are not consistent with the definitions of the tools being executed, the arguments for execution, the information about the customer in the scenario, the interaction between the customer and the representative, or each other.
|
| 40 |
+
|
| 41 |
+
Please output the evaluation of the actions taken by the customer, the evaluation of the actions taken by the customer service representative, the evaluation of the tool results in the interaction, and explanations for the evaluations using the following JSON schema:
|
| 42 |
+
{evaluation_schema}
|
conversational_tool_use_simulation/prompts/user_message_evaluation_system.txt
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- Your task is to evaluate one step in an interaction between a customer and a customer service representative.
|
| 3 |
+
- The previous steps in the interaction are shown in order between the <previous_steps> and </previous_steps> tags.
|
| 4 |
+
- The step that you are to evaluate is the current step, which is shown between the <current_step> and </current_step> tags.
|
| 5 |
+
- Each step in the interaction is either a message from the customer to the representative, a message from the representative to the customer, the execution of a tool, or the result of executing a tool.
|
| 6 |
+
- A message from the customer to the representative or from the representative to the customer is shown between <message> and </message> tags.
|
| 7 |
+
- An execution of a tool can be requested by the representative, and is shown between <execute_tool> and </execute_tool> tags.
|
| 8 |
+
- When the representative requests the execution of a tool, the next step in the interaction should be the result of executing the tool, which is shown between <tool_result> and </tool_result> tags.
|
| 9 |
+
- The way that the representative handles customer requests is described below between the <policy> and </policy> tags.
|
| 10 |
+
|
| 11 |
+
<policy>
|
| 12 |
+
{policy}
|
| 13 |
+
</policy>
|
| 14 |
+
|
| 15 |
+
- The scenario that describes the customer and the tasks they are trying to complete is shown below between the <scenario> and </scenario> tags.
|
| 16 |
+
|
| 17 |
+
<scenario>
|
| 18 |
+
{customer_scenario}
|
| 19 |
+
</scenario>
|
| 20 |
+
|
| 21 |
+
- The current step that you are to evaluate is a message from the customer to the representative.
|
| 22 |
+
- The current step should be considered a success if the message from the customer to the representative follows naturally from the previous steps in the interaction and is consistent with the information about the customer in the scenario.
|
| 23 |
+
- If the message from the customer to the representative in the current step does not advance the interaction, is not consistent with the scenario, or is not consistent with the previous steps in the interaction, then the current step should be considered a failure.
|
| 24 |
+
- If the current step is the first step in the interaction, then it should be considered a success if it is consistent with the scenario, and it should be considered a failure if it is not consistent with the scenario. A first step can be successful even if the customer does not include some information that would be needed by the representative, because the representative can request the information from the customer in later steps.
|
| 25 |
+
- The customer will send the message '{complete_indicator}' to indicate that they would like to end the interaction with the representative. If the current step contains this message, then it should be considered a success if the customer's tasks have been completed by the interaction, and it should be considered a failure if the customer's tasks have not yet been completed.
|
| 26 |
+
- The customer will send the message '{transfer_indicator}' to indicate that they have been transferred to another agent by the representative. If the current step contains this message, then it should be considered a success if the representative previously transferred the customer to another agent, and it should be considered a failure if the representative has not yet transferred the customer to another agent.
|
| 27 |
+
|
| 28 |
+
Please output the evaluation of the current step and an explanation for the evaluation using the following JSON schema:
|
| 29 |
+
{evaluation_schema}
|
conversational_tool_use_simulation/prompts/user_simulator_system.txt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Instructions
|
| 2 |
+
- You are playing the role of a customer contacting a customer service representative.
|
| 3 |
+
- The scenario that describes the customer that you are acting as and the tasks that are to be completed is included below between the <scenario> and </scenario> tags.
|
| 4 |
+
- Strictly follow the instructions in the scenario description.
|
| 5 |
+
- To start a conversation, please make a request to the customer service representative in order to complete the tasks described in the scenario.
|
| 6 |
+
- Generate one message at a time, maintaining natural conversation flow.
|
| 7 |
+
- Each message should be a message from a customer to the representative.
|
| 8 |
+
- The goal is to continue the conversation until the tasks are complete.
|
| 9 |
+
- If the tasks have been completed during the previous messages in the interaction with the customer service representative, then instead of generating a message, output just '{complete_indicator}' to indicate that the conversation should end.
|
| 10 |
+
- If you are transferred to another agent by the customer service representative in a previous message in the conversation, then instead of generating a message, output just '{transfer_indicator}' to indicate the transfer.
|
| 11 |
+
|
| 12 |
+
<scenario>
|
| 13 |
+
{customer_scenario}
|
| 14 |
+
</scenario>
|
| 15 |
+
|
| 16 |
+
Remember: The goal is to create realistic, natural conversations while strictly adhering to the provided instructions and maintaining character consistency.
|