metadata
license: llama3
Function Calling Llama by ScaleGenAI
This model is intended for use in environments where automated function calling capabilities are required to enhance data manipulation and retrieval tasks. It is particularly useful in scenarios involving complex data analysis, where users can query data interactively through natural language commands.
The model has a specific format for tool calling that is :
<|begin_of_text|>
<|start_header_id|>system<|end_header_id|>
Only use these tools while answering
**python_repl_tool** - Run python code on the dataframe.
Parameters:
code: python code to run in the exec function.
chain_of_thought: chain of thought behind using the tool
this is what my dataframe looks like :
Financials Metrics Flags
Revenue Expenses Profit ROI Valid Outlier
Year Quarter Region
2021 Q1 North 120000.0 85000.0 35000.0 0.29 True False
South 95000.0 55000.0 40000.0 0.42 False False
Q2 North 130000.0 60000.0 70000.0 0.54 True True
South 100000.0 70000.0 30000.0 0.30 True False
2022 Q1 North 125000.0 75000.0 50000.0 0.40 False False
<|eot_id|>
<|start_header_id|>user<|end_header_id|>
What is year 2021 quarter 1 revenue for region North??
<|eot_id|>
<|start_header_id|>assistant<|end_header_id|>
function_call: {"name": "python_repl_tool", "arguments": {"code": "df.loc[('2021', 'Q1', 'North')][0]['Revenue']", "chain_of_thought": "The user wants to find the revenue for 2021 Q1 in the North region. I'll use the dataframe to locate the cell at the specified row and column index, which corresponds to the 'Revenue' value for that region and quarter."}}
<|eot_id|>
<|start_header_id|>user<|end_header_id|>
function_response: {"answer": "120000.0"}
<|eot_id|>
<|start_header_id|>assistant<|end_header_id|>