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

Available functions:
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=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)
user: I'm refining the data points in my machine learning model and need to compare the similarity of several vector pairs to fine-tune the system. Could you calculate the cosine similarities for the following pairs: [0.5, 0.7, 0.2, 0.9, 0.1] with [0.3, 0.6, 0.2, 0.8, 0.1], [0.2, 0.4, 0.6, 0.8, 1.0] with [1.0, 0.8, 0.6, 0.4, 0.2], and [0.1, 0.2, 0.3, 0.4, 0.5] with [0.5, 0.4, 0.3, 0.2, 0.1]?

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

Ground-truth function call(s):
calculate_cosine_similarity(vectorA=[0.5, 0.7, 0.2, 0.9, 0.1], vectorB=[0.3, 0.6, 0.2, 0.8, 0.1])
calculate_cosine_similarity(vectorA=[0.2, 0.4, 0.6, 0.8, 1.0], vectorB=[1.0, 0.8, 0.6, 0.4, 0.2])
calculate_cosine_similarity(vectorA=[0.1, 0.2, 0.3, 0.4, 0.5], vectorB=[0.5, 0.4, 0.3, 0.2, 0.1])
user: I'm conducting an experiment with four objects of different materials and need to calculate their densities. The metal cube weighs 500 grams and takes up 100 cc, the plastic sphere is 200 grams and 50 cc, the wooden block is 300 grams and has a volume of 75 cc, and the glass cylinder is 400 grams with an 80 cc volume. Could you determine the density for each one?

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

Ground-truth function call(s):
calculate_density(mass=0.5, volume=0.0001)
calculate_density(mass=0.2, volume=0.00005)
calculate_density(mass=0.3, volume=0.000075)
calculate_density(mass=0.4, volume=0.00008)
user: I've been conducting experiments on projectile motion and recorded data from my latest trials using a catapult to launch three objects. For a stone with an initial velocity of 20 m/s, a rubber ball at 30 m/s, and a metal ball at 25 m/s, each experiencing an acceleration of -9.8 m/s² and in motion for 5 seconds, could you work out the displacement for each object after those 5 seconds?

Available functions:
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=20, acceleration=-9.8, time=5)
calculate_displacement(initial_velocity=30, acceleration=-9.8, time=5)
calculate_displacement(initial_velocity=25, acceleration=-9.8, time=5)
user: I'm engaged in a study on electrostatic interactions and need to analyze the electrostatic potential energy for a proton with a charge of 1.6 x 10^-19 Coulombs in a 500 Volt field, an electron with a charge of -1.6 x 10^-19 Coulombs in a 1000 Volt field, and a neutron, which has no charge, in a 2000 Volt field. Can we run these calculations?

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

Ground-truth function call(s):
calculate_electrostatic_potential_energy(charge=1.6e-19, voltage=500)
calculate_electrostatic_potential_energy(charge=-1.6e-19, voltage=1000)
calculate_electrostatic_potential_energy(charge=0, voltage=2000)
user: I'm working on a physics experiment to understand the principles of motion and need to calculate the final velocities of several objects. For the car, with an initial speed of 5 meters per second, it accelerates at 2 meters per second squared over 10 seconds. The bicycle starts at 2 meters per second and accelerates at 1 meter per second squared for 15 seconds. The skateboard begins at 1 meter per second and accelerates at 0.5 meters per second squared over 20 seconds. Could you determine the final velocities for the car, bicycle, and skateboard?

Available functions:
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=5, acceleration=2, time=10)
calculate_final_velocity(initial_velocity=2, acceleration=1, time=15)
calculate_final_velocity(initial_velocity=1, acceleration=0.5, time=20)
user: I'm currently weighing up some investment options and would like to get an idea of their potential growth over time. Could you help me calculate the future value for a bond with an initial investment of $5000, an annual interest rate of 5%, and a term of 10 years; a mutual fund that starts with $2000, grows at an annual rate of 7%, and will be held for 15 years; and stocks starting at $1000, with an impressive annual growth rate of 10%, over a 20-year period? I need to understand the future values to make an informed decision.

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

Ground-truth function call(s):
calculate_future_value(present_value=5000, interest_rate=0.05, periods=10)
calculate_future_value(present_value=2000, interest_rate=0.07, periods=15)
calculate_future_value(present_value=1000, interest_rate=0.1, periods=20)
user: I've been keeping track of some statistics and need to calculate averages to analyze trends: a basketball player's performance with scores of 35, 40, 45, 50, and 55 points in his last five games, the weekly temperature with recordings of 72, 75, 78, 80, 82, and 85 degrees Fahrenheit, and the monthly fluctuation in the price of a dozen eggs at $1.50, $1.55, $1.60, $1.65, and $1.70. Could you calculate the mean values for these?

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

Ground-truth function call(s):
calculate_mean(numbers=[35, 40, 45, 50, 55])
calculate_mean(numbers=[72, 75, 78, 80, 82, 85])
calculate_mean(numbers=[1.50, 1.55, 1.60, 1.65, 1.70])
user: I'm working on a few probability problems for my statistics class, and I need to figure out some permutations. Could you help me calculate the number of different ways to arrange 5 books on a shelf if I have 20 books to choose from, the number of different lineups I can create with 5 players on the court when there are 12 players on the team for my basketball team project, and the number of different combinations for choosing 3 main courses from a selection of 10 on the menu for a dinner event I'm planning?

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

Ground-truth function call(s):
calculate_permutations(n=20, k=5)
calculate_permutations(n=12, k=5)
calculate_permutations(n=10, k=3)
user: I'm analyzing three datasets and need to calculate the standard deviation for each. The first dataset includes ages from a recent survey: 23, 34, 45, 56, 67, 78, and 89 years old. The second dataset consists of this week's pricing data from our store inventory: $10, $20, $30, $40, $50, and $60. The third dataset features our basketball team's scores from the past season: 90, 80, 70, 60, 50, and 40 points. Can you help me understand the variability within each group?

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: float
description: The list of numbers.
required: numbers

Ground-truth function call(s):
calculate_standard_deviation(numbers=[23, 34, 45, 56, 67, 78, 89])
calculate_standard_deviation(numbers=[10, 20, 30, 40, 50, 60])
calculate_standard_deviation(numbers=[90, 80, 70, 60, 50, 40])
user: I need to calculate the area of three different triangles for a construction project I'm working on: one with a base of 15 meters and a height of 20 meters, another with a base of 25 feet and a height of 30 feet, and a third with dimensions of 35 inches by 40 inches for the base and height, respectively. Can you give me the areas for each triangle?

Available functions:
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=15, height=20)
calculate_triangle_area(base=25, height=30)
calculate_triangle_area(base=35, height=40)
user: I'm planning a multi-country trip and need to budget my expenses in different currencies. I have 5000 JPY that I need to convert to USD, EUR, and AUD to understand how much I can spend in each region, along with 100 CAD converted to CHF. Can you calculate these conversions for me?

Available functions:
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):
convert_currency(amount=5000, from_currency='JPY', to_currency='USD')
convert_currency(amount=5000, from_currency='JPY', to_currency='EUR')
convert_currency(amount=5000, from_currency='JPY', to_currency='AUD')
convert_currency(amount=100, from_currency='CAD', to_currency='CHF')
user: I'm working on some calculus problems and need help estimating derivatives. Could you find the derivative of f(x) = 3x^2 + 2x - 1 at x = 4, calculate the derivative of g(x) = 5x^3 - 3x^2 + 2x + 1 at x = -2, determine the derivative of h(x) = 2x^4 - 3x^3 + 2x^2 - x + 1 at x = 0, and get the derivative of i(x) = x^5 - 2x^4 + 3x^3 - 2x^2 + x - 1 at x = 1?

Available functions:
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.
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=4)
estimate_derivative(function='lambda x: 5*x**3 - 3*x**2 + 2*x + 1', x=-2)
estimate_derivative(function='lambda x: 2*x**4 - 3*x**3 + 2*x**2 - x + 1', x=0)
estimate_derivative(function='lambda x: x**5 - 2*x**4 + 3*x**3 - 2*x**2 + x - 1', x=1)
user: I came across some slang terms that the younger folks in my office have been using, and I'm feeling a bit out of the loop. Could you help me understand what they mean? I'd like to know the definitions of 'Lit', 'Savage', and 'YOLO' as they're defined on Urban Dictionary. Can you look these up 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

Ground-truth function call(s):
find_term_on_urban_dictionary(term='Lit')
find_term_on_urban_dictionary(term='Savage')
find_term_on_urban_dictionary(term='YOLO')
user: I'm working on a project designing several circular components of different sizes and need the exact areas for circles with radii of 5 units, 10 units, 15 units, and 20 units to estimate the material costs for each component. Could you provide these calculations?

Available functions:
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=5)
geometry_area_circle(radius=10)
geometry_area_circle(radius=15)
geometry_area_circle(radius=20)
user: With the pandemic still lingering, I'm trying to stay updated on the COVID-19 situation around the globe. I'm particularly interested in the current active case numbers for a few countries. Could you provide me with the latest figures for active COVID-19 cases in France, Italy, the United States, and China?

Available functions:
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='France')
get_active_covid_case_by_country(country='Italy')
get_active_covid_case_by_country(country='United States')
get_active_covid_case_by_country(country='China')
user: I'm currently analyzing the stocks with symbols 'AAPL', 'GOOGL', 'AMZN', and 'MSFT' for my financial report and need to match them with their corresponding companies. Can you provide me with the company names for these stocks?

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

Ground-truth function call(s):
get_company_name_by_stock_name(stock_name='AAPL')
get_company_name_by_stock_name(stock_name='GOOGL')
get_company_name_by_stock_name(stock_name='AMZN')
get_company_name_by_stock_name(stock_name='MSFT')
user: I'm working on tracking the geographical locations of certain network requests for a project I'm involved in. Could you provide me the latitude and longitude for the IP addresses '192.168.1.1', '172.16.254.1', '10.0.0.1', and '192.0.2.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

Ground-truth function call(s):
get_coordinate_by_ip_address(ip_address='192.168.1.1')
get_coordinate_by_ip_address(ip_address='172.16.254.1')
get_coordinate_by_ip_address(ip_address='10.0.0.1')
get_coordinate_by_ip_address(ip_address='192.0.2.1')
user: I'm planning a road trip across the United States and need coordinates to estimate travel times and distances. Could you provide the latitude and longitude for New York, Los Angeles, Chicago, and Houston?

Available functions:
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='New York')
get_coordinates_from_city(city_name='Los Angeles')
get_coordinates_from_city(city_name='Chicago')
get_coordinates_from_city(city_name='Houston')
user: I'm compiling a report on the impact of COVID-19 and need the latest death tolls for Brazil, India, Russia, and France. Could you provide me with the total number of deaths for these countries, ensuring the data is as recent as possible?

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

Ground-truth function call(s):
get_covid_death_by_country(country='Brazil')
get_covid_death_by_country(country='India')
get_covid_death_by_country(country='Russia')
get_covid_death_by_country(country='France')
user: I'm working on a project where I need to calculate the distances between several pairs of points on a 2D plane: (3, 4) and (7, 9), (1, 2) and (5, 6), (0, 0) and (8, 15), and (10, 12) and (20, 25). Can you help me with these calculations?

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

Ground-truth function call(s):
get_distance(pointA=(3, 4), pointB=(7, 9))
get_distance(pointA=(1, 2), pointB=(5, 6))
get_distance(pointA=(0, 0), pointB=(8, 15))
get_distance(pointA=(10, 12), pointB=(20, 25))
user: I'm working on a project related to numerical sequences and their applications, and the Fibonacci sequence has piqued my interest. For my analysis, could you calculate the first 10, 20, and 5 numbers in the Fibonacci sequence?

Available functions:
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):
get_fibonacci_sequence(n=10)
get_fibonacci_sequence(n=20)
get_fibonacci_sequence(n=5)
user: I'm looking to compare prices for a few items I've spotted on Amazon, and I have their ASINs ready: 'B08PPDJWC8', 'B07ZPKBL9V', 'B08BHXG144', and 'B075H2B962'. Could you help me out by checking the prices for these products and provide the current price for each of these items?

Available functions:
name: get_price_by_amazon_ASIN
description: Finds the price 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):
get_price_by_amazon_ASIN(ASIN='B08PPDJWC8')
get_price_by_amazon_ASIN(ASIN='B07ZPKBL9V')
get_price_by_amazon_ASIN(ASIN='B08BHXG144')
get_price_by_amazon_ASIN(ASIN='B075H2B962')
user: I need to break down a few numbers into their prime factors for an encryption algorithm I'm working on: 456, 789, 321, and 654.

Available functions:
name: get_prime_factors
description: Calculates the prime factors of a number.
parameters: type: dict
properties: number: type: integer
description: The number to calculate the prime factors of.
required: number

Ground-truth function call(s):
get_prime_factors(number=456)
get_prime_factors(number=789)
get_prime_factors(number=321)
get_prime_factors(number=654)
user: I'm doing a bit of market research and I have a list of Amazon Standard Identification Numbers (ASINs) for products I'm interested in: 'B075H2B962', 'B08BHXG144', 'B07ZPKBL9V', and 'B08PPDJWC8'. Could you look up the product names for these ASINs to streamline my analysis?

Available functions:
name: get_product_name_by_amazon_ASIN
description: Finds the price 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):
get_product_name_by_amazon_ASIN(ASIN='B075H2B962')
get_product_name_by_amazon_ASIN(ASIN='B08BHXG144')
get_product_name_by_amazon_ASIN(ASIN='B07ZPKBL9V')
get_product_name_by_amazon_ASIN(ASIN='B08PPDJWC8')
user: I'm doing a comparative analysis of different products on Amazon, and customer ratings are crucial for my research. I have a list of products identified by their unique ASIN codes and need ratings for ASINs 'B08PPDJWC8', 'B07ZPKBL9V', 'B075H2B962', and 'B08BHXG144'. Could you provide the ratings for each of these products?

Available functions:
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):
get_rating_by_amazon_ASIN(ASIN='B08PPDJWC8')
get_rating_by_amazon_ASIN(ASIN='B07ZPKBL9V')
get_rating_by_amazon_ASIN(ASIN='B075H2B962')
get_rating_by_amazon_ASIN(ASIN='B08BHXG144')
user: I'm doing a comparative analysis of several tech giants for my investment portfolio. Could you provide me with the daily price history of Apple's stock ('AAPL'), the weekly price history for Microsoft ('MSFT') including any stock splits or dividends, the monthly price history for Amazon ('AMZN'), and the three-month price history for Tesla ('TSLA') excluding any stock splits or dividends?

Available functions:
name: get_stock_history
description: Finds the price of a stock by its stock name like AAPL, MSFT.
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 as false
required: stock_name
interval

Ground-truth function call(s):
get_stock_history(stock_name='AAPL', interval='1d', diffandsplits='false')
get_stock_history(stock_name='MSFT', interval='1wk', diffandsplits='true')
get_stock_history(stock_name='AMZN', interval='1mo', diffandsplits='false')
get_stock_history(stock_name='TSLA', interval='3mo', diffandsplits='false')
user: I'm currently tracking several stocks and need the latest trading prices for 'GOOG' (Google), 'META' (Meta Platforms), 'NFLX' (Netflix), and 'BABA' (Alibaba Group Holding Limited). Could you provide me with these prices?

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

Ground-truth function call(s):
get_stock_price_by_stock_name(stock_name='GOOG')
get_stock_price_by_stock_name(stock_name='META')
get_stock_price_by_stock_name(stock_name='NFLX')
get_stock_price_by_stock_name(stock_name='BABA')