Felix-Ma/Berkeley-Function-Calling-Leaderboard huggingface dataset:
user: 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?

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
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

Ground-truth function call(s):
calc_binomial_probability(n=20, k=5, p=1/6)
user: I'm working on a machine learning model, comparing the characteristics of two objects. The feature vectors for these objects are [0.5, 0.7, 0.2, 0.9, 0.1] for the first object and [0.4, 0.6, 0.3, 0.8, 0.2] for the second. To understand how similar these objects are, I need to calculate the cosine similarity between these two vectors. Can you help me with that?

Available functions:
name: calculate_cosine_similarity
description: Calculates the cosine similarity of two vectors.
parameters: type: dict
properties: vectorA: type: array
items: type: float
description: The first vector.
vectorB: type: array
items: type: float
description: The second vector.
required: vectorA
vectorB
name: get_stock_price_by_stock_name
description: Finds the price of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name

Ground-truth function call(s):
calculate_cosine_similarity(vectorA=[0.5, 0.7, 0.2, 0.9, 0.1], vectorB=[0.4, 0.6, 0.3, 0.8, 0.2])
user: I'm currently conducting a physics experiment, and I have this object that weighs 50 kilograms and takes up a space of about 10 cubic meters. Could you help me calculate the density of this object?

Available functions:
name: calculate_density
description: Calculates the density of an object.
parameters: type: dict
properties: mass: type: float
description: The mass of the object, in kilograms.
volume: type: float
description: The volume of the object, in cubic meters.
required: mass
volume
name: calculate_future_value
description: Calculates the future value of an investment.
parameters: type: dict
properties: present_value: type: float
description: The present value of the investment, in dollars.
interest_rate: type: float
description: The interest rate of the investment, ranging from 0 to 1.
periods: type: integer
description: The number of periods, in years.
required: present_value
interest_rate
periods
name: get_stock_price_by_stock_name
description: Finds the price of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name
name: get_rating_by_amazon_ASIN
description: Finds the rating of a product by its Amazon ASIN.
parameters: type: dict
properties: ASIN: type: string
description: The Amazon ASIN of the product.
required: ASIN

Ground-truth function call(s):
calculate_density(mass=50, volume=10)
user: I'm working on a physics experiment where we're tracking the movement of a special object. It starts off at 15 m/s, and we're accelerating it at a rate of 9.8 m/s². I need to calculate how far it will have traveled after 10 seconds. Can you crunch those numbers for me?

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
name: calculate_displacement
description: Calculates the displacement of an object.
parameters: type: dict
properties: initial_velocity: type: float
description: The initial velocity of the object, in meters per second.
acceleration: type: float
description: The acceleration of the object, in meters per second squared.
time: type: float
description: The time the object has been moving, in seconds.
required: initial_velocity
acceleration
time

Ground-truth function call(s):
calculate_displacement(initial_velocity=15.0, acceleration=9.8, time=10)
user: I'm conducting a physics experiment involving charged particles and electric fields. There's a particle that I've introduced into the field, and it carries a charge of exactly 5 coulombs. The electric field itself has a potential difference of 10 volts. I need to calculate the electrostatic potential energy for this scenario. Can you help me with that calculation?

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
name: calculate_electrostatic_potential_energy
description: Calculates the electrostatic potential energy.
parameters: type: dict
properties: charge: type: float
description: The charge of the object, in coulombs.
voltage: type: float
description: The voltage of the object, in volts.
required: charge
voltage

Ground-truth function call(s):
calculate_electrostatic_potential_energy(charge=5.0, voltage=10.0)
user: During a simulation of a high-speed pursuit, I'm trying to calculate the velocity a suspect's car would reach from a standstill after accelerating continuously for 12 seconds at a rate of 9.8 meters per second squared. Could you compute the final velocity for me based on these figures?

Available functions:
name: calculate_cosine_similarity
description: Calculates the cosine similarity of two vectors.
parameters: type: dict
properties: vectorA: type: array
items: type: float
description: The first vector.
vectorB: type: array
items: type: float
description: The second vector.
required: vectorA
vectorB
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
name: calculate_final_velocity
description: Calculates the final velocity of an object.
parameters: type: dict
properties: initial_velocity: type: float
description: The initial velocity of the object.
acceleration: type: float
description: The acceleration of the object.
time: type: float
description: The time the object has been moving.
required: initial_velocity
acceleration
time

Ground-truth function call(s):
calculate_final_velocity(initial_velocity=0, acceleration=9.8, time=12)
user: I'm considering the long-term growth of my savings and I've put $5000 into a fixed deposit with a steady annual interest rate of 5%. I'm planning to let it sit for a decade. Could you calculate the future value of my investment after 10 years?

Available functions:
name: calculate_future_value
description: Calculates the future value of an investment.
parameters: type: dict
properties: present_value: type: float
description: The present value of the investment, in dollars.
interest_rate: type: float
description: The interest rate of the investment, ranging from 0 to 1.
periods: type: integer
description: The number of periods, in years.
required: present_value
interest_rate
periods
name: get_fibonacci_sequence
description: Calculates the n numbers of the Fibonacci.
parameters: type: dict
properties: n: type: integer
description: The number of Fibonacci numbers to calculate.
required: n
name: sort_array
description: Sorts an array of numbers.
parameters: type: dict
properties: array: type: array
items: type: float
description: The array of numbers.
reverse: type: boolean
description: Whether to sort the array in reverse order, i.e., descending order.
default: no
required: array

Ground-truth function call(s):
calculate_future_value(present_value=5000, interest_rate=0.05, periods=10)
user: As a data analyst, I've been tracking the daily temperatures in a particular city over the last month. The temperatures I've logged range from 22 to 80 degrees Celsius, changing by 2 degrees each day. I need to calculate the average monthly temperature from this data set to understand the climate trend better. Can you help me with this?

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
name: calculate_mean
description: Calculates the mean of a list of numbers.
parameters: type: dict
properties: numbers: type: array
items: type: integer
description: The list of numbers.
required: numbers

Ground-truth function call(s):
calculate_mean(numbers=[22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80])
user: I'm developing an encryption algorithm and it involves creating permutations from the English alphabet. I need to know the number of different ways I can arrange 5 letters from the total 26. Could you calculate that for me?

Available functions:
name: calculate_future_value
description: Calculates the future value of an investment.
parameters: type: dict
properties: present_value: type: float
description: The present value of the investment, in dollars.
interest_rate: type: float
description: The interest rate of the investment, ranging from 0 to 1.
periods: type: integer
description: The number of periods, in years.
required: present_value
interest_rate
periods
name: calculate_permutations
description: Calculates the number of permutations of k elements from a set of n elements.
parameters: type: dict
properties: n: type: integer
description: The number of elements in the set.
k: type: integer
description: The number of elements to choose.
required: n
k
name: get_company_name_by_stock_name
description: Finds the company name of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name

Ground-truth function call(s):
calculate_permutations(n=26, k=5)
user: I've been tracking the closing prices of a specific stock over the last 10 trading days for a report on market volatility. The figures I've recorded are 1000, 2000, 3000, 4000, 5000, 7000, 9000, 15000, 20000, and 30000. To get a better understanding of the price fluctuation and the risk associated with this stock, I need to calculate the standard deviation of these closing prices. Could you provide me with that statistic?

Available functions:
name: calculate_standard_deviation
description: Calculates the standard deviation of a list of numbers.
parameters: type: dict
properties: numbers: type: array
items: type: integer
description: The list of numbers.
required: numbers
name: get_fibonacci_sequence
description: Calculates the n numbers of the Fibonacci.
parameters: type: dict
properties: n: type: integer
description: The number of Fibonacci numbers to calculate.
required: n

Ground-truth function call(s):
calculate_standard_deviation(numbers=[1000,2000,3000,4000,5000,7000,9000,15000,20000,30000])
user: I'm working on an architectural project for a new park, and the design includes a triangular section. I need to calculate the area of this triangle to continue with my planning. The dimensions I have are a base of 500 meters and a height of 300 meters. Can you help me figure out the total area with these measurements?

Available functions:
name: get_company_name_by_stock_name
description: Finds the company name of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name
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
name: calculate_triangle_area
description: Calculates the area of a triangle given its base and height.
parameters: type: dict
properties: base: type: integer
description: The base of the triangle, in meters.
height: type: integer
description: The height of the triangle, in meters.
required: base
height

Ground-truth function call(s):
calculate_triangle_area(base=500, height=300)
user: I need to prepare a report for a client who is planning to conduct a business transaction in Japan. They're looking to convert 5,000 Euros into Japanese Yen. To ensure the report is accurate, I need the converted amount in Yen using the current exchange rates. The currency codes I'll be working with are 'EUR' for Euros and 'JPY' for Yen. Can you provide me with the equivalent sum in Yen?

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
name: convert_currency
description: Converts a given amount from one currency to another using the ExchangeRate-API.
parameters: type: dict
properties: amount: type: float
description: The amount of money to convert, in the base currency.
from_currency: type: string
description: The ISO currency code for the base currency.
to_currency: type: string
description: The ISO currency code for the target currency.
required: amount
from_currency
to_currency
name: get_stock_history
description: Finds the price of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
interval: type: string
description: The interval of the stock history. Allows one of following : 5m|15m|30m|1h|1d|1wk|1mo|3mo
diffandsplits: type: string
description: The diff and splits of the stock history. Allows one of following : true|false. Default to false
required: stock_name
interval

Ground-truth function call(s):
convert_currency(amount=5000, from_currency='EUR', to_currency='JPY')
user: In my physics class, we're delving into kinematics, and I've been tasked with analyzing the motion of a particle. The equation f(x) = 3t^2 + 2t + 1 describes its position over time. I need to determine the velocity of this particle when t is 5 seconds. Velocity is the first derivative of the position function with respect to time, so I need to calculate that. Can you help me find the velocity using the appropriate function?

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
name: estimate_derivative
description: Estimate the derivative of a function at a given point.
parameters: type: dict
properties: function: type: string
description: The function to calculate the derivative of. This should be the string literal of lambda function
x: type: integer
description: The point to calculate the derivative at.
required: function
x

Ground-truth function call(s):
estimate_derivative(function='lambda x: 3*x**2 + 2*x + 1', x=5)
user: I've been hearing the slang term "lit" quite frequently these days and it's piqued my curiosity. I'm not entirely sure what it means, so I'm looking to find a definition that could shed some light on its usage and connotations. Can you find out what "lit" means on Urban Dictionary for me?

Available functions:
name: find_term_on_urban_dictionary
description: Finds the definition of a term on Urban Dictionary.
parameters: type: dict
properties: term: type: string
description: The term to find the definition of.
required: term
name: get_distance
description: Calculates the distance between two 2D points.
parameters: type: dict
properties: pointA: type: tuple
description: The first point.
items: type: float
pointB: type: tuple
description: The second point.
items: type: float
required: pointA
pointB
name: get_fibonacci_sequence
description: Calculates the n numbers of the Fibonacci.
parameters: type: dict
properties: n: type: integer
description: The number of Fibonacci numbers to calculate.
required: n
name: convert_currency
description: Converts a given amount from one currency to another using the ExchangeRate-API.
parameters: type: dict
properties: amount: type: float
description: The amount of money to convert, in the base currency.
from_currency: type: string
description: The ISO currency code for the base currency.
to_currency: type: string
description: The ISO currency code for the target currency.
required: amount
from_currency
to_currency

Ground-truth function call(s):
find_term_on_urban_dictionary(term="lit")
user: I'm working on a community art project and planning a large circular mural for a public space. To figure out how much paint I need to buy, I need to calculate the area of the circle I'll be painting. The wall space I've been given has a perfect circular area with a radius of 15 feet. Can you help me determine the area of this circle?

Available functions:
name: calculate_electrostatic_potential_energy
description: Calculates the electrostatic potential energy.
parameters: type: dict
properties: charge: type: float
description: The charge of the object, in coulombs.
voltage: type: float
description: The voltage of the object, in volts.
required: charge
voltage
name: geometry_area_circle
description: Calculates the area of a circle.
parameters: type: dict
properties: radius: type: integer
description: The radius of the circle, in feet.
required: radius

Ground-truth function call(s):
geometry_area_circle(radius=15)
user: I'm working on an in-depth article covering the current COVID-19 situation in Brazil, and it's crucial to have the latest figures to ensure the information I present is factual and up to date. I need to include the number of active COVID-19 cases in the country. Could you provide me with the most recent active case count for Brazil?

Available functions:
name: get_covid_death_by_country
description: Finds the most up to date total deaths of a country result from COVID.
parameters: type: dict
properties: country: type: string
description: The country to find the total deaths of, in the format of the country's full name.
required: country
name: get_active_covid_case_by_country
description: Finds the most up to date active cases of a country result from COVID.
parameters: type: dict
properties: country: type: string
description: The country to find the active cases of, in the format of the country's full name.
required: country

Ground-truth function call(s):
get_active_covid_case_by_country(country='Brazil')
user: While doing some financial analysis, I've been looking into the details of certain stocks, and 'AAPL' caught my attention. I'd like to know which company it represents. Could you help me find out the company name associated with the stock symbol 'AAPL'?

Available functions:
name: get_stock_price_by_stock_name
description: Finds the price of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name
name: mat_mul
description: Multiplies two matrices.
parameters: type: dict
properties: matA: type: array
description: The first matrix.
items: type: array
items: type: integer
matB: type: array
description: The second matrix.
items: type: array
items: type: integer
required: matA
matB
name: get_company_name_by_stock_name
description: Finds the company name of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
required: stock_name
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):
get_company_name_by_stock_name(stock_name='AAPL')
user: I'm currently investigating a security alert that flagged some unusual activity in our network. The IP address '192.168.1.1' was identified in the logs, and I suspect it could be related to the breach. To understand the origin of this potential threat, I need to pinpoint the geographical coordinates of this IP. Could you provide me with the latitude and longitude for the IP address '192.168.1.1'?

Available functions:
name: get_coordinate_by_ip_address
description: Finds the latitude and longitude of an IP address.
parameters: type: dict
properties: ip_address: type: string
description: The IP address to find the location of.
required: ip_address
name: get_covid_death_by_country
description: Finds the most up to date total deaths of a country result from COVID.
parameters: type: dict
properties: country: type: string
description: The country to find the total deaths of, in the format of the country's full name.
required: country

Ground-truth function call(s):
get_coordinate_by_ip_address(ip_address='192.168.1.1')
user: I have a client who's planning a trip to Paris and they're looking for some detailed travel plans. Could we find out the exact latitude and longitude of Paris for this purpose? They're really into the specifics and would appreciate having the coordinates for their personal itinerary.

Available functions:
name: calculate_mean
description: Calculates the mean of a list of numbers.
parameters: type: dict
properties: numbers: type: array
items: type: float
description: The list of numbers.
required: numbers
name: get_stock_history
description: Finds the price of a stock by its stock name.
parameters: type: dict
properties: stock_name: type: string
description: The stock name of the product, in the format of the stock symbol.
interval: type: string
description: The interval of the stock history. Allows one of following : 5m|15m|30m|1h|1d|1wk|1mo|3mo
diffandsplits: type: string
description: The diff and splits of the stock history. Allows one of following : true|false. Default to false
required: stock_name
interval
name: get_coordinates_from_city
description: Fetches the latitude and longitude of a given city name using the Maps.co Geocoding API.
parameters: type: dict
properties: city_name: type: string
description: The name of the city, such as 'Rome'.
required: city_name

Ground-truth function call(s):
get_coordinates_from_city(city_name='Paris')