Get Started

Sort thousands of records with a local AI, for free

You have a spreadsheet of support tickets, reviews or emails and no time to read them one by one. Point a small AI model running on your own laptop at the file and it labels every row: by category, by sentiment, spam or not. No per-row API bill, nothing leaves your machine. By the end you'll have a resumable pipeline that labels a whole CSV, a real accuracy number you can trust, and a way to flag the rows worth a human's eyes.

110 minIntermediateTools: Free. Runs entirely on your own PC with no GPU.Step 1 free
Tested 12 Oct 2026 · Ollama 0.40.3 with qwen2.5:3b and llama3.2:1b, Python 3.13 with uv, requests 2.34, on a Windows 11 laptop with no GPU (CPU only, 100% CPU during runs)
A pipeline that reads a CSV, labels every row with a local model, and writes a tidy labelled CSV, with nothing leaving your machine
Structured outputthe model can only ever answer with one of your labels, so there is nothing fragile to parse
A resumable runstop it halfway, start it again, and it carries on from the last row
  • A measured accuracy number against a hand-labelled sample, plus a per-label breakdown so you know which categories to trust
  • Prompt engineering that lifts accuracy: a constrained label set, a short guide and a handful of examples
  • An honest way to flag the rows worth a human's time, and the numbers to decide if a small local model is good enough for your job
  • A starter kit with the pipeline, the measuring script, the two-model flagger and a 161-row sample CSV with 83 rows hand-labelled
Before you start
  • Ollama with a small model installed and working. Run AI on your PC: your own private ChatGPT sets this up in a few minutes. Check it with ollama --version and ollama list. This mission uses qwen2.5:3b (about 1.9GB): pull it with ollama pull qwen2.5:3b.
  • uv, the Python runner from Level 0 (Install anything from GitHub, safely has the one-line install). Check with uv --version.
  • A CSV of short texts to sort, or use the sample in the kit. A little Python helps but every file is complete and explained.
  • A code editor. VS Code ↗ is free; Notepad works at a push.
01/07Why sort records on your own machine0 done
STEP 01 of 07~10 min

Why sort records on your own machine

Understand what you're about to build and the words for it, so the rest of the lesson is the doing. The whole job runs on your laptop, for free, with no data sent anywhere.

  1. You have a pile of short texts and you want a label on each one. Support tickets sorted into billing, bug, account and so on. Reviews marked positive, negative or neutral. Emails marked spam or not spam. Products tagged by type. A human could do it, slowly. A big AI API could do it, for a fee per row that adds up fast across thousands of rows. This mission does it with a small model running on your own machine: free per row, and no customer data leaving your laptop.

  2. Two words for the two jobs you can do this way:

    • Classification puts each row into one of a fixed set of labels. "Which category is this ticket?" The set of labels is the label set, and you decide it up front.
    • Extraction pulls structured fields out of messy text. "What is the order number, the amount and the date in this email?" Same tools, same local model; this mission focuses on classification, and the last step points at extraction.
  3. A few more terms, each used once so the steps read cleanly later:

    • Structured output (or JSON mode): you give the model a shape to fill in, and it can only answer in that shape. No chatty preamble to strip, no guessing where the answer is.
    • Zero-shot means you describe the task and ask. Few-shot means you also show a handful of worked examples. Few-shot usually does better; you'll measure the difference in step 6.
    • Ground truth is a set of rows a human has labelled by hand, the correct answers you check the model against. Accuracy is the share it gets right.
    • Batch processing is running the whole file in one go. Doing it so a half-finished run can resume without redoing work is idempotency: run it twice, no row gets labelled twice.
    • Human-in-the-loop means the machine does the easy 90% and hands the doubtful rows to a person.
    TipHonest up front: a small model on a CPU is slower and less accurate than a big cloud API. The point of this mission is not to pretend otherwise, it's to measure both so you can decide. For sorting your own backlog of tickets, 85% accuracy for free and private often beats 95% for a bill and a data-sharing agreement. For a legal or medical decision, it doesn't. You'll have the numbers to judge.
  4. Check your model is there and answers:

    Terminal
    ollama run qwen2.5:3b "Reply with one word: working"
    Output
    Working
✓
Checkpointollama list shows qwen2.5:3b, and the one-word test replies.
If it breaks'ollama' is not recognised + 2 more
'ollama' is not recognised
Ollama isn't installed or the terminal is stale. Install it as in Run AI on your PC, then close the terminal and open a new one.
'model "qwen2.5:3b" not found'
Pull it first: ollama pull qwen2.5:3b. It's about 1.9GB. ollama list shows what you already have.
The first reply takes several seconds
That's the model loading into memory the first time. Later calls are quicker while it stays loaded. On a CPU, expect a second or two per short ticket.
Still stuck? Ask the community
Next mission · AI engineeringStream AI responses so your app feels instant
→