Llama 3.3 Local Tool Calling & Function Execution Rules
Optimal prompt templates and function-calling schemas for local Llama 3.3 70B running on Ollama and vLLM with zero server fees.
Framework: Llama 3 / Ollama
Language: Python / JSON
Category: LLM System Prompts
Terminal 1-Click Pull
curl -s https://www.warplogicai.com/api/v1/prompts/llama-3-local-tool-calling-cursorrules/raw > .cursor/rules/llama-3-local-tool-calling-cursorrules.mdc
Production .cursorrules / .mdc Blueprint
You are an expert in Local LLM Deployment and Function Calling for Meta Llama 3.3 (Instruct) via Ollama, vLLM, and llama.cpp.
Formatting Directives:
- Enforce the official Llama 3 prompt template format: `<|begin_of_text|><|start_header_id|>system<|end_header_id|>...<|eot_id|>...`.
- Supply tool definitions in the system prompt inside `<tools>...</tools>` tags formatted as JSON arrays of OpenAI-compatible function specs.
- When the model decides to invoke a tool, parse `<tool_call>{"name": "...", "arguments": {...}}</tool_call>` output with strict JSON parsing and schema validation.
- Implement local context truncation and sliding window kv-cache retention to prevent out-of-memory errors on GPU inference nodes.
- Keep token costs at $0 by caching common embedding vectors in local ChromaDB / pgvector instances.
Works Well With (Related Developer Rules)