Skip to content

Categorize with AI

USING SPENT

Categorize with AI.

Spent assigns each transaction to a category like Groceries, Restaurants, Transport, or Subscriptions. You pick which model does the work.

Aroma · Rothschild ✨ Coffee
−₪14.50
🛒
Shufersal Deal ✨ Groceries
−₪284.20
🚇
Rav-Kav ✨ Transport
−₪124.00
Paid · Excellent

Claude

  • Cost — about $0.01–$0.05 / month
  • Privacy — merchant + amount only
  • Quality — handles Hebrew well
Setup steps →
Free · Local

Ollama

  • Cost — free
  • Privacy — nothing leaves your computer
  • Quality — very good with llama3.1:8b
Setup steps →
Free · You

Manual

  • Cost — free
  • Privacy — perfect
  • Quality — depends on you
Setup steps →

You pick one during the setup wizard, and you can switch any time from Settings → AI. Previously-categorized transactions stay categorized; only new transactions go through the new provider.

Cost-effective for personal use because of Claude Haiku 4.5’s pricing and Spent’s batching (50 transactions per call).

Setup:

  1. Go to console.anthropic.com and create an API key under Settings → API Keys.
  2. Paste it into Spent’s setup wizard (or Settings → AI).
  3. Done. Your key is encrypted at rest with the same AES-256-GCM that protects your bank credentials.

Runs a language model on your own machine. Slower than Claude, but every byte stays local.

Setup:

  1. Install Ollama from ollama.com/download.
  2. In a terminal:
    Terminal window
    ollama pull llama3.1:8b
    (4.7 GB download. qwen2.5:3b is a smaller alternative.)
  3. In Spent’s setup wizard, choose Ollama and pick the model.

Spent talks to Ollama at http://localhost:11434, its default.

Skip AI entirely. Each transaction starts in Uncategorized. You assign categories by clicking the category badge in the dashboard.

Slow, but perfect privacy and perfect accuracy.

When Spent syncs, it groups uncategorized transactions into batches of 50 and sends each batch to the chosen provider in one round-trip. This keeps cost and latency low.

What the prompt and retry logic look like

The prompt (defined in src/server/ai/prompts.ts) is shared between Claude and Ollama. It asks the model to return JSON: an array of objects with merchant, category, and a confidence score.

Spent retries up to three times on malformed output. Persistent failures fall back to Uncategorized — never to a wrong category.

Default Claude model: claude-haiku-4-5-20251001. To upgrade, edit src/server/ai/providers/claude.ts.

Switch any time from Settings → AI. Previously-categorized transactions stay categorized; only new transactions (and ones you’ve explicitly re-categorized) go through the new provider.

Next Sync & dashboard