Add berkeley-function-calling-leaderboard dataset#29
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- In
create.py, thedst_files = [f"{file.replace('_', '-')}l" for file in doc_files]logic is likely mangling the function-doc filenames (e.g., turning*.jsonlinto*.jsonll); consider preserving the original extension and only normalizing the base name. - The path
audeer.path(cache_dir, "possible_answer", file)assumes apossible_answersubdirectory; double-check this matches the actual HuggingFace dataset structure (it might be namedpossible_answers), or derive it programmatically to avoid path mismatches. - The
pyproject.tomlproject nameberkley-function-callappears misspelled relative to the dataset (berkeley); consider correcting this for consistency and easier discovery.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `create.py`, the `dst_files = [f"{file.replace('_', '-')}l" for file in doc_files]` logic is likely mangling the function-doc filenames (e.g., turning `*.jsonl` into `*.jsonll`); consider preserving the original extension and only normalizing the base name.
- The path `audeer.path(cache_dir, "possible_answer", file)` assumes a `possible_answer` subdirectory; double-check this matches the actual HuggingFace dataset structure (it might be named `possible_answers`), or derive it programmatically to avoid path mismatches.
- The `pyproject.toml` project name `berkley-function-call` appears misspelled relative to the dataset (`berkeley`); consider correcting this for consistency and easier discovery.
## Individual Comments
### Comment 1
<location> `datasets/berkeley-function-calling-leaderboard/1.0.0/create.py:78` </location>
<code_context>
+ audeer.path(cache_dir, doc_dir),
+ basenames=True,
+)
+dst_files = [f"{file.replace('_', '-')}l" for file in doc_files]
+table_id = doc_dir.replace("_", "-")
+audeer.mkdir(build_dir, table_id)
</code_context>
<issue_to_address>
**issue (bug_risk):** The added trailing 'l' in `dst_files` looks unintended and changes file extensions in a potentially confusing way.
This turns e.g. `foo_bar.json` into `foo-bar.jsonl`, which likely alters the intended file extension and may confuse `filewise_index` and other consumers. If you only need to normalize separators, avoid appending `"l"`, or explicitly build the correct extension instead of blindly adding one.
</issue_to_address>
### Comment 2
<location> `datasets/berkeley-function-calling-leaderboard/1.0.0/create.py:50-59` </location>
<code_context>
+ question_file = audeer.path(cache_dir, file)
+ answer_file = audeer.path(cache_dir, "possible_answer", file)
+ questions = read_jsonl(question_file)
+ if os.path.exists(answer_file):
+ answers = read_jsonl(answer_file)
+ for question in questions:
+ for answer in answers:
+ if question["id"] == answer["id"]:
+ question |= answer
+ break
+ # Store one question (+ potential answer) per json file
+ for n, question in enumerate(questions):
</code_context>
<issue_to_address>
**suggestion (performance):** The nested loops for merging questions and answers are O(N²) and could be simplified with an ID lookup.
Consider building a single `id -> answer` dict (e.g. `answer_by_id = {a["id"]: a for a in answers}`) and then doing `answer_by_id.get(question["id"])` in the merge. This reduces the complexity from quadratic to linear and keeps the merge logic easier to read as the lists grow.
```suggestion
question_file = audeer.path(cache_dir, file)
answer_file = audeer.path(cache_dir, "possible_answer", file)
questions = read_jsonl(question_file)
if os.path.exists(answer_file):
answers = read_jsonl(answer_file)
answers_by_id = {answer["id"]: answer for answer in answers}
for question in questions:
answer = answers_by_id.get(question["id"])
if answer is not None:
question |= answer
```
</issue_to_address>
### Comment 3
<location> `datasets/berkeley-function-calling-leaderboard/1.0.0/create.py:13-15` </location>
<code_context>
+cache_dir = audeer.path("./cache")
+
+
+def read_jsonl(file):
+ with open(file) as fp:
+ return [json.loads(line) for line in fp.readlines()]
+
+
</code_context>
<issue_to_address>
**suggestion (performance):** Reading all lines into memory at once is unnecessary and can be replaced with a simple iterator.
Iterate over the file handle directly, e.g. `return [json.loads(line) for line in fp]`, which keeps behavior the same while lowering memory usage and simplifying the code.
Suggested implementation:
```python
import shutil
import json
import audeer
import audformat
```
```python
def read_jsonl(file):
with open(file) as fp:
return [json.loads(line) for line in fp]
```
</issue_to_address>
### Comment 4
<location> `datasets/berkeley-function-calling-leaderboard/1.0.0/pyproject.toml:2` </location>
<code_context>
+[project]
+name = "berkley-function-call"
+version = "1.0.0"
+requires-python = ">=3.12"
</code_context>
<issue_to_address>
**issue (typo):** The project name appears to have a typo compared to the dataset name.
The dataset and related resources use "berkeley" (e.g. `berkeley-function-calling-leaderboard`), but this project name uses "berkley". Unless this is intentional, please correct the spelling here to match the dataset name for consistency and easier discovery.
</issue_to_address>
### Comment 5
<location> `datasets/berkeley-function-calling-leaderboard/1.0.0/create.py:53` </location>
<code_context>
+ question_file = audeer.path(cache_dir, file)
+ answer_file = audeer.path(cache_dir, "possible_answer", file)
+ questions = read_jsonl(question_file)
+ if os.path.exists(answer_file):
+ answers = read_jsonl(answer_file)
+ for question in questions:
</code_context>
<issue_to_address>
**issue (complexity):** Consider refactoring the question–answer merge, split processing, and doc-filename handling into focused helpers and a dict-based join to reduce nesting and clarify intent.
You can simplify and clarify a few areas without changing behavior.
**1) Replace nested loops with an `id` → answer mapping**
The current join logic:
```python
if os.path.exists(answer_file):
answers = read_jsonl(answer_file)
for question in questions:
for answer in answers:
if question["id"] == answer["id"]:
question |= answer
break
```
can be made clearer and cheaper with a dict:
```python
if os.path.exists(answer_file):
answers = read_jsonl(answer_file)
answers_by_id = {a["id"]: a for a in answers}
for question in questions:
if (answer := answers_by_id.get(question["id"])) is not None:
question |= answer
```
This keeps all semantics but removes the nested loop and `break`.
---
**2) Extract helpers for clarity inside the main `for file in files` loop**
Right now, the loop mixes filesystem, data merge, and table creation. Breaking it up makes the flow easier to read and modify:
```python
def merge_questions_and_answers(question_file, answer_file):
questions = read_jsonl(question_file)
if os.path.exists(answer_file):
answers = read_jsonl(answer_file)
answers_by_id = {a["id"]: a for a in answers}
for question in questions:
if (answer := answers_by_id.get(question["id"])) is not None:
question |= answer
return questions
def write_questions_to_files(questions, split):
audeer.mkdir(build_dir, "json", split)
paths = []
for n, question in enumerate(questions):
path = audeer.path(build_dir, "json", split, f"sample-{n}.json")
with open(path, "w", encoding="utf-8") as fp:
json.dump([question], fp, ensure_ascii=False, indent=2)
paths.append(f"{split}/sample-{n}.json")
return paths
def create_split_table(split, rel_paths):
index = audformat.filewise_index(rel_paths)
table = audformat.Table(index, split_id=split)
table["topic"] = audformat.Column(scheme_id="topic")
table["topic"].set(split.removeprefix("bfcl-v3-"))
return table
```
Then the loop body becomes:
```python
for file in files:
split = audeer.basename_wo_ext(file).lower().replace("_", "-")
db.splits[split] = audformat.Split("other")
question_file = audeer.path(cache_dir, file)
answer_file = audeer.path(cache_dir, "possible_answer", file)
questions = merge_questions_and_answers(question_file, answer_file)
rel_paths = write_questions_to_files(questions, split)
db[split] = create_split_table(split, rel_paths)
```
Behavior is the same; responsibilities are separated.
---
**3) Encapsulate function-doc filename normalization**
The `replace('_', '-')` + `'l'` suffix is non-obvious:
```python
dst_files = [f"{file.replace('_', '-')}l" for file in doc_files]
...
index = audformat.filewise_index(f"{table_id}/{file}" for file in dst_files)
```
Extract the transformation into a helper to make intent explicit and reduce coupling:
```python
def normalize_doc_filename(file_name: str) -> str:
# existing behavior: replace '_' with '-' and append 'l'
return f"{file_name.replace('_', '-') }l"
```
Use it in one place:
```python
dst_files = [normalize_doc_filename(file) for file in doc_files]
table_id = doc_dir.replace("_", "-")
audeer.mkdir(build_dir, table_id)
index = audformat.filewise_index(f"{table_id}/{file}" for file in dst_files)
db[table_id] = audformat.Table(index)
for file, dst_file in zip(doc_files, dst_files):
shutil.copyfile(
audeer.path(cache_dir, doc_dir, file),
audeer.path(build_dir, table_id, dst_file),
)
db[table_id]["topic"] = audformat.Column(scheme_id="topic")
db[table_id]["topic"].set(audeer.basename_wo_ext(file) for file in dst_files)
```
This keeps the transformation logic in one named place, making future changes or bug hunts easier.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
datasets/berkeley-function-calling-leaderboard/1.0.0/pyproject.toml
Outdated
Show resolved
Hide resolved
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This makes sense to me, I looked at the data and the Regarding the and For the |
Thanks for spotting this, I fixed it.
In principle, it would make indeed more sense to approach it that way. Why I store it inside the single tables is that with |
|
@trangham283 and @frankenjoe any further comments, or is it ok if I publish the first version of the dataset. |
|
Ok, so here we publish the original conversations for now and do not yet store them also in our internal data format? |
|
For now I would first publish it in the original format. I'm not convinced yet, to double all existing tables to |
Ok, so your plan is to replace the tables in the next version? |
|
At the moment, I don't have a plan how to best integrate our own formatting ;) Replacing all tables and json files is one option. |
|
Should we maybe wait then until we have a plan? :) |
|
Yes and no, depends how fast we need evaluation of models fine-tuned for function calling. If this can wait, we can indeed first consolidate how to best convert and store the data. |
|
I think it makes sense we first settle on a format. I guess it will also make it easier to evaluate the models later on. |
|
I updated the code to convert all data to our format, and updated also the description of the pull request accordingly. |
Adds the gorilla-llm/Berkeley-Function-Calling-Leaderboard dataset from HuggingFace as
berkeley-function-calling-leaderboardto our publicaudbrepository.I have one table for each topic of the benchmark following their approach of having a JSONL file for each topic.
I further collected all additional information, like possible answers to the questions and function definitions and stored them all in the JSON file that belongs to a given sample. I further converted the sample to our own format, so we always have a structure like
[ { "role": "system", "tools": [{"...": "..."}] }, { "role": "human", "text": "..." } ]For some benchmarks we need additional information as the benchmark does not only provide the tools, but also some state to start from, e.g. existing files or tweets. Those are stored under
"initial_config". In addition, under"involved_classes"we store to which classes the function belongs (the assistant is allowed to call them as functions, even though they are methods), and under"path"we store the exact method calls. In principle,"involved_classes"and"path"are both not needed as the information can also be extracted differently, but I thought it might be easier/safer to also include them.In the cases those are available, and the assistant actually calls a function, the file structure is
[ { "role": "system", "initial_config": {"...": "..."}, "path": ["..."], "involved_classes": ["..."], "tools": [{"...": "..."}] }, { "role": "human", "text": "..." }, { "role": "assistant", "tool-call": [{"...": "..."}] } ]See the examples below for the full details.
DATABASE HEADER
db.yaml
TABLE EXAMPLE
JSON EXAMPLES
json/bfcl-v3-chatable/sample-0.json
Original
{ "question": "Find the area of a triangle with a base of 10 units and height of 5 units.", "function": "" }Converted
[ { "role": "human", "text": "Find the area of a triangle with a base of 10 units and height of 5 units." } ]json/bfcl-v3-exec-multiple/sample-0.json
Original
{ "id": "exec_multiple_0", "question": [ [ { "role": "user", "content": "I'm playing a dice game and want to calculate my chances. I roll the die 20 times, and I'm trying to figure out the probability of landing on a 6 exactly five times, considering each roll has a one in six chance of being a 6. Could you help me with that?" } ] ], "function": [ { "name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": { "type": "dict", "properties": { "coordinates": { "type": "array", "items": { "type": "float" }, "description": "The latitude and longitude of the location." } }, "required": [ "coordinates" ] } }, { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "dict", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } ], "execution_result_type": [ "exact_match" ], "ground_truth": [ "calc_binomial_probability(n=20, k=5, p=1/6)" ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": { "type": "object", "properties": { "coordinates": { "type": "array", "items": { "type": "float" }, "description": "The latitude and longitude of the location." } }, "required": [ "coordinates" ] } } }, { "type": "function", "function": { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "object", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } } ] }, { "role": "human", "text": "I'm playing a dice game and want to calculate my chances. I roll the die 20 times, and I'm trying to figure out the probability of landing on a 6 exactly five times, considering each roll has a one in six chance of being a 6. Could you help me with that?" }, { "role": "assistant", "tool-call": [ { "name": "calc_binomial_probability", "arguments": "{\"n\": 20, \"k\": 5, \"p\": \"1/6\"}" } ] } ]json/bfcl-v3-exec-parallel/sample-0.json
Original
{ "id": "exec_parallel_0", "question": [ [ { "role": "user", "content": "I'm trying to understand my chances in a game with a 30% win probability per round. Can you calculate the probability of winning exactly 3 out of 10 rounds, 5 out of 15 rounds, and 7 out of 20 rounds?" } ] ], "function": [ { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "dict", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } ], "execution_result_type": [ "exact_match", "exact_match", "exact_match" ], "ground_truth": [ "calc_binomial_probability(n=10, k=3, p=0.3)", "calc_binomial_probability(n=15, k=5, p=0.3)", "calc_binomial_probability(n=20, k=7, p=0.3)" ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "object", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } } ] }, { "role": "human", "text": "I'm trying to understand my chances in a game with a 30% win probability per round. Can you calculate the probability of winning exactly 3 out of 10 rounds, 5 out of 15 rounds, and 7 out of 20 rounds?" }, { "role": "assistant", "tool-call": [ { "name": "calc_binomial_probability", "arguments": "{\"n\": 10, \"k\": 3, \"p\": 0.3}" }, { "name": "calc_binomial_probability", "arguments": "{\"n\": 15, \"k\": 5, \"p\": 0.3}" }, { "name": "calc_binomial_probability", "arguments": "{\"n\": 20, \"k\": 7, \"p\": 0.3}" } ] } ]json/bfcl-v3-exec-parallel-multiple/sample-0.json
Original
{ "id": "exec_parallel_multiple_0", "question": [ [ { "role": "user", "content": "I'm planning a small outdoor event in Ottawa, and I need to make sure the weather is going to cooperate. Could you fetch the current weather for me at latitude 45.4215 and longitude -75.6972 using the Open-Meteo API? Also, I'm running a small game at the event, and I'm curious about the chances of winning. If I have 10 attempts at this game and the chance of winning each time is 50%, how likely is it that I'll win 5 times?" } ] ], "function": [ { "name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": { "type": "dict", "properties": { "coordinates": { "type": "array", "items": { "type": "float" }, "description": "The latitude and longitude of the location." } }, "required": [ "coordinates" ] } }, { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "dict", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "float", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } ], "execution_result_type": [ "structural_match", "exact_match" ], "ground_truth": [ "get_weather_data(coordinates=[45.4215, -75.6972])", "calc_binomial_probability(n=10, k=5, p=0.5)" ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": { "type": "object", "properties": { "coordinates": { "type": "array", "items": { "type": "float" }, "description": "The latitude and longitude of the location." } }, "required": [ "coordinates" ] } } }, { "type": "function", "function": { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "object", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "float", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } } ] }, { "role": "human", "text": "I'm planning a small outdoor event in Ottawa, and I need to make sure the weather is going to cooperate. Could you fetch the current weather for me at latitude 45.4215 and longitude -75.6972 using the Open-Meteo API? Also, I'm running a small game at the event, and I'm curious about the chances of winning. If I have 10 attempts at this game and the chance of winning each time is 50%, how likely is it that I'll win 5 times?" }, { "role": "assistant", "tool-call": [ { "name": "get_weather_data", "arguments": "{\"coordinates\": \"[45.4215, -75.6972]\"}" }, { "name": "calc_binomial_probability", "arguments": "{\"n\": 10, \"k\": 5, \"p\": 0.5}" } ] } ]json/bfcl-v3-exec-simple/sample-0.json
Original
{ "id": "exec_simple_0", "question": [ [ { "role": "user", "content": "I've been playing a game where rolling a six is somehow more likely than usual, and the chance of it happening on a single roll is 60%. I'm curious, if I roll the die 20 times, what are the odds that I'll get exactly five sixes?" } ] ], "function": [ { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "dict", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } ], "execution_result_type": [ "exact_match" ], "ground_truth": [ "calc_binomial_probability(n=20, k=5, p=0.6)" ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": { "type": "object", "properties": { "n": { "type": "integer", "description": "The number of trials." }, "k": { "type": "integer", "description": "The number of successes." }, "p": { "type": "float", "description": "The probability of success." } }, "required": [ "n", "k", "p" ] } } } ] }, { "role": "human", "text": "I've been playing a game where rolling a six is somehow more likely than usual, and the chance of it happening on a single roll is 60%. I'm curious, if I roll the die 20 times, what are the odds that I'll get exactly five sixes?" }, { "role": "assistant", "tool-call": [ { "name": "calc_binomial_probability", "arguments": "{\"n\": 20, \"k\": 5, \"p\": 0.6}" } ] } ]json/bfcl-v3-irrelevance/sample-0.json
Original
{ "id": "irrelevance_0", "question": [ [ { "role": "user", "content": "Calculate the area of a triangle given the base is 10 meters and height is 5 meters." } ] ], "function": [ { "name": "determine_body_mass_index", "description": "Calculate body mass index given weight and height.", "parameters": { "type": "dict", "properties": { "weight": { "type": "float", "description": "Weight of the individual in kilograms." }, "height": { "type": "float", "description": "Height of the individual in meters." } }, "required": [ "weight", "height" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "determine_body_mass_index", "description": "Calculate body mass index given weight and height.", "parameters": { "type": "object", "properties": { "weight": { "type": "float", "description": "Weight of the individual in kilograms." }, "height": { "type": "float", "description": "Height of the individual in meters." } }, "required": [ "weight", "height" ] } } } ] }, { "role": "human", "text": "Calculate the area of a triangle given the base is 10 meters and height is 5 meters." } ]json/bfcl-v3-java/sample-0.json
Original
{ "id": "java_0", "question": [ [ { "role": "user", "content": "Help me initialize the GIS geometry presentation in a user interface, providing a specific result set controller `mapController` and a composite UI element `mapArea` to display the GIS data?" } ] ], "function": [ { "name": "GeometryPresentation.createPresentation", "description": "Initializes the GIS geometry presentation within the provided UI composite, using the given result set controller.", "parameters": { "type": "dict", "properties": { "controller": { "type": "any", "description": "The IResultSetController instance responsible for controlling the result set." }, "parent": { "type": "any", "description": "The Composite UI element where the GIS presentation will be displayed." } }, "required": [ "controller", "parent" ] } } ], "ground_truth": [ { "GeometryPresentation.createPresentation": { "controller": [ "mapController" ], "parent": [ "mapArea" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "GeometryPresentation.createPresentation", "description": "Initializes the GIS geometry presentation within the provided UI composite, using the given result set controller.", "parameters": { "type": "object", "properties": { "controller": { "type": "any", "description": "The IResultSetController instance responsible for controlling the result set." }, "parent": { "type": "any", "description": "The Composite UI element where the GIS presentation will be displayed." } }, "required": [ "controller", "parent" ] } } } ] }, { "role": "human", "text": "Help me initialize the GIS geometry presentation in a user interface, providing a specific result set controller `mapController` and a composite UI element `mapArea` to display the GIS data?" }, { "role": "assistant", "tool-call": [ { "name": "GeometryPresentation.createPresentation", "arguments": "{\"controller\": \"mapController\", \"parent\": \"mapArea\"}" } ] } ]json/bfcl-v3-javascript/sample-0.json
Original
{ "id": "javascript_0", "question": [ [ { "role": "user", "content": "Help me validate user input in a form field with the ID 'userInputField' after the user has finished typing?" } ] ], "function": [ { "name": "validateUserInput", "description": "This function is called after a user has finished typing in a form field, to validate the input provided.", "parameters": { "type": "dict", "properties": { "inputField": { "type": "String", "description": "The form field whose input needs to be validated." }, "isComplete": { "type": "Boolean", "description": "Indicates if the user has finished typing in the input field." } }, "required": [ "inputField", "isComplete" ] } } ], "ground_truth": [ { "validateUserInput": { "inputField": [ "userInputField" ], "isComplete": [ true ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "validateUserInput", "description": "This function is called after a user has finished typing in a form field, to validate the input provided.", "parameters": { "type": "object", "properties": { "inputField": { "type": "String", "description": "The form field whose input needs to be validated." }, "isComplete": { "type": "Boolean", "description": "Indicates if the user has finished typing in the input field." } }, "required": [ "inputField", "isComplete" ] } } } ] }, { "role": "human", "text": "Help me validate user input in a form field with the ID 'userInputField' after the user has finished typing?" }, { "role": "assistant", "tool-call": [ { "name": "validateUserInput", "arguments": "{\"inputField\": \"userInputField\", \"isComplete\": true}" } ] } ]json/bfcl-v3-live-irrelevance/sample-0.json
Original
{ "id": "live_irrelevance_0-0-0", "question": [ [ { "role": "user", "content": "Can you provide the address for latitude 37.4224764 and longitude -122.0842499 using the Geocoding API?" } ] ], "function": [ { "name": "requests.get", "description": "Sends a GET request to the specified URL to retrieve data. This function is commonly used for API calls and web scraping.", "parameters": { "type": "dict", "required": [ "url" ], "properties": { "url": { "type": "string", "description": "The URL to which the GET request is sent using the Date Nager API to access holiday information for over 100 countries. The API uses ISO 3166-1 alpha-2 country codes. More information can be found at https://date.nager.at/Api" }, "headers": { "type": "dict", "properties": { "Content-Type": { "type": "string", "description": "The media type of the resource being requested, typically 'application/json'.", "default": "application/json" }, "Authorization": { "type": "string", "description": "The credentials to authenticate a user agent with a server, typically formatted as 'Bearer {token}'." } }, "description": "Headers to include in the request.", "default": {} }, "timeout": { "type": "float", "description": "The maximum amount of time to wait for a response from the server, in seconds. A longer timeout may be necessary for slower network connections or overloaded servers.", "default": 5.0 }, "params": { "type": "dict", "description": "Query parameters for the request, allowing for complex searches and filtering.", "properties": { "query": { "type": "string", "description": "The query parameter for search or filtering." }, "page": { "type": "integer", "description": "The page number parameter for pagination. Used to retrieve a specific page of results.", "default": 1 } }, "default": {} }, "auth": { "type": "array", "items": { "type": "string" }, "description": "HTTP authentication credentials formatted as a (username, password) tuple.", "default": [] }, "cert": { "type": "string", "description": "Path to the SSL client certificate file (.pem), if required for the request." }, "cookies": { "type": "dict", "properties": { "sessionid": { "type": "string", "description": "Session identifier cookie, used to recognize client sessions on the server." }, "csrftoken": { "type": "string", "description": "CSRF protection token cookie, used to prevent cross-site request forgery attacks." } }, "description": "Cookies to include in the request." }, "proxies": { "type": "dict", "properties": { "http": { "type": "string", "description": "Proxy URL to use for HTTP requests, including the port number." }, "https": { "type": "string", "description": "Proxy URL to use for HTTPS requests, including the port number." } }, "description": "Proxy configuration for the request." }, "stream": { "type": "boolean", "description": "Whether to stream the download of the response. If False, the response content will be immediately downloaded. Streaming is useful for handling large files or responses.", "default": false }, "verify": { "type": "boolean", "description": "Whether to verify the server's TLS certificate or not. Set to False to skip certificate verification, which is not recommended unless you are sure of the server's identity.", "default": true } } } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "requests.get", "description": "Sends a GET request to the specified URL to retrieve data. This function is commonly used for API calls and web scraping.", "parameters": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "description": "The URL to which the GET request is sent using the Date Nager API to access holiday information for over 100 countries. The API uses ISO 3166-1 alpha-2 country codes. More information can be found at https://date.nager.at/Api" }, "headers": { "type": "object", "properties": { "Content-Type": { "type": "string", "description": "The media type of the resource being requested, typically 'application/json'.", "default": "application/json" }, "Authorization": { "type": "string", "description": "The credentials to authenticate a user agent with a server, typically formatted as 'Bearer {token}'." } }, "description": "Headers to include in the request.", "default": {} }, "timeout": { "type": "float", "description": "The maximum amount of time to wait for a response from the server, in seconds. A longer timeout may be necessary for slower network connections or overloaded servers.", "default": 5.0 }, "params": { "type": "object", "description": "Query parameters for the request, allowing for complex searches and filtering.", "properties": { "query": { "type": "string", "description": "The query parameter for search or filtering." }, "page": { "type": "integer", "description": "The page number parameter for pagination. Used to retrieve a specific page of results.", "default": 1 } }, "default": {} }, "auth": { "type": "array", "items": { "type": "string" }, "description": "HTTP authentication credentials formatted as a (username, password) tuple.", "default": [] }, "cert": { "type": "string", "description": "Path to the SSL client certificate file (.pem), if required for the request." }, "cookies": { "type": "object", "properties": { "sessionid": { "type": "string", "description": "Session identifier cookie, used to recognize client sessions on the server." }, "csrftoken": { "type": "string", "description": "CSRF protection token cookie, used to prevent cross-site request forgery attacks." } }, "description": "Cookies to include in the request." }, "proxies": { "type": "object", "properties": { "http": { "type": "string", "description": "Proxy URL to use for HTTP requests, including the port number." }, "https": { "type": "string", "description": "Proxy URL to use for HTTPS requests, including the port number." } }, "description": "Proxy configuration for the request." }, "stream": { "type": "boolean", "description": "Whether to stream the download of the response. If False, the response content will be immediately downloaded. Streaming is useful for handling large files or responses.", "default": false }, "verify": { "type": "boolean", "description": "Whether to verify the server's TLS certificate or not. Set to False to skip certificate verification, which is not recommended unless you are sure of the server's identity.", "default": true } } } } } ] }, { "role": "human", "text": "Can you provide the address for latitude 37.4224764 and longitude -122.0842499 using the Geocoding API?" } ]json/bfcl-v3-live-multiple/sample-0.json
Original
{ "id": "live_multiple_0-0-0", "question": [ [ { "role": "user", "content": "update my latte to a large size with coconut milk and make it extra sweet? make it served 'boiling hot' as the special request. The drink id is 'latte'" } ] ], "function": [ { "name": "ChaFod", "description": "Changes the food item based on the customer's request, allowing for modifications to the ingredients or preparation method.", "parameters": { "type": "dict", "required": [ "foodItem" ], "properties": { "foodItem": { "type": "string", "description": "The name of the food item to be modified as requested by the customer." }, "newIngredients": { "type": "string", "description": "A comma-separated list of new ingredients to include in the food item, if any.", "default": "" }, "removeIngredients": { "type": "string", "description": "A comma-separated list of ingredients to remove from the food item, if any.", "default": "" }, "specialInstructions": { "type": "string", "description": "Special preparation instructions provided by the customer, such as 'extra spicy' or 'no salt'.", "default": "" } } } }, { "name": "ChaDri.change_drink", "description": "Modifies the existing drink order to accommodate the customer's new request, ensuring the drink is updated according to the specified preferences.", "parameters": { "type": "dict", "required": [ "new_preferences" ], "properties": { "drink_id": { "type": "string", "description": "The unique identifier of the drink to be changed.", "default": "0000-0000-0000" }, "new_preferences": { "type": "dict", "description": "The updated preferences for the drink order.", "properties": { "size": { "type": "string", "description": "The size of the drink the customer prefers.", "enum": [ "small", "medium", "large" ], "default": "medium" }, "temperature": { "type": "string", "description": "The temperature at which the drink should be served.", "enum": [ "cold", "warm", "hot" ], "default": "cold" }, "sweetness_level": { "type": "string", "description": "The sweetness level the customer requests for the drink.", "enum": [ "none", "light", "regular", "extra" ], "default": "regular" }, "milk_type": { "type": "string", "description": "The type of milk to be used in the drink, if applicable.", "enum": [ "regular", "soy", "almond", "coconut" ], "default": "regular" }, "special_instructions": { "type": "string", "description": "Any additional instructions provided by the customer for the drink preparation.", "default": "" } } } } } } ], "ground_truth": [ { "ChaDri.change_drink": { "drink_id": [ "latte" ], "new_preferences": [ { "size": [ "large" ], "milk_type": [ "coconut" ], "sweetness_level": [ "extra" ], "temperature": [ "hot" ], "special_instructions": [ "served boiling hot", "serve boiling hot", "boiling hot", "served 'boiling hot'" ] } ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "ChaFod", "description": "Changes the food item based on the customer's request, allowing for modifications to the ingredients or preparation method.", "parameters": { "type": "object", "required": [ "foodItem" ], "properties": { "foodItem": { "type": "string", "description": "The name of the food item to be modified as requested by the customer." }, "newIngredients": { "type": "string", "description": "A comma-separated list of new ingredients to include in the food item, if any.", "default": "" }, "removeIngredients": { "type": "string", "description": "A comma-separated list of ingredients to remove from the food item, if any.", "default": "" }, "specialInstructions": { "type": "string", "description": "Special preparation instructions provided by the customer, such as 'extra spicy' or 'no salt'.", "default": "" } } } } }, { "type": "function", "function": { "name": "ChaDri.change_drink", "description": "Modifies the existing drink order to accommodate the customer's new request, ensuring the drink is updated according to the specified preferences.", "parameters": { "type": "object", "required": [ "new_preferences" ], "properties": { "drink_id": { "type": "string", "description": "The unique identifier of the drink to be changed.", "default": "0000-0000-0000" }, "new_preferences": { "type": "object", "description": "The updated preferences for the drink order.", "properties": { "size": { "type": "string", "description": "The size of the drink the customer prefers.", "enum": [ "small", "medium", "large" ], "default": "medium" }, "temperature": { "type": "string", "description": "The temperature at which the drink should be served.", "enum": [ "cold", "warm", "hot" ], "default": "cold" }, "sweetness_level": { "type": "string", "description": "The sweetness level the customer requests for the drink.", "enum": [ "none", "light", "regular", "extra" ], "default": "regular" }, "milk_type": { "type": "string", "description": "The type of milk to be used in the drink, if applicable.", "enum": [ "regular", "soy", "almond", "coconut" ], "default": "regular" }, "special_instructions": { "type": "string", "description": "Any additional instructions provided by the customer for the drink preparation.", "default": "" } } } } } } } ] }, { "role": "human", "text": "update my latte to a large size with coconut milk and make it extra sweet? make it served 'boiling hot' as the special request. The drink id is 'latte'" }, { "role": "assistant", "tool-call": [ { "name": "ChaDri.change_drink", "arguments": "{\"drink_id\": \"latte\", \"new_preferences\": {\"size\": [\"large\"], \"milk_type\": [\"coconut\"], \"sweetness_level\": [\"extra\"], \"temperature\": [\"hot\"], \"special_instructions\": [\"served boiling hot\", \"serve boiling hot\", \"boiling hot\", \"served 'boiling hot'\"]}}" } ] } ]json/bfcl-v3-live-parallel/sample-0.json
Original
{ "id": "live_parallel_0-0-0", "question": [ [ { "role": "user", "content": "请问北京的当前天气状况如何?还有,上海的天气情况是怎样的?" } ] ], "function": [ { "name": "get_current_weather", "description": "Retrieves the current weather conditions for a specified city and state.", "parameters": { "type": "dict", "required": [ "location" ], "properties": { "location": { "type": "string", "description": "The location for which to get the weather, in the format of 'City, State', such as 'San Francisco, CA' if State for the city exists. 'City, Country' if State for the city doesn't exist." }, "unit": { "type": "string", "description": "The unit of temperature for the weather report.", "enum": [ "celsius", "fahrenheit" ], "default": "fahrenheit" } } } } ], "ground_truth": [ { "get_current_weather": { "location": [ "Beijing, China" ], "unit": [ "", "fahrenheit" ] } }, { "get_current_weather": { "location": [ "Shanghai, China" ], "unit": [ "", "fahrenheit" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "get_current_weather", "description": "Retrieves the current weather conditions for a specified city and state.", "parameters": { "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string", "description": "The location for which to get the weather, in the format of 'City, State', such as 'San Francisco, CA' if State for the city exists. 'City, Country' if State for the city doesn't exist." }, "unit": { "type": "string", "description": "The unit of temperature for the weather report.", "enum": [ "celsius", "fahrenheit" ], "default": "fahrenheit" } } } } } ] }, { "role": "human", "text": "请问北京的当前天气状况如何?还有,上海的天气情况是怎样的?" }, { "role": "assistant", "tool-call": [ { "name": "get_current_weather", "arguments": "{\"location\": \"Beijing, China\", \"unit\": \"\"}" }, { "name": "get_current_weather", "arguments": "{\"location\": \"Shanghai, China\", \"unit\": \"\"}" } ] } ]json/bfcl-v3-live-parallel-multiple/sample-0.json
Original
{ "id": "live_parallel_multiple_0-0-0", "question": [ [ { "role": "user", "content": "I'd like to change my food order to a Caesar salad without anchovies, and for the drink, can you update my order 123 to a large hot coffee with regular sweetness and almond milk, please?" } ] ], "function": [ { "name": "ChaFod", "description": "Changes the food item based on the customer's request, allowing for modifications to the ingredients or preparation method.", "parameters": { "type": "dict", "required": [ "foodItem" ], "properties": { "foodItem": { "type": "string", "description": "The name of the food item to be modified as requested by the customer." }, "newIngredients": { "type": "string", "description": "A comma-separated list of new ingredients to include in the food item, if any.", "default": "" }, "removeIngredients": { "type": "string", "description": "A comma-separated list of ingredients to remove from the food item, if any.", "default": "" }, "specialInstructions": { "type": "string", "description": "Special preparation instructions provided by the customer, such as 'extra spicy' or 'no salt'.", "default": "" } } } }, { "name": "ChaDri.change_drink", "description": "Modifies the existing drink order to accommodate the customer's new request, ensuring the drink is updated according to the specified preferences.", "parameters": { "type": "dict", "required": [ "drink_id", "new_preferences" ], "properties": { "drink_id": { "type": "string", "description": "The unique identifier of the drink to be changed." }, "new_preferences": { "type": "dict", "description": "The updated preferences for the drink order.", "properties": { "size": { "type": "string", "description": "The size of the drink the customer prefers.", "enum": [ "small", "medium", "large" ], "default": "medium" }, "temperature": { "type": "string", "description": "The temperature at which the drink should be served.", "enum": [ "cold", "warm", "hot" ], "default": "cold" }, "sweetness_level": { "type": "string", "description": "The sweetness level the customer requests for the drink.", "enum": [ "none", "light", "regular", "extra" ], "default": "regular" }, "milk_type": { "type": "string", "description": "The type of milk to be used in the drink, if applicable.", "enum": [ "regular", "soy", "almond", "coconut" ], "default": "regular" }, "special_instructions": { "type": "string", "description": "Any additional instructions provided by the customer for the drink preparation.", "default": "" } } } } } } ], "ground_truth": [ { "ChaFod": { "foodItem": [ "Caesar salad" ], "newIngredients": [ "" ], "removeIngredients": [ "anchovies", "anchovy" ], "specialInstructions": [ "" ] } }, { "ChaDri.change_drink": { "drink_id": [ "123" ], "new_preferences": [ { "size": [ "large" ], "temperature": [ "hot" ], "sweetness_level": [ "", "regular" ], "milk_type": [ "almond" ], "special_instructions": [ "" ] } ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "ChaFod", "description": "Changes the food item based on the customer's request, allowing for modifications to the ingredients or preparation method.", "parameters": { "type": "object", "required": [ "foodItem" ], "properties": { "foodItem": { "type": "string", "description": "The name of the food item to be modified as requested by the customer." }, "newIngredients": { "type": "string", "description": "A comma-separated list of new ingredients to include in the food item, if any.", "default": "" }, "removeIngredients": { "type": "string", "description": "A comma-separated list of ingredients to remove from the food item, if any.", "default": "" }, "specialInstructions": { "type": "string", "description": "Special preparation instructions provided by the customer, such as 'extra spicy' or 'no salt'.", "default": "" } } } } }, { "type": "function", "function": { "name": "ChaDri.change_drink", "description": "Modifies the existing drink order to accommodate the customer's new request, ensuring the drink is updated according to the specified preferences.", "parameters": { "type": "object", "required": [ "drink_id", "new_preferences" ], "properties": { "drink_id": { "type": "string", "description": "The unique identifier of the drink to be changed." }, "new_preferences": { "type": "object", "description": "The updated preferences for the drink order.", "properties": { "size": { "type": "string", "description": "The size of the drink the customer prefers.", "enum": [ "small", "medium", "large" ], "default": "medium" }, "temperature": { "type": "string", "description": "The temperature at which the drink should be served.", "enum": [ "cold", "warm", "hot" ], "default": "cold" }, "sweetness_level": { "type": "string", "description": "The sweetness level the customer requests for the drink.", "enum": [ "none", "light", "regular", "extra" ], "default": "regular" }, "milk_type": { "type": "string", "description": "The type of milk to be used in the drink, if applicable.", "enum": [ "regular", "soy", "almond", "coconut" ], "default": "regular" }, "special_instructions": { "type": "string", "description": "Any additional instructions provided by the customer for the drink preparation.", "default": "" } } } } } } } ] }, { "role": "human", "text": "I'd like to change my food order to a Caesar salad without anchovies, and for the drink, can you update my order 123 to a large hot coffee with regular sweetness and almond milk, please?" }, { "role": "assistant", "tool-call": [ { "name": "ChaFod", "arguments": "{\"foodItem\": \"Caesar salad\", \"newIngredients\": \"\", \"removeIngredients\": \"anchovies\", \"specialInstructions\": \"\"}" }, { "name": "ChaDri.change_drink", "arguments": "{\"drink_id\": \"123\", \"new_preferences\": {\"size\": [\"large\"], \"temperature\": [\"hot\"], \"sweetness_level\": [\"\", \"regular\"], \"milk_type\": [\"almond\"], \"special_instructions\": [\"\"]}}" } ] } ]json/bfcl-v3-live-relevance/sample-0.json
Original
{ "id": "live_relevance_0-0-0", "question": [ [ { "role": "user", "content": "I'd like to have a digital painting created. The image should be a detailed portrait of a masked woman, including bright peacock feathers, with an elegant and highly detailed style. It should have a fluid illustration quality, with green highlighted lines and complex patterns, reminiscent of cyberpunk and Alphonse Mucha's art." } ] ], "function": [ { "name": "search_engine.query", "description": "Conducts a search based on the provided prompt and returns relevant real-time information, specific details, or general facts from various sources, including internet browsing and data from Google.", "parameters": { "type": "dict", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "The search query to be executed by the search engine. Example: 'latest scientific discoveries'." }, "since_year": { "type": "integer", "description": "Filter results to include only information published after the specified year. Default to the current year if not provided.", "default": 2023 }, "source": { "type": "string", "description": "Preferred source for the search results, such as 'all', 'internet', or 'google'.", "enum": [ "all", "internet", "google" ], "default": "all" }, "include_facts": { "type": "boolean", "description": "Indicates whether to include factual information in the search results. Default is true.", "default": true } } } }, { "name": "generate_image", "description": "Generate an image based on a given text prompt. The function is versatile and can be used for various general purposes without specializing in any specific category.", "parameters": { "type": "dict", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "The text prompt that describes the desired content of the image." }, "image_format": { "type": "string", "description": "The file format for the output image.", "enum": [ "JPEG", "PNG", "BMP" ], "default": "PNG" }, "width": { "type": "integer", "description": "The width of the generated image in pixels.", "default": 1024 }, "height": { "type": "integer", "description": "The height of the generated image in pixels.", "default": 768 }, "color_mode": { "type": "string", "description": "The color mode of the image.", "enum": [ "RGB", "Grayscale" ], "default": "RGB" } } } }, { "name": "generate_human_image", "description": "Generates a realistic image of a human based on the provided prompt, with options for creating images representing different age groups and genders.", "parameters": { "type": "dict", "required": [ "prompt", "image_quality" ], "properties": { "prompt": { "type": "string", "description": "A descriptive text guiding the generation of the human image, such as 'a smiling girl with blue eyes' or 'an elderly man playing chess'." }, "image_quality": { "type": "string", "description": "The desired quality of the generated image, affecting the level of detail and realism. Options include 'low', 'medium', and 'high'.", "enum": [ "low", "medium", "high" ] }, "include_background": { "type": "boolean", "description": "Determines whether a background should be included in the generated image.", "default": false }, "output_format": { "type": "string", "description": "Specifies the file format for the output image.", "enum": [ "JPEG", "PNG", "BMP" ], "default": "JPEG" } } } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "search_engine.query", "description": "Conducts a search based on the provided prompt and returns relevant real-time information, specific details, or general facts from various sources, including internet browsing and data from Google.", "parameters": { "type": "object", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "The search query to be executed by the search engine. Example: 'latest scientific discoveries'." }, "since_year": { "type": "integer", "description": "Filter results to include only information published after the specified year. Default to the current year if not provided.", "default": 2023 }, "source": { "type": "string", "description": "Preferred source for the search results, such as 'all', 'internet', or 'google'.", "enum": [ "all", "internet", "google" ], "default": "all" }, "include_facts": { "type": "boolean", "description": "Indicates whether to include factual information in the search results. Default is true.", "default": true } } } } }, { "type": "function", "function": { "name": "generate_image", "description": "Generate an image based on a given text prompt. The function is versatile and can be used for various general purposes without specializing in any specific category.", "parameters": { "type": "object", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "The text prompt that describes the desired content of the image." }, "image_format": { "type": "string", "description": "The file format for the output image.", "enum": [ "JPEG", "PNG", "BMP" ], "default": "PNG" }, "width": { "type": "integer", "description": "The width of the generated image in pixels.", "default": 1024 }, "height": { "type": "integer", "description": "The height of the generated image in pixels.", "default": 768 }, "color_mode": { "type": "string", "description": "The color mode of the image.", "enum": [ "RGB", "Grayscale" ], "default": "RGB" } } } } }, { "type": "function", "function": { "name": "generate_human_image", "description": "Generates a realistic image of a human based on the provided prompt, with options for creating images representing different age groups and genders.", "parameters": { "type": "object", "required": [ "prompt", "image_quality" ], "properties": { "prompt": { "type": "string", "description": "A descriptive text guiding the generation of the human image, such as 'a smiling girl with blue eyes' or 'an elderly man playing chess'." }, "image_quality": { "type": "string", "description": "The desired quality of the generated image, affecting the level of detail and realism. Options include 'low', 'medium', and 'high'.", "enum": [ "low", "medium", "high" ] }, "include_background": { "type": "boolean", "description": "Determines whether a background should be included in the generated image.", "default": false }, "output_format": { "type": "string", "description": "Specifies the file format for the output image.", "enum": [ "JPEG", "PNG", "BMP" ], "default": "JPEG" } } } } } ] }, { "role": "human", "text": "I'd like to have a digital painting created. The image should be a detailed portrait of a masked woman, including bright peacock feathers, with an elegant and highly detailed style. It should have a fluid illustration quality, with green highlighted lines and complex patterns, reminiscent of cyberpunk and Alphonse Mucha's art." } ]json/bfcl-v3-live-simple/sample-0.json
Original
{ "id": "live_simple_0-0-0", "question": [ [ { "role": "user", "content": "Can you retrieve the details for the user with the ID 7890, who has black as their special request?" } ] ], "function": [ { "name": "get_user_info", "description": "Retrieve details for a specific user by their unique identifier.", "parameters": { "type": "dict", "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "description": "The unique identifier of the user. It is used to fetch the specific user details from the database." }, "special": { "type": "string", "description": "Any special information or parameters that need to be considered while fetching user details.", "default": "none" } } } } ], "ground_truth": [ { "get_user_info": { "user_id": [ 7890 ], "special": [ "black" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "get_user_info", "description": "Retrieve details for a specific user by their unique identifier.", "parameters": { "type": "object", "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "description": "The unique identifier of the user. It is used to fetch the specific user details from the database." }, "special": { "type": "string", "description": "Any special information or parameters that need to be considered while fetching user details.", "default": "none" } } } } } ] }, { "role": "human", "text": "Can you retrieve the details for the user with the ID 7890, who has black as their special request?" }, { "role": "assistant", "tool-call": [ { "name": "get_user_info", "arguments": "{\"user_id\": 7890, \"special\": \"black\"}" } ] } ]json/bfcl-v3-multiple/sample-0.json
Original
{ "id": "multiple_0", "question": [ [ { "role": "user", "content": "Can I find the dimensions and properties of a triangle, if I know its three sides are 5 units, 4 units and 3 units long?" } ] ], "function": [ { "name": "triangle_properties.get", "description": "Retrieve the dimensions, such as area and perimeter, of a triangle if lengths of three sides are given.", "parameters": { "type": "dict", "properties": { "side1": { "type": "integer", "description": "The length of first side of the triangle." }, "side2": { "type": "integer", "description": "The length of second side of the triangle." }, "side3": { "type": "integer", "description": "The length of third side of the triangle." }, "get_area": { "type": "boolean", "description": "A flag to determine whether to calculate the area of triangle. Default is true.", "default": true, "optional": true }, "get_perimeter": { "type": "boolean", "description": "A flag to determine whether to calculate the perimeter of triangle. Default is true.", "default": true, "optional": true }, "get_angles": { "type": "boolean", "description": "A flag to determine whether to calculate the internal angles of triangle. Default is true.", "default": true, "optional": true } }, "required": [ "side1", "side2", "side3" ] } }, { "name": "circle_properties.get", "description": "Retrieve the dimensions, such as area and circumference, of a circle if radius is given.", "parameters": { "type": "dict", "properties": { "radius": { "type": "float", "description": "The length of radius of the circle." }, "get_area": { "type": "boolean", "description": "A flag to determine whether to calculate the area of circle. Default is true.", "default": true, "optional": true }, "get_circumference": { "type": "boolean", "description": "A flag to determine whether to calculate the circumference of circle. Default is true.", "default": true, "optional": true } }, "required": [ "radius" ] } } ], "ground_truth": [ { "triangle_properties.get": { "side1": [ 5 ], "side2": [ 4 ], "side3": [ 3 ], "get_area": [ "", true ], "get_perimeter": [ "", true ], "get_angles": [ "", true ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "triangle_properties.get", "description": "Retrieve the dimensions, such as area and perimeter, of a triangle if lengths of three sides are given.", "parameters": { "type": "object", "properties": { "side1": { "type": "integer", "description": "The length of first side of the triangle." }, "side2": { "type": "integer", "description": "The length of second side of the triangle." }, "side3": { "type": "integer", "description": "The length of third side of the triangle." }, "get_area": { "type": "boolean", "description": "A flag to determine whether to calculate the area of triangle. Default is true.", "default": true, "optional": true }, "get_perimeter": { "type": "boolean", "description": "A flag to determine whether to calculate the perimeter of triangle. Default is true.", "default": true, "optional": true }, "get_angles": { "type": "boolean", "description": "A flag to determine whether to calculate the internal angles of triangle. Default is true.", "default": true, "optional": true } }, "required": [ "side1", "side2", "side3" ] } } }, { "type": "function", "function": { "name": "circle_properties.get", "description": "Retrieve the dimensions, such as area and circumference, of a circle if radius is given.", "parameters": { "type": "object", "properties": { "radius": { "type": "float", "description": "The length of radius of the circle." }, "get_area": { "type": "boolean", "description": "A flag to determine whether to calculate the area of circle. Default is true.", "default": true, "optional": true }, "get_circumference": { "type": "boolean", "description": "A flag to determine whether to calculate the circumference of circle. Default is true.", "default": true, "optional": true } }, "required": [ "radius" ] } } } ] }, { "role": "human", "text": "Can I find the dimensions and properties of a triangle, if I know its three sides are 5 units, 4 units and 3 units long?" }, { "role": "assistant", "tool-call": [ { "name": "triangle_properties.get", "arguments": "{\"side1\": 5, \"side2\": 4, \"side3\": 3, \"get_area\": \"\", \"get_perimeter\": \"\", \"get_angles\": \"\"}" } ] } ]json/bfcl-v3-multi-turn-base/sample-0.json
Original
{ "id": "multi_turn_base_0", "question": [ [ { "role": "user", "content": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" } ], [ { "role": "user", "content": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." } ], [ { "role": "user", "content": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." } ], [ { "role": "user", "content": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." } ] ], "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "ground_truth": [ [ "cd(folder='document')", "mkdir(dir_name='temp')", "mv(source='final_report.pdf', destination='temp')" ], [ "cd(folder='temp')", "grep(file_name='final_report.pdf',pattern='budget analysis')" ], [ "sort('final_report.pdf')" ], [ "cd(folder='..')", "mv(source='previous_report.pdf',destination='temp')", "cd(folder='temp')", "diff(file_name1='final_report.pdf',file_name2='previous_report.pdf')" ] ] }Converted
[ { "role": "system", "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "tools": [ { "type": "function", "function": { "name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": { "type": "object", "properties": { "source": { "type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory." }, "destination": { "type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. " } }, "required": [ "source", "destination" ] } } }, { "type": "function", "function": { "name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "." }, "name": { "type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None" } }, "required": [] } } }, { "type": "function", "function": { "name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory." }, "pattern": { "type": "string", "description": "The pattern to search for. " } }, "required": [ "file_name", "pattern" ] } } }, { "type": "function", "function": { "name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file appeared at current directory to sort. " } }, "required": [ "file_name" ] } } }, { "type": "function", "function": { "name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": { "type": "object", "properties": { "file_name1": { "type": "string", "description": "The name of the first file in current directory." }, "file_name2": { "type": "string", "description": "The name of the second file in current directorry. " } }, "required": [ "file_name1", "file_name2" ] } } }, { "type": "function", "function": { "name": "post_tweet", "description": "This tool belongs to the TwitterAPI, which provides core functionality for posting tweets, retweeting, commenting, and following users on Twitter. Tool description: Post a tweet for the authenticated user.", "parameters": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the tweet." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "List of tags for the tweet. Tag name should start with #. This is only relevant if the user wants to add tags to the tweet.", "default": [] }, "mentions": { "type": "array", "items": { "type": "string" }, "description": "List of users mentioned in the tweet. Mention name should start with @. This is only relevant if the user wants to add mentions to the tweet.", "default": [] } }, "required": [ "content" ] } } } ] }, { "role": "human", "text": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"document\"}" }, { "name": "mkdir", "arguments": "{\"dir_name\": \"temp\"}" }, { "name": "mv", "arguments": "{\"source\": \"final_report.pdf\", \"destination\": \"temp\"}" } ] }, { "role": "human", "text": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "grep", "arguments": "{\"file_name\": \"final_report.pdf\", \"pattern\": \"budget analysis\"}" } ] }, { "role": "human", "text": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." }, { "role": "assistant", "tool-call": [ { "name": "sort", "arguments": "{\"file_name\": \"final_report.pdf\"}" } ] }, { "role": "human", "text": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"..\"}" }, { "name": "mv", "arguments": "{\"source\": \"previous_report.pdf\", \"destination\": \"temp\"}" }, { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "diff", "arguments": "{\"file_name1\": \"final_report.pdf\", \"file_name2\": \"previous_report.pdf\"}" } ] } ]json/bfcl-v3-multi-turn-composite/sample-0.json
Original
{ "id": "multi_turn_composite_0", "question": [ [ { "role": "user", "content": "Move a specific file within the document directory to a new directory in document. Make sure to create the directory." } ], [ { "role": "user", "content": "The file name is 'final_report.pdf' and the new directory is 'temp'." } ], [ { "role": "user", "content": "Perform a detailed search to identify sections in the file pertaining to 'budget analysis'." } ], [ { "role": "user", "content": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." } ], [], [ { "role": "user", "content": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." } ] ], "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_count": 3, "tweet_list": [ "Just finished analyzing the reports!", "Budget analysis insights coming soon!", "Stay tuned for more updates!" ] } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "missed_function": { "4": [ "sort" ] }, "ground_truth": [ [], [ "cd(folder='document')", "mkdir(dir_name='temp')", "mv(source='final_report.pdf', destination='temp')" ], [ "cd(folder='temp')", "grep(file_name='final_report.pdf',pattern='budget analysis')" ], [], [ "sort('final_report.pdf')" ], [ "cd(folder='..')", "mv(source='previous_report.pdf',destination='temp')", "cd(folder='temp')", "diff(file_name1='final_report.pdf',file_name2='previous_report.pdf')" ] ] }Converted
[ { "role": "system", "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_count": 3, "tweet_list": [ "Just finished analyzing the reports!", "Budget analysis insights coming soon!", "Stay tuned for more updates!" ] } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "tools": [ { "type": "function", "function": { "name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": { "type": "object", "properties": { "source": { "type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory." }, "destination": { "type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. " } }, "required": [ "source", "destination" ] } } }, { "type": "function", "function": { "name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "." }, "name": { "type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None" } }, "required": [] } } }, { "type": "function", "function": { "name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory." }, "pattern": { "type": "string", "description": "The pattern to search for. " } }, "required": [ "file_name", "pattern" ] } } }, { "type": "function", "function": { "name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": { "type": "object", "properties": { "file_name1": { "type": "string", "description": "The name of the first file in current directory." }, "file_name2": { "type": "string", "description": "The name of the second file in current directorry. " } }, "required": [ "file_name1", "file_name2" ] } } }, { "type": "function", "function": { "name": "post_tweet", "description": "This tool belongs to the TwitterAPI, which provides core functionality for posting tweets, retweeting, commenting, and following users on Twitter. Tool description: Post a tweet for the authenticated user.", "parameters": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the tweet." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "List of tags for the tweet. Tag name should start with #. This is only relevant if the user wants to add tags to the tweet.", "default": [] }, "mentions": { "type": "array", "items": { "type": "string" }, "description": "List of users mentioned in the tweet. Mention name should start with @. This is only relevant if the user wants to add mentions to the tweet.", "default": [] } }, "required": [ "content" ] } } } ] }, { "role": "human", "text": "Move a specific file within the document directory to a new directory in document. Make sure to create the directory." }, { "role": "human", "text": "The file name is 'final_report.pdf' and the new directory is 'temp'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"document\"}" }, { "name": "mkdir", "arguments": "{\"dir_name\": \"temp\"}" }, { "name": "mv", "arguments": "{\"source\": \"final_report.pdf\", \"destination\": \"temp\"}" } ] }, { "role": "human", "text": "Perform a detailed search to identify sections in the file pertaining to 'budget analysis'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "grep", "arguments": "{\"file_name\": \"final_report.pdf\", \"pattern\": \"budget analysis\"}" } ] }, { "role": "human", "text": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." }, { "role": "system", "tools": [ { "type": "function", "function": { "name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file appeared at current directory to sort. " } }, "required": [ "file_name" ] } } } ] }, { "role": "assistant", "tool-call": [ { "name": "sort", "arguments": "{\"file_name\": \"final_report.pdf\"}" } ] }, { "role": "human", "text": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"..\"}" }, { "name": "mv", "arguments": "{\"source\": \"previous_report.pdf\", \"destination\": \"temp\"}" }, { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "diff", "arguments": "{\"file_name1\": \"final_report.pdf\", \"file_name2\": \"previous_report.pdf\"}" } ] } ]json/bfcl-v3-multi-turn-long-context/sample-0.json
Original
{ "id": "multi_turn_long_context_0", "question": [ [ { "role": "user", "content": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" } ], [ { "role": "user", "content": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." } ], [ { "role": "user", "content": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." } ], [ { "role": "user", "content": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." } ] ], "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "ground_truth": [ [ "cd(folder='document')", "mkdir(dir_name='temp')", "mv(source='final_report.pdf', destination='temp')" ], [ "cd(folder='temp')", "grep(file_name='final_report.pdf',pattern='budget analysis')" ], [ "sort('final_report.pdf')" ], [ "cd(folder='..')", "mv(source='previous_report.pdf',destination='temp')", "cd(folder='temp')", "diff(file_name1='final_report.pdf',file_name2='previous_report.pdf')" ] ] }Converted
[ { "role": "system", "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "tools": [ { "type": "function", "function": { "name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": { "type": "object", "properties": { "source": { "type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory." }, "destination": { "type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. " } }, "required": [ "source", "destination" ] } } }, { "type": "function", "function": { "name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "." }, "name": { "type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None" } }, "required": [] } } }, { "type": "function", "function": { "name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory." }, "pattern": { "type": "string", "description": "The pattern to search for. " } }, "required": [ "file_name", "pattern" ] } } }, { "type": "function", "function": { "name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file appeared at current directory to sort. " } }, "required": [ "file_name" ] } } }, { "type": "function", "function": { "name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": { "type": "object", "properties": { "file_name1": { "type": "string", "description": "The name of the first file in current directory." }, "file_name2": { "type": "string", "description": "The name of the second file in current directorry. " } }, "required": [ "file_name1", "file_name2" ] } } }, { "type": "function", "function": { "name": "post_tweet", "description": "This tool belongs to the TwitterAPI, which provides core functionality for posting tweets, retweeting, commenting, and following users on Twitter. Tool description: Post a tweet for the authenticated user.", "parameters": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the tweet." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "List of tags for the tweet. Tag name should start with #. This is only relevant if the user wants to add tags to the tweet.", "default": [] }, "mentions": { "type": "array", "items": { "type": "string" }, "description": "List of users mentioned in the tweet. Mention name should start with @. This is only relevant if the user wants to add mentions to the tweet.", "default": [] } }, "required": [ "content" ] } } } ] }, { "role": "human", "text": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"document\"}" }, { "name": "mkdir", "arguments": "{\"dir_name\": \"temp\"}" }, { "name": "mv", "arguments": "{\"source\": \"final_report.pdf\", \"destination\": \"temp\"}" } ] }, { "role": "human", "text": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "grep", "arguments": "{\"file_name\": \"final_report.pdf\", \"pattern\": \"budget analysis\"}" } ] }, { "role": "human", "text": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." }, { "role": "assistant", "tool-call": [ { "name": "sort", "arguments": "{\"file_name\": \"final_report.pdf\"}" } ] }, { "role": "human", "text": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"..\"}" }, { "name": "mv", "arguments": "{\"source\": \"previous_report.pdf\", \"destination\": \"temp\"}" }, { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "diff", "arguments": "{\"file_name1\": \"final_report.pdf\", \"file_name2\": \"previous_report.pdf\"}" } ] } ]json/bfcl-v3-multi-turn-miss-func/sample-0.json
Original
{ "id": "multi_turn_miss_func_0", "question": [ [ { "role": "user", "content": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" } ], [ { "role": "user", "content": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." } ], [ { "role": "user", "content": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." } ], [], [ { "role": "user", "content": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." } ] ], "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "missed_function": { "3": [ "sort" ] }, "ground_truth": [ [ "cd(folder='document')", "mkdir(dir_name='temp')", "mv(source='final_report.pdf', destination='temp')" ], [ "cd(folder='temp')", "grep(file_name='final_report.pdf',pattern='budget analysis')" ], [], [ "sort('final_report.pdf')" ], [ "cd(folder='..')", "mv(source='previous_report.pdf',destination='temp')", "cd(folder='temp')", "diff(file_name1='final_report.pdf',file_name2='previous_report.pdf')" ] ] }Converted
[ { "role": "system", "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "tools": [ { "type": "function", "function": { "name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": { "type": "object", "properties": { "source": { "type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory." }, "destination": { "type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. " } }, "required": [ "source", "destination" ] } } }, { "type": "function", "function": { "name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "." }, "name": { "type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None" } }, "required": [] } } }, { "type": "function", "function": { "name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory." }, "pattern": { "type": "string", "description": "The pattern to search for. " } }, "required": [ "file_name", "pattern" ] } } }, { "type": "function", "function": { "name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": { "type": "object", "properties": { "file_name1": { "type": "string", "description": "The name of the first file in current directory." }, "file_name2": { "type": "string", "description": "The name of the second file in current directorry. " } }, "required": [ "file_name1", "file_name2" ] } } }, { "type": "function", "function": { "name": "post_tweet", "description": "This tool belongs to the TwitterAPI, which provides core functionality for posting tweets, retweeting, commenting, and following users on Twitter. Tool description: Post a tweet for the authenticated user.", "parameters": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the tweet." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "List of tags for the tweet. Tag name should start with #. This is only relevant if the user wants to add tags to the tweet.", "default": [] }, "mentions": { "type": "array", "items": { "type": "string" }, "description": "List of users mentioned in the tweet. Mention name should start with @. This is only relevant if the user wants to add mentions to the tweet.", "default": [] } }, "required": [ "content" ] } } } ] }, { "role": "human", "text": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"document\"}" }, { "name": "mkdir", "arguments": "{\"dir_name\": \"temp\"}" }, { "name": "mv", "arguments": "{\"source\": \"final_report.pdf\", \"destination\": \"temp\"}" } ] }, { "role": "human", "text": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "grep", "arguments": "{\"file_name\": \"final_report.pdf\", \"pattern\": \"budget analysis\"}" } ] }, { "role": "human", "text": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." }, { "role": "system", "tools": [ { "type": "function", "function": { "name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file appeared at current directory to sort. " } }, "required": [ "file_name" ] } } } ] }, { "role": "assistant", "tool-call": [ { "name": "sort", "arguments": "{\"file_name\": \"final_report.pdf\"}" } ] }, { "role": "human", "text": "Move 'previous_report.pdf' in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"..\"}" }, { "name": "mv", "arguments": "{\"source\": \"previous_report.pdf\", \"destination\": \"temp\"}" }, { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "diff", "arguments": "{\"file_name1\": \"final_report.pdf\", \"file_name2\": \"previous_report.pdf\"}" } ] } ]json/bfcl-v3-multi-turn-miss-param/sample-0.json
Original
{ "id": "multi_turn_miss_param_0", "question": [ [ { "role": "user", "content": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" } ], [ { "role": "user", "content": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." } ], [ { "role": "user", "content": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." } ], [ { "role": "user", "content": "Move one of the file in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." } ], [ { "role": "user", "content": "The specific file is final_report.pdf." } ] ], "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "ground_truth": [ [ "cd(folder='document')", "mkdir(dir_name='temp')", "mv(source='final_report.pdf', destination='temp')" ], [ "cd(folder='temp')", "grep(file_name='final_report.pdf',pattern='budget analysis')" ], [ "sort('final_report.pdf')" ], [], [ "cd(folder='..')", "mv(source='previous_report.pdf',destination='temp')", "cd(folder='temp')", "diff(file_name1='final_report.pdf',file_name2='previous_report.pdf')" ] ] }Converted
[ { "role": "system", "initial_config": { "GorillaFileSystem": { "root": { "workspace": { "type": "directory", "contents": { "document": { "type": "directory", "contents": { "final_report.pdf": { "type": "file", "content": "Year2024 This is the final report content including budget analysis and other sections." }, "previous_report.pdf": { "type": "file", "content": "Year203 This is the previous report content with different budget analysis." } } }, "archive": { "type": "directory", "contents": {} } } } } }, "TwitterAPI": { "tweet_counter": 3, "tweets": { "0": { "id": 0, "username": "analyst_pro", "content": "Just finished analyzing the reports!", "tags": [ "#analysis", "#reports" ], "mentions": [] }, "1": { "id": 1, "username": "analyst_pro", "content": "Budget analysis insights coming soon!", "tags": [ "#budget", "#analysis", "#insights" ], "mentions": [] }, "2": { "id": 2, "username": "analyst_pro", "content": "Stay tuned for more updates!", "tags": [ "#updates", "#staytuned" ], "mentions": [] } }, "username": "analyst_pro", "password": "Kj8#mP9$vL2" } }, "path": [ "GorillaFileSystem.find", "GorillaFileSystem.mv", "GorillaFileSystem.grep", "GorillaFileSystem.sort", "GorillaFileSystem.diff", "TwitterAPI.post_tweet" ], "involved_classes": [ "TwitterAPI", "GorillaFileSystem" ], "tools": [ { "type": "function", "function": { "name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": { "type": "object", "properties": { "source": { "type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory." }, "destination": { "type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. " } }, "required": [ "source", "destination" ] } } }, { "type": "function", "function": { "name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "." }, "name": { "type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None" } }, "required": [] } } }, { "type": "function", "function": { "name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory." }, "pattern": { "type": "string", "description": "The pattern to search for. " } }, "required": [ "file_name", "pattern" ] } } }, { "type": "function", "function": { "name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": { "type": "object", "properties": { "file_name": { "type": "string", "description": "The name of the file appeared at current directory to sort. " } }, "required": [ "file_name" ] } } }, { "type": "function", "function": { "name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": { "type": "object", "properties": { "file_name1": { "type": "string", "description": "The name of the first file in current directory." }, "file_name2": { "type": "string", "description": "The name of the second file in current directorry. " } }, "required": [ "file_name1", "file_name2" ] } } }, { "type": "function", "function": { "name": "post_tweet", "description": "This tool belongs to the TwitterAPI, which provides core functionality for posting tweets, retweeting, commenting, and following users on Twitter. Tool description: Post a tweet for the authenticated user.", "parameters": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the tweet." }, "tags": { "type": "array", "items": { "type": "string" }, "description": "List of tags for the tweet. Tag name should start with #. This is only relevant if the user wants to add tags to the tweet.", "default": [] }, "mentions": { "type": "array", "items": { "type": "string" }, "description": "List of users mentioned in the tweet. Mention name should start with @. This is only relevant if the user wants to add mentions to the tweet.", "default": [] } }, "required": [ "content" ] } } } ] }, { "role": "human", "text": "Move 'final_report.pdf' within document directory to 'temp' directory in document. Make sure to create the directory" }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"document\"}" }, { "name": "mkdir", "arguments": "{\"dir_name\": \"temp\"}" }, { "name": "mv", "arguments": "{\"source\": \"final_report.pdf\", \"destination\": \"temp\"}" } ] }, { "role": "human", "text": "Perform a detailed search using grep to identify sections in the file pertaining to 'budget analysis'." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "grep", "arguments": "{\"file_name\": \"final_report.pdf\", \"pattern\": \"budget analysis\"}" } ] }, { "role": "human", "text": "Upon identifying the requisite 'budget analysis' content, sort the 'final_report.pdf' by line for improved clarity and comprehension." }, { "role": "assistant", "tool-call": [ { "name": "sort", "arguments": "{\"file_name\": \"final_report.pdf\"}" } ] }, { "role": "human", "text": "Move one of the file in document directory to temp as well and having final report also there, proceed to juxtapose it with 'previous_report.pdf' to detect any critical alterations." }, { "role": "human", "text": "The specific file is final_report.pdf." }, { "role": "assistant", "tool-call": [ { "name": "cd", "arguments": "{\"folder\": \"..\"}" }, { "name": "mv", "arguments": "{\"source\": \"previous_report.pdf\", \"destination\": \"temp\"}" }, { "name": "cd", "arguments": "{\"folder\": \"temp\"}" }, { "name": "diff", "arguments": "{\"file_name1\": \"final_report.pdf\", \"file_name2\": \"previous_report.pdf\"}" } ] } ]json/bfcl-v3-parallel/sample-0.json
Original
{ "id": "parallel_0", "question": [ [ { "role": "user", "content": "Play songs from the artists Taylor Swift and Maroon 5, with a play time of 20 minutes and 15 minutes respectively, on Spotify." } ] ], "function": [ { "name": "spotify.play", "description": "Play specific tracks from a given artist for a specific time duration.", "parameters": { "type": "dict", "properties": { "artist": { "type": "string", "description": "The artist whose songs you want to play." }, "duration": { "type": "integer", "description": "The duration for which the songs should be played, in minutes." } }, "required": [ "artist", "duration" ] } } ], "ground_truth": [ { "spotify.play": { "artist": [ "Taylor Swift" ], "duration": [ 20 ] } }, { "spotify.play": { "artist": [ "Maroon 5" ], "duration": [ 15 ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "spotify.play", "description": "Play specific tracks from a given artist for a specific time duration.", "parameters": { "type": "object", "properties": { "artist": { "type": "string", "description": "The artist whose songs you want to play." }, "duration": { "type": "integer", "description": "The duration for which the songs should be played, in minutes." } }, "required": [ "artist", "duration" ] } } } ] }, { "role": "human", "text": "Play songs from the artists Taylor Swift and Maroon 5, with a play time of 20 minutes and 15 minutes respectively, on Spotify." }, { "role": "assistant", "tool-call": [ { "name": "spotify.play", "arguments": "{\"artist\": \"Taylor Swift\", \"duration\": 20}" }, { "name": "spotify.play", "arguments": "{\"artist\": \"Maroon 5\", \"duration\": 15}" } ] } ]json/bfcl-v3-parallel-multiple/sample-0.json
Original
{ "id": "parallel_multiple_0", "question": [ [ { "role": "user", "content": "Find the sum of all the multiples of 3 and 5 between 1 and 1000. Also find the product of the first five prime numbers." } ] ], "function": [ { "name": "math_toolkit.sum_of_multiples", "description": "Find the sum of all multiples of specified numbers within a specified range.", "parameters": { "type": "dict", "properties": { "lower_limit": { "type": "integer", "description": "The start of the range (inclusive)." }, "upper_limit": { "type": "integer", "description": "The end of the range (inclusive)." }, "multiples": { "type": "array", "items": { "type": "integer" }, "description": "The numbers to find multiples of." } }, "required": [ "lower_limit", "upper_limit", "multiples" ] } }, { "name": "math_toolkit.product_of_primes", "description": "Find the product of the first n prime numbers.", "parameters": { "type": "dict", "properties": { "count": { "type": "integer", "description": "The number of prime numbers to multiply together." } }, "required": [ "count" ] } } ], "ground_truth": [ { "math_toolkit.sum_of_multiples": { "lower_limit": [ 1 ], "upper_limit": [ 1000 ], "multiples": [ [ 3, 5 ] ] } }, { "math_toolkit.product_of_primes": { "count": [ 5 ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "math_toolkit.sum_of_multiples", "description": "Find the sum of all multiples of specified numbers within a specified range.", "parameters": { "type": "object", "properties": { "lower_limit": { "type": "integer", "description": "The start of the range (inclusive)." }, "upper_limit": { "type": "integer", "description": "The end of the range (inclusive)." }, "multiples": { "type": "array", "items": { "type": "integer" }, "description": "The numbers to find multiples of." } }, "required": [ "lower_limit", "upper_limit", "multiples" ] } } }, { "type": "function", "function": { "name": "math_toolkit.product_of_primes", "description": "Find the product of the first n prime numbers.", "parameters": { "type": "object", "properties": { "count": { "type": "integer", "description": "The number of prime numbers to multiply together." } }, "required": [ "count" ] } } } ] }, { "role": "human", "text": "Find the sum of all the multiples of 3 and 5 between 1 and 1000. Also find the product of the first five prime numbers." }, { "role": "assistant", "tool-call": [ { "name": "math_toolkit.sum_of_multiples", "arguments": "{\"lower_limit\": 1, \"upper_limit\": 1000, \"multiples\": [3, 5]}" }, { "name": "math_toolkit.product_of_primes", "arguments": "{\"count\": 5}" } ] } ]json/bfcl-v3-rest/sample-0.json
Original
{ "id": "rest_0", "question": [ [ { "role": "user", "content": "Can you provide me with the timezone information for the GPS coordinates of the Eiffel Tower (having latitude of 48.8584 and longitude of 2.2945), ensuring the response data is in a compact format, using my API key 'YOUR-RAPID-API-KEY' and the host 'timezone-by-location.p.rapidapi.com'?" } ] ], "function": [ { "name": "requests.get", "description": "Sends a GET request to the specified URL.", "parameters": { "type": "dict", "properties": { "url": { "type": "string", "description": "Convert any GPS Lat/Lon location into its timezone", "default": "https://timezone-by-location.p.rapidapi.com/timezone" }, "headers": { "properties": { "X-RapidAPI-Key": { "type": "string", "description": "The API key for authenticating requests to RapidAPI." }, "X-RapidAPI-Host": { "type": "string", "description": "The host domain for the RapidAPI service being accessed." } }, "type": "dict", "required": [ "X-RapidAPI-Key", "X-RapidAPI-Host" ] }, "timeout": { "type": "integer", "description": "How many seconds to wait for the server to send data before giving up." }, "params": { "properties": { "lat": { "type": "float", "description": "Latitude of the position for which the timezone is being requested." }, "lon": { "type": "float", "description": "Longitude of the position for which the timezone is being requested." }, "c": { "type": "integer", "description": "Optional. Return compact JSON. Useful for reducing the size of the response data." }, "s": { "type": "integer", "description": "Optional. Additional parameter, specifics not provided." } }, "type": "dict", "required": [ "lat", "lon" ] }, "allow_redirects": { "type": "boolean", "description": "A Boolean to enable/disable redirection.", "default": true }, "auth": { "type": "tuple", "description": "A tuple to enable a certain HTTP authentication.", "default": "None", "items": { "type": "string" } }, "cert": { "type": "string", "description": "A String or Tuple specifying a cert file or key.", "default": "None" }, "cookies": { "type": "dict", "additionalProperties": { "type": "string" }, "description": "Dictionary of cookies to send with the request." }, "proxies": { "type": "dict", "additionalProperties": { "type": "string" }, "description": "Dictionary of the protocol to the proxy url." }, "stream": { "type": "boolean", "description": "A Boolean indication if the response should be immediately downloaded (False) or streamed (True).", "default": false }, "verify": { "type": "string", "description": "A Boolean or a String indication to verify the servers TLS certificate or not.", "default": true } }, "required": [ "url" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "requests.get", "description": "Sends a GET request to the specified URL.", "parameters": { "type": "object", "properties": { "url": { "type": "string", "description": "Convert any GPS Lat/Lon location into its timezone", "default": "https://timezone-by-location.p.rapidapi.com/timezone" }, "headers": { "properties": { "X-RapidAPI-Key": { "type": "string", "description": "The API key for authenticating requests to RapidAPI." }, "X-RapidAPI-Host": { "type": "string", "description": "The host domain for the RapidAPI service being accessed." } }, "type": "object", "required": [ "X-RapidAPI-Key", "X-RapidAPI-Host" ] }, "timeout": { "type": "integer", "description": "How many seconds to wait for the server to send data before giving up." }, "params": { "properties": { "lat": { "type": "float", "description": "Latitude of the position for which the timezone is being requested." }, "lon": { "type": "float", "description": "Longitude of the position for which the timezone is being requested." }, "c": { "type": "integer", "description": "Optional. Return compact JSON. Useful for reducing the size of the response data." }, "s": { "type": "integer", "description": "Optional. Additional parameter, specifics not provided." } }, "type": "object", "required": [ "lat", "lon" ] }, "allow_redirects": { "type": "boolean", "description": "A Boolean to enable/disable redirection.", "default": true }, "auth": { "type": "tuple", "description": "A tuple to enable a certain HTTP authentication.", "default": "None", "items": { "type": "string" } }, "cert": { "type": "string", "description": "A String or Tuple specifying a cert file or key.", "default": "None" }, "cookies": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Dictionary of cookies to send with the request." }, "proxies": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Dictionary of the protocol to the proxy url." }, "stream": { "type": "boolean", "description": "A Boolean indication if the response should be immediately downloaded (False) or streamed (True).", "default": false }, "verify": { "type": "string", "description": "A Boolean or a String indication to verify the servers TLS certificate or not.", "default": true } }, "required": [ "url" ] } } } ] }, { "role": "human", "text": "Can you provide me with the timezone information for the GPS coordinates of the Eiffel Tower (having latitude of 48.8584 and longitude of 2.2945), ensuring the response data is in a compact format, using my API key 'YOUR-RAPID-API-KEY' and the host 'timezone-by-location.p.rapidapi.com'?" } ]json/bfcl-v3-simple/sample-0.json
Original
{ "id": "simple_0", "question": [ [ { "role": "user", "content": "Find the area of a triangle with a base of 10 units and height of 5 units." } ] ], "function": [ { "name": "calculate_triangle_area", "description": "Calculate the area of a triangle given its base and height.", "parameters": { "type": "dict", "properties": { "base": { "type": "integer", "description": "The base of the triangle." }, "height": { "type": "integer", "description": "The height of the triangle." }, "unit": { "type": "string", "description": "The unit of measure (defaults to 'units' if not specified)" } }, "required": [ "base", "height" ] } } ], "ground_truth": [ { "calculate_triangle_area": { "base": [ 10 ], "height": [ 5 ], "unit": [ "units", "" ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "calculate_triangle_area", "description": "Calculate the area of a triangle given its base and height.", "parameters": { "type": "object", "properties": { "base": { "type": "integer", "description": "The base of the triangle." }, "height": { "type": "integer", "description": "The height of the triangle." }, "unit": { "type": "string", "description": "The unit of measure (defaults to 'units' if not specified)" } }, "required": [ "base", "height" ] } } } ] }, { "role": "human", "text": "Find the area of a triangle with a base of 10 units and height of 5 units." }, { "role": "assistant", "tool-call": [ { "name": "calculate_triangle_area", "arguments": "{\"base\": 10, \"height\": 5, \"unit\": \"units\"}" } ] } ]json/bfcl-v3-sql/sample-0.json
Original
{ "id": "sql_0", "question": [ { "role": "user", "content": "What is the name of the student in the 'students' table with the ID 1234, if we consider the columns 'id' and 'name' and the condition 'id = 1234'?" } ], "function": [ { "name": "sql.execute", "description": "Execute SQL queries based on user-defined parameters like SQL keyword, table name, column names, and conditions.", "parameters": { "type": "dict", "properties": { "sql_keyword": { "type": "string", "enum": [ "SELECT", "INSERT", "UPDATE", "DELETE", "CREATE" ], "description": "The SQL keyword to define the type of operation." }, "table_name": { "type": "string", "description": "The name of the database table to operate on." }, "columns": { "type": "array", "items": { "type": "string" }, "description": "The column names involved in the SQL operation. If not specified use '*' to represent all columns." }, "insert_values": { "type": "array", "description": "Values of an INSERT statement.", "items": { "type": "array", "items": { "type": "string" } } }, "update_values": { "type": "array", "description": "Values of an UPDATE statement corresponding to columns to set.", "items": { "type": "string" } }, "conditions": { "type": "array", "description": "Conditions for the SQL operation, formatted as a SQL WHERE clause. Put them in the format of ['cond1 > val1', 'cond2 = val2', 'cond3<val3'] and etc.", "items": { "type": "array", "items": { "type": "string" } } } }, "required": [ "sql_keyword", "table_name" ] } } ], "ground_truth": [ { "sql.execute": { "sql_keyword": [ "SELECT" ], "table_name": [ "students" ], "columns": [ [ "name" ] ], "conditions": [ [ "id = 1234" ] ] } } ] }Converted
[ { "role": "system", "tools": [ { "type": "function", "function": { "name": "sql.execute", "description": "Execute SQL queries based on user-defined parameters like SQL keyword, table name, column names, and conditions.", "parameters": { "type": "object", "properties": { "sql_keyword": { "type": "string", "enum": [ "SELECT", "INSERT", "UPDATE", "DELETE", "CREATE" ], "description": "The SQL keyword to define the type of operation." }, "table_name": { "type": "string", "description": "The name of the database table to operate on." }, "columns": { "type": "array", "items": { "type": "string" }, "description": "The column names involved in the SQL operation. If not specified use '*' to represent all columns." }, "insert_values": { "type": "array", "description": "Values of an INSERT statement.", "items": { "type": "array", "items": { "type": "string" } } }, "update_values": { "type": "array", "description": "Values of an UPDATE statement corresponding to columns to set.", "items": { "type": "string" } }, "conditions": { "type": "array", "description": "Conditions for the SQL operation, formatted as a SQL WHERE clause. Put them in the format of ['cond1 > val1', 'cond2 = val2', 'cond3<val3'] and etc.", "items": { "type": "array", "items": { "type": "string" } } } }, "required": [ "sql_keyword", "table_name" ] } } } ] }, { "role": "human", "text": "What is the name of the student in the 'students' table with the ID 1234, if we consider the columns 'id' and 'name' and the condition 'id = 1234'?" }, { "role": "assistant", "tool-call": [ { "name": "sql.execute", "arguments": "{\"sql_keyword\": \"SELECT\", \"table_name\": \"students\", \"columns\": [\"name\"], \"conditions\": [\"id = 1234\"]}" } ] } ]NOTE, the original function definitions were stored in separate files, here is one example:
multi-turn-func-doc/gorilla-file-system.jsonl
{"name": "cat", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Display the contents of a file of any extension from currrent directory.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the file from current directory to display. No path is allowed. "}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {"file_content": {"type": "string", "description": "The content of the file."}}}} {"name": "cd", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Change the current working directory to the specified folder.", "parameters": {"type": "dict", "properties": {"folder": {"type": "string", "description": "The folder of the directory to change to. You can only change one folder at a time. "}}, "required": ["folder"]}, "response": {"type": "dict", "properties": {"current_working_directory": {"type": "string", "description": "The new current working directory path."}}}} {"name": "cp", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Copy a file or directory from one location to another. If the destination is a directory, the source file or directory will be copied into the destination directory. Both source and destination must be local to the current directory.", "parameters": {"type": "dict", "properties": {"source": {"type": "string", "description": "The name of the file or directory to copy."}, "destination": {"type": "string", "description": "The destination name to copy the file or directory to. If the destination is a directory, the source will be copied into this directory. No file paths allowed. "}}, "required": ["source", "destination"]}, "response": {"type": "dict", "properties": {"result": {"type": "string", "description": "The result of the copy operation or an error message if the operation fails."}}}} {"name": "diff", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.", "parameters": {"type": "dict", "properties": {"file_name1": {"type": "string", "description": "The name of the first file in current directory."}, "file_name2": {"type": "string", "description": "The name of the second file in current directorry. "}}, "required": ["file_name1", "file_name2"]}, "response": {"type": "dict", "properties": {"diff_lines": {"type": "string", "description": "The differences between the two files."}}}} {"name": "du", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Estimate the disk usage of a directory and its contents.", "parameters": {"type": "dict", "properties": {"human_readable": {"type": "boolean", "description": "If True, returns the size in human-readable format (e.g., KB, MB). ", "default": false}}, "required": []}, "response": {"type": "dict", "properties": {"disk_usage": {"type": "string", "description": "The estimated disk usage."}}}} {"name": "echo", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Write content to a file at current directory or display it in the terminal.", "parameters": {"type": "dict", "properties": {"content": {"type": "string", "description": "The content to write or display."}, "file_name": {"type": "string", "description": "The name of the file at current directory to write the content to. Defaults to None. ", "default": "None"}}, "required": ["content"]}, "response": {"type": "dict", "properties": {"terminal_output": {"type": "string", "description": "The content if no file name is provided, or None if written to file."}}}} {"name": "find", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name. This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.", "parameters": {"type": "dict", "properties": {"path": {"type": "string", "description": "The directory path to start the search. Defaults to the current directory (\".\").", "default": "."}, "name": {"type": "string", "description": "The name of the file or directory to search for. If None, all items are returned. ", "default": "None"}}, "required": []}, "response": {"type": "dict", "properties": {"matches": {"type": "array", "description": "A list of matching file and directory paths relative to the given path.", "items": {"type": "string"}}}}} {"name": "grep", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory."}, "pattern": {"type": "string", "description": "The pattern to search for. "}}, "required": ["file_name", "pattern"]}, "response": {"type": "dict", "properties": {"matching_lines": {"type": "array", "description": "Lines that match the pattern.", "items": {"type": "string"}}}}} {"name": "ls", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: List the contents of the current directory.", "parameters": {"type": "dict", "properties": {"a": {"type": "boolean", "description": "Show hidden files and directories. Defaults to False. ", "default": false}}, "required": []}, "response": {"type": "dict", "properties": {"current_directory_content": {"type": "array", "description": "A list of the contents of the specified directory.", "items": {"type": "string"}}}}} {"name": "mkdir", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Create a new directory in the current directory.", "parameters": {"type": "dict", "properties": {"dir_name": {"type": "string", "description": "The name of the new directory at current directory. You can only create directory at current directory."}}, "required": ["dir_name"]}, "response": {"type": "dict", "properties": {}}} {"name": "mv", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another. so", "parameters": {"type": "dict", "properties": {"source": {"type": "string", "description": "Source name of the file or directory to move. Source must be local to the current directory."}, "destination": {"type": "string", "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. "}}, "required": ["source", "destination"]}, "response": {"type": "dict", "properties": {"result": {"type": "string", "description": "The result of the move operation."}}}} {"name": "pwd", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Return the current working directory path.", "parameters": {"type": "dict", "properties": {}, "required": []}, "response": {"type": "dict", "properties": {"current_working_directory": {"type": "string", "description": "The current working directory path."}}}} {"name": "rm", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Remove a file or directory.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the file or directory to remove. "}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {"result": {"type": "string", "description": "The result of the remove operation."}}}} {"name": "rmdir", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Remove a directory at current directory.", "parameters": {"type": "dict", "properties": {"dir_name": {"type": "string", "description": "The name of the directory to remove. Directory must be local to the current directory. "}}, "required": ["dir_name"]}, "response": {"type": "dict", "properties": {"result": {"type": "string", "description": "The result of the remove operation."}}}} {"name": "sort", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the file appeared at current directory to sort. "}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {"sorted_content": {"type": "string", "description": "The sorted content of the file."}}}} {"name": "tail", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Display the last part of a file of any extension.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the file to display. No path is allowed and you can only perform on file at local directory."}, "lines": {"type": "integer", "description": "The number of lines to display from the end of the file. Defaults to 10. ", "default": 10}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {"last_lines": {"type": "string", "description": "The last part of the file."}}}} {"name": "touch", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Create a new file of any extension in the current directory.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "The name of the new file in the current directory. file_name is local to the current directory and does not allow path."}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {}}} {"name": "wc", "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Count the number of lines, words, and characters in a file of any extension from current directory.", "parameters": {"type": "dict", "properties": {"file_name": {"type": "string", "description": "Name of the file of current directory to perform wc operation on."}, "mode": {"type": "string", "description": "Mode of operation ('l' for lines, 'w' for words, 'c' for characters). ", "default": "l"}}, "required": ["file_name"]}, "response": {"type": "dict", "properties": {"count": {"type": "integer", "description": "The count of the number of lines, words, or characters in the file."}, "type": {"type": "string", "description": "The type of unit we are counting. [Enum]: [\"lines\", \"words\", \"characters\"]"}}}}Summary by Sourcery
Add the Berkeley Function Calling Leaderboard as a new audformat/audb dataset with conversion, enrichment, and publication tooling.
New Features:
Enhancements:
Build:
Chores: