Free & open · no paywall, ever

IntegrAuth Academy

Identity, security and practical AI — free, from zero. Byte-sized lessons, real diagrams, hands-on labs, zero fluff. Two programs, each with its own exam and certificate.

20 tracks 241 lessons 242 hands-on labs 230+ diagrams 100% free

English is hard? Your browser can translate this page into Tamil, Telugu, Kannada, Malayalam or Hindi. Tech words stay in English so you learn the real names.

How?
  • Chrome on phone: ⋮ menu → Translate
  • Chrome on computer: right-click → Translate to …
  • Edge: the translate icon in the address bar
Practical AI Track 1 · AI Essentials
0/75 lessons read
AI ESSENTIALS · LESSON 11

Prompt, RAG or fine-tune?

Priya hears, "Let's train our own AI on the HR handbook." Your goal: pick the cheapest fix that works.

🧪 Interactive lab — enable JavaScript to play with this one.

Could a rule, formulaor database querydo it exactly?Is it missing facts, orfacts that change?Tried a clear promptwith examples and theright context yet?Behavior or formatstill off, and you havemany good examples?nonoyesyesyesnoyesWrite normal code(not an AI problem)RAG / retrievalfetch it at question timePrompt & contextinstructions + examplesFine-tune(often with LoRA)no → keep refining the promptand test it with evals
Match the fix to the problem. Some jobs need no AI.
Key points
  • Try a clear prompt first. It is free and instant.
  • Changing facts, or too many to paste? Look them up.
  • Fine-tuning changes habits, like a format. It is bad at teaching facts.
  • Exact jobs, like math, need normal code, not AI.

Prompt first, then look it up

A clear request, a few examples and the right material fix most problems. Does it fit in the context window? Then paste it in.

Too big, or does it change often? Use RAG, from Search by meaning. The app finds the best parts of your documents for each question. Change a document today, and answers change today. RAG can also show its sources.

Fine-tuning: habits, not facts

You can train a model more on hundreds to thousands of your own examples. Each one shows an input and the ideal output. This is fine-tuning. It changes the model's weights. The new habit becomes its default.

It is good for one fixed format at huge volume, or a narrow job like sorting tickets. It can make a small, cheap model good at that job. It is poor at facts. They blur, go out of date, and cannot be traced to a source.

Some jobs need no AI

Tax on an invoice? A formula does it exactly, fast and free. Projects often mix fixes. The AI reads a messy message. Then code does the exact math.

Now watch two bots face a week of changes.

🧪 Interactive lab — enable JavaScript to play with this one.

Go deeper: the ladder

Think of the fixes as a ladder. Climb only as high as you need.

  1. Prompt and context. Minutes to set up. Edit the prompt to change it.
  2. RAG. Days to weeks. You build the search, the data flow and the permissions.
  3. Fine-tuning. Weeks. You need examples, training and tests.
  4. Training a model from scratch. Months of work and a big budget. It is almost never right for using AI at work.

A long text sent with every request costs money each time. Prompt caching can help.

Think of a new worker. A clear briefing is prompting. A card for the company library is RAG. A long training course is fine-tuning. It changes their habits for good. But you would not use a course to teach this week's prices. You would hand them the price list.

Go deeper: fine-tuning costs

Fine-tuning keeps costing. You collect and check good examples. You pay for training. You test the result on a fixed set of cases, called evals. Then you do it all again when you move to a newer base model.

Some API providers let you fine-tune some of their hosted models. With an open-weight model, you can do it on your own computers.

A fine-tuned model can still mix up the facts it saw, and state them with confidence. There is no reliable way to make it forget one record. Fine-tuning can also weaken the model's other skills and some of its safety training. So test it widely, not only on the task you trained.

Go deeper: LoRA and distillation

Training all of a big model's weights needs a lot of memory. It also makes a full-size copy for every version. A smarter way freezes the original weights. It trains only a small add-on, called an adapter. This is called LoRA, short for Low-Rank Adaptation.

The adapter is a small file you can swap in and out. So one base model can serve many tasks, with one adapter each. LoRA is still fine-tuning, so the rule stays the same: habits, not facts. QLoRA combines LoRA with quantization.

A big model can also teach a small one. The big "teacher" writes many example answers. The small "student" is fine-tuned on them. This is called distillation. The student is cheaper and faster to run. It keeps a good part of the teacher's skill on those tasks, but not all of it.

For example, DeepSeek made small "R1-Distill" models from answers by its big DeepSeek-R1 model. Before you learn from any model's answers, read its terms. Some providers forbid using their outputs to train competing models.

Go deeper: Priya's story

The handbook plan became RAG. The handbook changes every quarter, and staff want to see which paragraph an answer came from. It uses the search from Search by meaning: embeddings and RAG. Who may see which document is in Permission-aware RAG.

Months later, IT used LoRA to fine-tune a small open-weight model. Its one job: sort 50,000 helpdesk tickets a week into 40 groups. Two years of already sorted tickets were the examples. That job needs speed, low cost and exact labels, not new knowledge.

Watch out

Keep personal data and secrets out of fine-tuning data. The model cannot reliably forget them. See Safe AI at work: data and privacy.

🧪 Try it free

Ask any AI about notes it has never seen. Then paste the notes in and ask again.