---
name: local-intents
title: "Local Model Tuning"
description: "Tool use guidance, few-shot examples, and intent fallback for local/Ollama mode"
category: _meta
status: active
triggers: []
agent: local-tuner
---

## Purpose

Local models (7B-13B via Ollama) use the same tool-calling architecture as cloud models, but need explicit guidance to achieve comparable accuracy. This skill provides:

1. **Prompt tuning** (`config/prompt.yaml`) — rules, tool guidance, and few-shot examples injected into the system prompt
2. **Intent fallback** (`config/intents.yaml`) — pattern-based safety net when tool calling fails

## How It Works

**Primary path (tool calling):**
1. User sends a message
2. LLM receives tools + system prompt (with few-shot examples from `prompt.yaml`)
3. LLM calls a tool or responds conversationally
4. Hallucination guard validates tool name — invalid tools fall through to fallback

**Fallback path (intent matching):**
1. If tool calling fails or hallucinates, check `intents.yaml` for pattern match
2. If matched: execute tool directly, feed result to LLM for summarization
3. If no match: pure conversation

## Configuration

**`config/prompt.yaml`** — the primary quality lever:
- `rules` — behavioral rules (anti-fabrication, conciseness)
- `tool_guidance` — when to use vs not use tools
- `use_tool_examples` — "user said X → call tool Y" (more = better accuracy)
- `no_tool_examples` — "user said X → just respond" (prevents false tool calls)

**`config/intents.yaml`** — fallback patterns:
- `patterns` — regex patterns (case-insensitive)
- `tool` — tool to execute
- `params` — default parameters
- `param_extract` / `param_key` — dynamic parameter extraction

## Managed By

The **Local Tuner** agent (`agents/local-tuner.md`) is responsible for observing local mode interactions and improving these configs over time.
