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

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: float
description: The number of successes.
p: type: float
description: The probability of success.
required: n
k
p

Ground-truth function call(s):
get_weather_data(coordinates=[45.4215, -75.6972])
calc_binomial_probability(n=10, k=5, p=0.5)
user: I'm currently working on a machine learning project that involves measuring the similarity between different data points. I've just computed two vectors and would like to understand how similar they are. Could you calculate the cosine similarity between the vectors [1, 2, 3] and [4, 5, 6] for me? Additionally, as part of my financial analysis, I'm tracking the performance of certain tech companies, and I need to know the latest trading price for Apple's stock. What's the current price of the 'AAPL' stock?

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=[1, 2, 3], vectorB=[4, 5, 6])
get_stock_price_by_stock_name(stock_name='AAPL')
user: I'm working on a project that requires me to juggle with numbers from different domains. First, I need to calculate the density of a new material we've been experimenting with. The material has a mass of 50 kilograms and occupies a volume of 10 cubic meters. Could you calculate its density for me? Additionally, I'm contemplating a financial move and would like to know the future value of an investment if I were to invest $5000 at an annual interest rate of 5% for 10 years. What would the investment grow to after that time? Switching gears to the stock market, I'm curious about the current trading price of Apple's stock. What's the latest price per share? Lastly, I've been eyeing this gadget on Amazon, but I'm quite particular about the quality. The ASIN is B08PPDJWC8. Could you check its customer rating for me?

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)
calculate_future_value(present_value=5000, interest_rate=0.05, periods=10)
get_stock_price_by_stock_name(stock_name='AAPL')
get_rating_by_amazon_ASIN(ASIN='B08PPDJWC8')
user: Last year, when I was staying in Spain, I never quite kept track of all the public holidays, which I regret since it would have been handy for planning trips. Could you provide me with a list of the official Spanish holidays for the year 2020? Also, I was reminiscing about a physics experiment from the same year, where we propelled an object with an initial velocity of 10 meters per second and it had a consistent acceleration of 2 meters per second squared. The object was in motion for a total of 5 seconds. I need to calculate how far the object traveled during that time. Can you help me with that as well?

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):
retrieve_holiday_by_year(year='2020', country='ES')
calculate_displacement(initial_velocity=10, acceleration=2, time=5)
user: I need to calculate the electrostatic potential energy for an object that has a charge of 5 Coulombs and is under a voltage of 10 volts. Also, can you find out the postal code for where the IP address 192.168.1.1 is located?

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):
get_zipcode_by_ip_address(ip_address='192.168.1.1')
calculate_electrostatic_potential_energy(charge=5.0, voltage=10.0)
user: I'm working on this interesting project where I need to analyze and compare the movements of two different objects. To get started, I need to calculate their final velocities. The first object has an initial velocity of 10 m/s, it's been accelerating at 2 m/s², and it has been moving for 5 seconds. The second object started at 15 m/s, with an acceleration of 1.5 m/s², over a period of 7 seconds. Once I have their final velocities, I want to compare the movements by finding the cosine similarity between the vectors representing velocity, accerlation, and time.

On a different note, I also need to sort out my personal finances. I have a $200,000 mortgage at a 5% interest rate, to be paid off over 30 years, and I need to work out what my monthly payments will be. Could you help me with these calculations?

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=10, acceleration=2, time=5)
calculate_final_velocity(initial_velocity=15, acceleration=1.5, time=7)
calculate_cosine_similarity(vectorA=[10, 2, 5], vectorB=[15, 1.5, 7])
mortgage_calculator(loan_amount=200000, interest_rate=0.05, loan_period=30)
user: I've got this investment sitting at $5000 with an annual interest rate of 5%. I'm planning to let it grow over the next 10 years without making any additional contributions. I need to calculate what this will amount to at the end of the 10-year period. Once I have that future value, I'm curious about how it would perform in a hypothetical scenario where the returns follow the Fibonacci sequence, so I'd like to know what the 15th number in that sequence is. And lastly, I have this list of numbers: 45, 23, 67, 89, 12, 34, 56, 78. I need them sorted, but in descending order. Can we get started on these calculations?

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: get_fibonacci_number
description: Calculates the nth Fibonacci number in the sequence where the sequence starts with 0 followed by 1, and each subsequent number is the sum of the previous two.
parameters: type: dict
required: n
properties: n: type: integer
description: The position of the Fibonacci number to calculate. This position must be a positive integer.
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)
get_fibonacci_number(n=15)
sort_array(array=[45, 23, 67, 89, 12, 34, 56, 78], reverse=True)
user: Could you calculate the average of these numbers: 5, 10, 15, 20, and 25? Also, I need to know the timezone for the location at longitude 120.97388 and latitude 14.6042.

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

Ground-truth function call(s):
calculate_mean(numbers=[5, 10, 15, 20, 25])
get_time_zone_by_coord(long='120.97388', lat='14.6042')
user: I've got $5000 invested at an annual interest rate of 5%, and I'm planning to leave it untouched for 10 years. I'd like to know what its future value will be. On a different note, I've been eyeing the stock ticker 'AAPL' and I'm curious about the actual company name behind it. Also, just out of curiosity, I'm wondering about the permutations for choosing 3 items from a set of 7. Could we work these out?

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_future_value(present_value=5000, interest_rate=0.05, periods=10)
get_company_name_by_stock_name(stock_name='AAPL')
calculate_permutations(n=7, k=3)
user: What is the first 10 numbers in the Fibonacci sequence? I'm working on some statistical analysis for a math project and I need those figures. Also Calculate the standard deviation for [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

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
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)
calculate_standard_deviation(numbers=[0, 1, 1, 2, 3, 5, 8, 13, 21, 34])
user: I've been tracking the stock market and I'm interested in Apple's performance, but I only remember the ticker symbol 'AAPL', not the full company name. Could you look that up for me? Additionally, I need to schedule some events and I want them to sync up. The first event is every 12 days and the second one every 18 days. I need to know the least common multiple to find out when they will coincide. Lastly, I'm planning a triangular garden bed; it's going to have a 10-unit base and rise up 15 units in height. I need to calculate how much area that will cover.

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):
get_company_name_by_stock_name(stock_name='AAPL')
math_lcm(a=12, b=18)
calculate_triangle_area(base=10, height=15)
user: I've been monitoring my investment portfolio and I noticed that I have 500 shares of Apple stock. I'm curious to know the total value in Euros. Currently, the stock is valued at $500 per share. I'll need the latest monthly stock history with no adjustments for dividends or splits. After getting the stock value, can you convert the total amount from USD to Euros 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
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: 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):
get_stock_history(stock_name='AAPL', interval='1mo', diffandsplits='false')
convert_currency(amount=500*500, from_currency='USD', to_currency='EUR')
user: I'm working on some mathematical problems and need to do a couple of calculations. First, I need to figure out the greatest common divisor (GCD) for the numbers 36 and 48. After that, I need to estimate the derivative of the function f(x) = x^2 at the point where x equals 5. Can you help me with these two tasks?

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.
x: type: integer
description: The point to calculate the derivative at.
required: function
x

Ground-truth function call(s):
math_gcd(a=36, b=48)
estimate_derivative(function='lambda x:x**2', x=5)
user: I came across the term "Bitcoin" and I'm really curious about what it means in slang. Can you look up its definition on Urban Dictionary for me? Also, I'm planning a trip and need to handle some finances. I have 1000 Chinese Yuan that I'd like to convert to both US dollars and Euros. And while we're at it, I'm working on a project and need to calculate the distance. Could you help me find out how far apart two points are if one is at (3,5) and the other is at (7,9)?

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='Bitcoin')
convert_currency(amount=1000, from_currency='CNY', to_currency='USD')
convert_currency(amount=1000, from_currency='CNY', to_currency='EUR')
get_distance(pointA=(3,5), pointB=(7,9))
user: In my lab today, I'm working on two separate problems. First, I'm dealing with an electrostatics challenge where I have a sphere carrying a charge of 5 coulombs and it's exposed to an electric potential of 10 volts. I need to figure out the electrostatic potential energy for this setup. Also, I have a geometric task where I'm looking at a circle with a 7-unit radius, and I need to calculate its area. Could you provide me with the electrostatic potential energy for the charged sphere and the area of the 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):
calculate_electrostatic_potential_energy(charge=5.0, voltage=10.0)
geometry_area_circle(radius=7)
user: I've been closely tracking the COVID-19 situation, and I'm particularly concerned about the impact it's having on European countries. With family and friends living abroad, I need to stay informed about the situation in specific countries. Could you provide me with the latest figures on the total deaths and active COVID-19 cases for both Italy and Spain? This information is crucial for me to understand the current state of the pandemic in these regions.

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_covid_death_by_country(country='Italy')
get_covid_death_by_country(country='Spain')
get_active_covid_case_by_country(country='Italy')
get_active_covid_case_by_country(country='Spain')