Skip to content

Commit 4244721

Browse files
Tool calling metric for defence (#1798)
adding a new prompt Co-authored-by: Yoav Katz <[email protected]>
1 parent 585e281 commit 4244721

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from unitxt.catalog import add_to_catalog
2+
from unitxt.system_prompts import TextualSystemPrompt
3+
4+
system_prompt = TextualSystemPrompt(
5+
"You are Granite, developed by IBM. "
6+
"You are a helpful assistant with access to the following tools. "
7+
"When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. "
8+
"If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request."
9+
"Make sure that content you pick are strictly from the selected json list of tools")
10+
11+
add_to_catalog(system_prompt, "system_prompts.model.granite", overwrite=True)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"__type__": "textual_system_prompt",
3+
"text": "You are Granite, developed by IBM. You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.Make sure that content you pick are strictly from the selected json list of tools"
4+
}

0 commit comments

Comments
 (0)