Felix-Ma/Berkeley-Function-Calling-Leaderboard huggingface dataset:
user: I'm working on a travel itinerary across various time zones and need to schedule meetings in different cities globally. Could you help me find out the time zones for the following coordinates: longitude 77.1025 and latitude 28.7041, longitude -73.935242 and latitude 40.730610, longitude 151.2093 and latitude 33.8688, and longitude 139.6917 and latitude 35.6895?

Available functions:
name: get_time_zone_by_coord
description: Finds the timezone of a coordinate.
parameters: type: dict
properties: long: type: string
description: The longitude of the coordinate.
lat: type: string
description: The latitude of the coordinate.
required: long
lat

Ground-truth function call(s):
get_time_zone_by_coord(long='77.1025', lat='28.7041')
get_time_zone_by_coord(long='-73.935242', lat='40.730610')
get_time_zone_by_coord(long='151.2093', lat='33.8688')
get_time_zone_by_coord(long='139.6917', lat='35.6895')
user: I'm planning a series of business trips to various international cities and need to prepare for the weather conditions I'll encounter. Could you provide me with the current weather for Los Angeles (34.0522, -118.2437), London (51.5074, -0.1278), Cape Town (-33.9249, 18.4241), and Paris (48.8566, 2.3522)?

Available functions:
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

Ground-truth function call(s):
get_weather_data(coordinates=[34.0522, -118.2437])
get_weather_data(coordinates=[51.5074, -0.1278])
get_weather_data(coordinates=[-33.9249, 18.4241])
get_weather_data(coordinates=[48.8566, 2.3522])
user: I'm doing an analysis on our network traffic and need to identify the zip codes for several IP addresses that have come up in the logs. Could you find the zip codes for '192.168.1.1', '172.16.254.1', '10.0.0.1', and '203.0.113.0'? It would really help to understand the potential sources of the traffic.

Available functions:
name: get_zipcode_by_ip_address
description: Finds the zipcode of an IP address.
parameters: type: dict
properties: ip_address: type: string
description: The IP address to find the location of.
required: ip_address

Ground-truth function call(s):
get_zipcode_by_ip_address(ip_address='192.168.1.1')
get_zipcode_by_ip_address(ip_address='172.16.254.1')
get_zipcode_by_ip_address(ip_address='10.0.0.1')
get_zipcode_by_ip_address(ip_address='203.0.113.0')
user: I'm working on a project that involves some heavy matrix calculations, and I need to multiply several pairs of matrices to analyze the data. Could you multiply these sets of matrices: [[1, 2, 3], [4, 5, 6], [7, 8, 9]] with [[10, 11, 12], [13, 14, 15], [16, 17, 18]]; [[19, 20], [21, 22]] with [[23, 24], [25, 26]]; [[27, 28, 29, 30], [31, 32, 33, 34]] with [[35, 36, 37, 38], [39, 40, 41, 42]]; and [[43, 44], [45, 46]] with [[47, 48], [49, 50]]?

Available functions:
name: mat_mul
description: Multiplies two matrices.
parameters: type: dict
properties: matA: type: array
description: The first matrix.
items: type: integer
matB: type: array
description: The second matrix.
items: type: integer
required: matA
matB

Ground-truth function call(s):
mat_mul(matA=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], matB=[[10, 11, 12], [13, 14, 15], [16, 17, 18]])
mat_mul(matA=[[19, 20], [21, 22]], matB=[[23, 24], [25, 26]])
mat_mul(matA=[[27, 28, 29, 30], [31, 32, 33, 34]], matB=[[35, 36, 37, 38], [39, 40, 41, 42]])
mat_mul(matA=[[43, 44], [45, 46]], matB=[[47, 48], [49, 50]])
user: Could you please provide the factorial results for the numbers 5, 7, 10, and 12?

Available functions:
name: math_factorial
description: Calculates the factorial of a number.
parameters: type: dict
properties: n: type: integer
description: The number to calculate the factorial of.
required: n

Ground-truth function call(s):
math_factorial(n=5)
math_factorial(n=7)
math_factorial(n=10)
math_factorial(n=12)
user: I need the greatest common divisors for my math assignment, specifically for these pairs: 45 and 60, 81 and 27, 144 and 96, and 100 and 80. Can you provide the GCDs for all these pairs?

Available functions:
name: math_gcd
description: Calculates the greatest common divisor of two numbers.
parameters: type: dict
properties: a: type: integer
description: The first number. This should be the larger number.
b: type: integer
description: The second number.
required: a
b

Ground-truth function call(s):
math_gcd(a=45, b=60)
math_gcd(a=81, b=27)
math_gcd(a=144, b=96)
math_gcd(a=100, b=80)
user: I need to calculate the least common multiples for a set of number pairs for a small programming project I'm working on. Could you determine the LCMs for the pairs 35 and 45, 72 and 108, 120 and 180, and 200 and 300? These calculations will help me optimize a part of my code related to scheduling tasks.

Available functions:
name: math_lcm
description: Calculates the least common multiple of two numbers.
parameters: type: dict
properties: a: type: integer
description: The first number. This should be the larger number.
b: type: integer
description: The second number.
required: a
b

Ground-truth function call(s):
math_lcm(a=45, b=35)
math_lcm(a=72, b=108)
math_lcm(a=120, b=180)
math_lcm(a=200, b=300)
user: I'm evaluating several mortgage options and need to calculate the monthly payments for different loan scenarios: a $350,000 loan with a 3.5% interest rate over 30 years, a $500,000 loan with a 4% interest rate over 20 years, a $750,000 loan at a 2.5% interest rate with a term of 15 years, and a $1,000,000 loan at a 3% interest rate to be paid off in 10 years. Could you provide me the monthly payment amounts for each of these loans?

Available functions:
name: mortgage_calculator
description: Calculates the monthly mortgage payment.
parameters: type: dict
properties: loan_amount: type: float
description: The amount of the loan.
interest_rate: type: float
description: The interest rate of the loan, ranging from 0 to 1.
loan_period: type: integer
description: The period of the loan, in years.
required: loan_amount
interest_rate
loan_period

Ground-truth function call(s):
mortgage_calculator(loan_amount=350000, interest_rate=0.035, loan_period=30)
mortgage_calculator(loan_amount=500000, interest_rate=0.04, loan_period=20)
mortgage_calculator(loan_amount=750000, interest_rate=0.025, loan_period=15)
mortgage_calculator(loan_amount=1000000, interest_rate=0.03, loan_period=10)
user: I need to solve a few quadratic equations for a math assignment. Could you calculate the roots for these sets of coefficients: 3, 7, and 2; 5, 12, and 4; 8, 16, and 6; and 10, 20, and 8? I'm trying to understand the pattern of the roots in relation to the coefficients.

Available functions:
name: quadratic_roots
description: Calculates the roots of a quadratic equation.
parameters: type: dict
properties: a: type: integer
description: The first coefficient.
b: type: integer
description: The second coefficient.
c: type: integer
description: The third coefficient.
required: a
b
c

Ground-truth function call(s):
quadratic_roots(a=3, b=7, c=2)
quadratic_roots(a=5, b=12, c=4)
quadratic_roots(a=8, b=16, c=6)
quadratic_roots(a=10, b=20, c=8)
user: I'm working on a real estate project that requires me to analyze various properties in different cities, and I need to match the zip codes '90210', '10001', '60601', and '94102' with their respective cities for my market analysis. This information will be crucial for my next meeting with the investors. Could you help me find the cities for these zip codes?

Available functions:
name: retrieve_city_based_on_zipcode
description: Finds the city of a zipcode.
parameters: type: dict
properties: zipcode: type: string
description: The zipcode of the city.
required: zipcode

Ground-truth function call(s):
retrieve_city_based_on_zipcode(zipcode='90210')
retrieve_city_based_on_zipcode(zipcode='10001')
retrieve_city_based_on_zipcode(zipcode='60601')
retrieve_city_based_on_zipcode(zipcode='94102')
user: I'm planning an international conference and need to consider public holidays when scheduling. Could you retrieve the list of holidays for the United States in 2018, Germany in 2020, Spain in 2019, and the United Kingdom in 2021? It's crucial these dates are accurate to avoid any clashes with national holidays.

Available functions:
name: retrieve_holiday_by_year
description: Finds the holidays of a year.
parameters: type: dict
properties: year: type: string
description: The year of the holidays.
country: type: string
description: The country of the holidays. Possible options: US, AT, DE, ES, FR, GB, IT, NL, PL, RO, SK, UA.
required: year
country

Ground-truth function call(s):
retrieve_holiday_by_year(year='2018', country='US')
retrieve_holiday_by_year(year='2020', country='DE')
retrieve_holiday_by_year(year='2019', country='ES')
retrieve_holiday_by_year(year='2021', country='GB')
user: Please sort the list [5, 2, 9, 1, 7] in ascending order, [3, 8, 6, 4] in descending order, [10, 20, 30, 40, 50] in ascending order, and [100, 200, 300, 400, 500] in descending order.

Available functions:
name: sort_array
description: Sorts an array of numbers.
parameters: type: dict
properties: array: type: array
items: type: integer
description: The array of numbers.
reverse: type: boolean
description: Whether to sort the array in reverse order, i.e., descending order. Default is False
default: no
required: array

Ground-truth function call(s):
sort_array(array=[5, 2, 9, 1, 7])
sort_array(array=[3, 8, 6, 4], reverse=True)
sort_array(array=[10, 20, 30, 40, 50])
sort_array(array=[100, 200, 300, 400, 500], reverse=True)
user: I need to perform a series of binary number additions: add 0011 with 1100, 1010 with 0101, 1111 with 0000, and 0001 with 1110. Let me know the results for each pair, please.

Available functions:
name: add_binary_numbers
description: Adds two binary numbers.
parameters: type: dict
properties: a: type: string
description: The first binary number.
b: type: string
description: The second binary number.
required: a
b

Ground-truth function call(s):
add_binary_numbers(a='0011', b='1100')
add_binary_numbers(a='1010', b='0101')
add_binary_numbers(a='1111', b='0000')
add_binary_numbers(a='0001', b='1110')
user: I'm working on a project that involves predicting future trends based on past data. Could you calculate the projected y-values using a linear regression model for the following sets of points: for x-coordinates [1, 2, 3] and y-coordinates [4, 5, 6], estimate y at x=10; for x-coordinates [2, 4, 6] and y-coordinates [8, 10, 12], estimate y at x=15; for x-coordinates [3, 6, 9] and y-coordinates [12, 15, 18], estimate y at x=20; and for x-coordinates [4, 8, 12] and y-coordinates [16, 20, 24], estimate y at x=25?

Available functions:
name: linear_regression
description: Finds the linear regression of a set of points and evaluates it at a given point.
parameters: type: dict
properties: x: type: array
description: The x coordinates of the points.
items: type: integer
y: type: array
description: The y coordinates of the points.
items: type: integer
point: type: integer
description: The point to calculate the linear regression at.
required: x
y
point

Ground-truth function call(s):
linear_regression(x=[1,2,3],y=[4,5,6],point=10)
linear_regression(x=[2,4,6],y=[8,10,12],point=15)
linear_regression(x=[3,6,9],y=[12,15,18],point=20)
linear_regression(x=[4,8,12],y=[16,20,24],point=25)
user: I'm working on a project that involves analyzing geometric patterns, and I need to figure out the maximum number of points that lie on a single straight line within various sets of coordinates. Could you help me with this? For the sets of points [[1,1],[2,2],[3,4],[5,5]], [[1,2],[3,2],[5,2],[4,2]], [[0,0],[1,1],[0,1],[1,0]], and [[1,1],[3,2],[5,3],[7,4]], please provide the maximum number of collinear points for each set of coordinates.

Available functions:
name: maxPoints
description: Finds the maximum number of points on a line.
parameters: type: dict
properties: points: type: array
items: type: array
items: type: integer
description: A point represented by a 2 element list [x, y].
description: The list of points. Points are 2 element lists.
required: points

Ground-truth function call(s):
maxPoints(points=[[1,1],[2,2],[3,4],[5,5]])
maxPoints(points=[[1,2],[3,2],[5,2],[4,2]])
maxPoints(points=[[0,0],[1,1],[0,1],[1,0]])
maxPoints(points=[[1,1],[3,2],[5,3],[7,4]])
user: I'm considering some investment scenarios and would like to understand the potential growth of my capital over different time frames and varying conditions. Could you calculate the real value of an initial investment of $1,000,000 with an annual addition of $1,000 over 3 years at a 10% annual return, considering inflation rates of 1% for the first year and 4% for the next two years? Also, for a second scenario, starting with $500,000 and adding $500 annually over 5 years with a 7% return and inflation rates of 2%, 3%, 2%, 3%, and 2%, what will the value be? For a smaller initial sum of $250,000 with a $2,000 annual contribution over 7 years at a 5% return, with inflation alternating between 1% and 2%, what is the adjusted value? Lastly, with an $800,000 initial investment, adding $1,500 yearly for 10 years at an 8% return, considering inflation oscillating between 1% and 2% every other year, what would be the final adjusted value?

Available functions:
name: calculate_investment_value
description: Calculates the value of an investment over time.
parameters: type: dict
properties: initial_investment: type: integer
description: The initial investment amount.
annual_contribution: type: float
description: The annual contribution amount.
years: type: integer
description: The number of years to calculate the investment value for.
annual_return: type: float
description: The annual return rate, ranging from 0 to 1.
inflation_rate: type: array
items: type: float
description: The inflation rate for each year in percentage, ranging from 0 to 1.
adjust_for_inflation: type: boolean
default: yes
description: Whether to adjust the investment value for inflation.
required: initial_investment
annual_contribution
years
annual_return
inflation_rate

Ground-truth function call(s):
calculate_investment_value(initial_investment=1000000, annual_contribution=1000, years=3, annual_return=0.1, inflation_rate=[0.01, 0.04, 0.04])
calculate_investment_value(initial_investment=500000, annual_contribution=500, years=5, annual_return=0.07, inflation_rate=[0.02, 0.03, 0.02, 0.03, 0.02])
calculate_investment_value(initial_investment=250000, annual_contribution=2000, years=7, annual_return=0.05, inflation_rate=[0.01, 0.02, 0.01, 0.02, 0.01, 0.02, 0.01])
calculate_investment_value(initial_investment=800000, annual_contribution=1500, years=10, annual_return=0.08, inflation_rate=[0.01, 0.02, 0.01, 0.02, 0.01, 0.02, 0.01, 0.02, 0.01, 0.02])
user: I'm working on a new fitness plan and need to tailor it specifically for a few clients with different profiles. Could you help me calculate the daily nutritional needs for a 25-year-old male (180 cm, 75 kg, moderately active, weight gain), a 30-year-old female (165 cm, 65 kg, lightly active, weight maintenance), a 40-year-old male (175 cm, 85 kg, very active, weight loss), and a 55-year-old female (160 cm, 70 kg, not very active, weight loss)?

Available functions:
name: calculate_nutritional_needs
description: Calculates the nutritional needs of a person based on their weight, height, age, gender, activity level, and goal.
parameters: type: dict
properties: weight: type: float
description: The weight of the person in kilograms.
height: type: float
description: The height of the person in centimeters.
age: type: float
description: The age of the person in years.
gender: type: string
description: The gender of the person. Possible options [male, female, other].
activity_level: type: float
description: The activity level of the person. Possible options [1,2,3,4,5].
goal: type: string
description: The goal of the person. Possible options [lose, gain, maintain].
required: weight
height
age
gender
activity_level
goal

Ground-truth function call(s):
calculate_nutritional_needs(weight=75, height=180, age=25, gender='male', activity_level=3, goal='gain')
calculate_nutritional_needs(weight=65, height=165, age=30, gender='female', activity_level=2, goal='maintain')
calculate_nutritional_needs(weight=85, height=175, age=40, gender='male', activity_level=5, goal='lose')
calculate_nutritional_needs(weight=70, height=160, age=55, gender='female', activity_level=1, goal='lose')
user: I'm planning a small get-together this weekend and I'd like to order some food for my guests. For the order, I want 10 burgers at $5 each, 7 ice creams at $2 each, 3 pizzas at $8 each, and 12 donuts at $1 each. Could you calculate the total cost for these items using your ordering system?

Available functions:
name: order_food
description: Orders food for a customer.Return the total price.
parameters: type: dict
properties: item: type: array
items: type: string
description: the name of the product, possible options ['fries', 'dumplings', 'pizza', 'soda', 'salad', 'rice bowl', 'burger', 'cake', 'cookie', 'ice cream', 'sandwich', 'hot dog', 'noodles', 'chicken', 'beef', 'pork', 'fish', 'shrimp', 'lobster', 'crab', 'steak'].
quantity: type: array
items: type: integer
description: the number of the product purchased.
price: type: array
items: type: float
description: the number of the product purchased.
required: item
quantity
price

Ground-truth function call(s):
order_food(item=['burger'], quantity=[10], price=[5])
order_food(item=['ice cream'], quantity=[7], price=[2])
order_food(item=['pizza'], quantity=[3], price=[8])
order_food(item=['donut'], quantity=[12], price=[1])
user: We're planning a dinner and decided to order 101 dumplings at $0.1 each, 20 rice bowls at $10 each, 50 spring rolls at $0.5 each, and 10 noodle soups at $3 each. I need to know the total cost for our meal. Can you work that out for me?

Available functions:
name: order_food
description: Orders food for a customer.Return the total price.
parameters: type: dict
properties: item: type: array
items: type: string
description: the name of the product, possible options ['fries', 'dumplings', 'pizza', 'soda', 'salad', 'rice bowl', 'burger', 'cake', 'cookie', 'ice cream', 'sandwich', 'hot dog', 'noodles', 'chicken', 'beef', 'pork', 'fish', 'shrimp', 'lobster', 'crab', 'steak'].
quantity: type: array
items: type: integer
description: the number of the product purchased.
price: type: array
items: type: float
description: the number of the product purchased.
required: item
quantity
price

Ground-truth function call(s):
order_food(item=['dumplings'], quantity=[101], price=[0.1])
order_food(item=['rice bowl'], quantity=[20], price=[10])
order_food(item=['spring rolls'], quantity=[50], price=[0.5])
order_food(item=['noodle soup'], quantity=[10], price=[3])
user: I'm having a Tarantino movie marathon tonight and want to make sure I've got my facts straight for the trivia session with my friends. Can you fetch me the directors for the movies 'Pulp Fiction,' 'Reservoir Dogs,' 'Kill Bill,' and 'Django Unchained'? I'll need this info to impress the gang.

Available functions:
name: get_movie_director
description: Fetches the director of a movie from the OMDB API.
parameters: type: dict
properties: movie_name: type: string
description: The name of the movie.
required: movie_name

Ground-truth function call(s):
get_movie_director(movie_name='Pulp Fiction')
get_movie_director(movie_name='Reservoir Dogs')
get_movie_director(movie_name='Kill Bill')
get_movie_director(movie_name='Django Unchained')
user: I've been on a classic film binge lately and have a few iconic movies lined up for my next movie night. My cousin is staying over, so I need to ensure the films are appropriate for us to watch together. Could you check the age ratings for 'Pulp Fiction', 'The Godfather', 'Schindler's List', and 'The Dark Knight'?

Available functions:
name: get_movie_rating
description: Fetches the age rating of a movie from the OMDB API.
parameters: type: dict
properties: movie_name: type: string
description: The name of the movie.
required: movie_name

Ground-truth function call(s):
get_movie_rating(movie_name='Pulp Fiction')
get_movie_rating(movie_name='The Godfather')
get_movie_rating(movie_name="Schindler's List")
get_movie_rating(movie_name='The Dark Knight')
user: I'm working on a project that requires calculating the areas of various plots of land based on their corner points. For the first plot, the corners are at [1,2], [3,4], [1,4], and [3,7]; the second one has corners at [5,5], [6,7], and [7,5]; the third plot's corners are at [2,1], [4,2], [3,4], and [1,3]; and the fourth plot, which has an irregular shape, has corners at [-1,0], [2,3], [0,4], and [-2,2]. Could you provide the area calculations for these four plots?

Available functions:
name: polygon_area
description: Calculate the area of a polygon given its vertices using the shoelace formula.
parameters: type: dict
properties: vertices: type: array
items: type: array
items: type: float
description: A single vertex represented by a 2 element list [x, y].
description: The vertices of the polygon, where each vertex is a 2 element list [x, y].
required: vertices

Ground-truth function call(s):
polygon_area(vertices=[[1,2],[3,4],[1,4],[3,7]])
polygon_area(vertices=[[5,5],[6,7],[7,5]])
polygon_area(vertices=[[2,1],[4,2],[3,4],[1,3]])
polygon_area(vertices=[[-1,0],[2,3],[0,4],[-2,2]])