- close code fences on their own line (they were swallowing sections) - rebuild collapsed tables into real markdown tables - add language hints to command/JSON blocks - replace dead blog navigation link with a source note
7.8 KiB
How I Use Tiny AI Models: Small Context, Predictable Output
2026-10-18 · tiny AI models, small language models, SLM, flash models, context window, prompt engineering, AI workflow, codebase mapping · read on the blog
This is not a clean tutorial. It's closer to my notes: a strategy I use daily with small models, written the way I think it. There is no single best way to use AI. Take what I say, take what others say, let the ideas cook in your mind overnight, and you'll wake up with your own way. I'm sure of that.
The real problem with AI
Here is the thing everyone feels but few say out loud: these models don't know what they're doing. AI can do almost anything, just like that, but to predict exactly what you need, to reach the exact point you need, it demands massive context and massive parameters.
Let's make it concrete. Say you tell the model: build feature X in my system. To do that properly, the model needs to know why you need this feature. And you, not the model, need to know whether this feature even exists in other systems or not. Because here's the uncomfortable truth:
AI, originally, is just cooking what was cooked before. It is not creative. It is not new. You need to make sure of this point before you hand it anything important.
If the answer is already out there in the training data, the model can reconstruct it. If the task genuinely depends on your system, your reasons, your constraints; the model doesn't suddenly gain that knowledge. It just predicts, and it needs context to predict well. The smaller the model, the harder it falls.
So how do we use normal models?
That's the real question. Not "which model is smartest", but: how do we actually use the normal models? The flash models. Models under 100B parameters. Even the ~3B ones you can run anywhere.
The answer starts with a word people skip: trade-offs.
Every model fails somewhere. Before using any model, you need to know four things about its failures:
WHEN does it fail?
WHERE does it fail?
WHY does it fail?
HOW does it fail?
Each model has specific trade-offs, and once you know the model you're using, really know it, you stop asking it for things it can't give you and start asking it for things it's good at.
One honest disclaimer before my strategy: there is no way to use a single model (a tiny one or even the biggest one) without cost. And nobody out there knows the "best" way. All of us are trying, every day, figuring it out as we go. So what follows is just my way. It works for me. Measure it against your own work.
The core rule: don't give tiny models big jobs
The whole idea in one line: use layers. When you use a tiny model, don't hand it the big job. Break the job into small, exact, predictable pieces, and give the tiny model one piece at a time.
Let me show you with a real example. Imagine you pulled a codebase and you want to implement feature X. Here's how I run it, tier by tier.
Tier 1: map the codebase, don't build anything
The first thing I do with the tiny model is not write code. I ask it to predict the commands that will list everything about the codebase: all functions, all classes, all methods, the relations between them, the files, the line counts, the full info about the code base. Then I save that output in a markdown file.
your codebase ──▶ tiny model (small context)
│
▼
predicts COMMANDS, not code:
list functions / classes / methods
relations / files / line counts
│
▼
save the map to a .md file
│
▼
now you know: which class, which methods,
what code pattern, what folder architecture
Notice what happened here. The model didn't build my feature. It built my map. After this tier, I know where I should write, which class I should touch, which methods I should pick, what the code pattern is, what the architecture of the folders looks like.
And one important step people skip: if after gathering this info you still don't know: stop, go read, go learn first. Yes, really. This is where I use tiny models most: they summarize general info for me so fast and so cheap that the excuse "I don't have time to explore the codebase" dies completely.
Tier 2: map the feature, generate the exact commands
Now the second tier. Same game, but for the feature itself. I figure out what I need: which classes I need, which folders and files I need to create, maybe a shared file. Then I tell my tiny model to generate bash commands to do exactly that.
The key is what I give it: a small context, exactly scoped to what I need from it. Nothing more. Because I know the input precisely, I know what it will produce after this prompt, before it even runs. That's the whole trick:
"build feature X" "generate the mkdir + scaffolding
└─▶ model guesses commands for these 3 specific things"
│ └─▶ model fills a template
▼ ▼
unpredictable output predictable output ✅
Small context in → known output out. You give the model attention only where you already know what the answer should look like. That's the correct way to work with a model that doesn't know what it's doing.
Why this works, and what it saves you
In some cases this workflow genuinely works for me, and I can point to why: I measure the things. Every prompt I send has a narrow, checkable output. Nothing is vague, so nothing drifts.
| Approach | Context per call | Output | Cost & risk |
|---|---|---|---|
| One big model, one big prompt: "build feature X" | Whole codebase, huge | Guessy, hard to review | Expensive, and you can't tell where it went wrong |
| Tiny model, Tier 1: map commands | Small: just the repo facts | A command list you save to .md |
Near zero: even if it fails, you lost seconds |
| Tiny model, Tier 2: feature scaffolding commands | Small: exactly the classes/files you named | Bash commands you can read before running | Near zero: output is predictable, so errors are visible |
And here is the bigger point behind the table: this division of labor is not only about money. It's about control. When the model's job is small, its failure is small, its output is reviewable in seconds, and you, the human, stay the one who understands the system. The model stays a tool that summarizes and scaffolds; the thinking stays with you.
Since I started working this way I notice it's the best path I've found so far to save time, cost, and effort. Not because the tiny models are magic, but because the workflow respects their limits instead of fighting them.
Now you have my way: go find the others
That's the strategy: know the trade-offs, use layers, never give a tiny model a big job, keep the context small, and know what the output will be before you send the prompt.
But don't take only my word. Now that you have info about this way, go learn others' ways too. Read what different authors do, steal what makes sense, and then do the thing I keep repeating: let these ideas cook in your mind overnight. After a day, you should find yourself with a new way, yours. Be sure of that.
Nobody has the final answer yet. All of us are trying. So I'll end the way this started in my notes:
I want to know from you: how do you use tiny models in your daily work? Tell me. Maybe your way becomes the missing tier in someone else's workflow.
Originally published on ibrahimihsan.site/blog