Generate structured function calls and tool invocations using Groq's Llama 3 70B model fine-tuned for tool use and function calling. Excels at API interactions, structured data manipulation, and complex multi-step tool orchestration.
Use Groq's fine-tuned Llama 3 70B model optimized for tool use and function calling. This model achieves 90.76% accuracy on the Berkeley Function Calling Leaderboard and excels at API interactions, structured data manipulation, and complex tool orchestration.
This skill enables AI coding assistants to leverage the Llama 3 Groq 70B Tool Use model for:
When the user requests tool use, function calling, or API interaction tasks:
1. **Load the Model**
- Use the GGUF quantized version: `lmstudio-community/Llama-3-Groq-70B-Tool-Use-GGUF`
- If using LM Studio, select the `Llama 3` prompt preset
- Recommended quantization: Q4_K_M for balance, Q6_K for higher quality
2. **Format Tool Definitions**
- Wrap tool/function signatures in `<tools></tools>` XML tags
- Use JSON schema format with name, description, and parameters
- Include parameter types, descriptions, and required fields
- Example structure:
```json
{
"name": "function_name",
"description": "What the function does",
"parameters": {
"type": "object",
"properties": {
"param1": {"type": "string", "description": "..."},
"param2": {"type": "number", "description": "..."}
},
"required": ["param1"]
}
}
```
3. **Structure the System Prompt**
- Begin with: "You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags."
- Instruct: "You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions."
- Specify output format: "For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags"
- Include all available tools within the `<tools>` block
4. **Parse Model Output**
- Extract JSON objects from within `<tool_call></tool_call>` tags
- Each tool call contains: `{"name": "function_name", "arguments": {...}}`
- The model may generate multiple tool calls in sequence
- Tool calls include an `id` field for tracking
5. **Handle Tool Responses**
- Format tool results within `<tool_response></tool_response>` tags
- Include the original call `id` and the result data
- Feed responses back to the model with role `tool`
- Example: `<tool_response>{"id":"call_123","result":{...}}</tool_response>`
6. **Best Practices**
- Provide clear, detailed function descriptions
- Use enum types for restricted parameter values
- Mark required parameters explicitly
- Don't hallucinate parameter values—ask the user if needed
- Chain tool calls when tasks require multiple steps
**User Request:** "What's the weather like in San Francisco?"
**System Prompt:**
```
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
<tool_call>
{"name": <function-name>,"arguments": <args-dict>}
</tool_call>
Here are the available tools:
<tools>
{
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location"]
}
}
</tools>
```
**Model Output:**
```
<tool_call>
{"id":"call_abc123","name":"get_current_weather","arguments":{"location":"San Francisco, CA","unit":"celsius"}}
</tool_call>
```
**Tool Response:**
```
<tool_response>
{"id":"call_abc123","result":{"temperature":"18","condition":"partly cloudy","unit":"celsius"}}
</tool_response>
```
**Final Response:** "The current weather in San Francisco is 18°C and partly cloudy."
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/llama-3-groq-70b-tool-use-0u0nyo/raw