Anyone can now build an LLM demo with a single API call.
Getting that same feature to survive real users, real data, and a real bill is a different job.
That job comes down to five skills that show up in almost every production system I’ve worked on or reviewed: retrieval, routing, guardrails, evals, and agent loops.
Each one answers a question a frontier model alone can’t handle.
Where does my company’s data come from? Why is the bill this high? What happens when someone sends a hostile prompt?
Did my last change make things better or worse?
How do I get a model to do multi-step work without falling over?
In this article let’s go through these 5 skills with code you can run today. Every snippet calls one call_llm() function, so you can point it at whatever model you already use, hosted or local.
···
Hey there, I’m Sara Nóbrega, an AI engineer focused on deploying machine learning systems into production.
···
One wrapper so the code runs anywhere
Fill in one branch of this function with the SDK you have.
The rest of the article never touches a provider directly, so switching models means editing this function and nothing else.
Everything from here uses call_llm. Swap the body once and every example still works.
Skill #1: RAG, grounding a model in your own data
A base model doesn’t know your company’s documents, and fine-tuning on them every time they change is slow and expensive.
Retrieval-augmented generation (RAG) fetches the relevant documents at query time and passes them to the model as context.
It’s still the most common LLM pattern in production, and it’s usually the first thing a curriculum teaches.
The interesting work is in the retrieval.
Whether you return the right chunk depends on how you split documents (chunking), whether you combine keyword and semantic search (hybrid retrieval), and whether you reorder results before they reach the model (reranking).
Here’s a small pipeline that runs on CPU with no external service. It embeds a handful of documents, retrieves the closest ones to a question, and answers from them.
Notice the question says “send something back” and the matching document says “returns”.
Keyword search would miss that. The embedding match catches it because the two phrases sit close in vector space.
How to learn RAG
Build this over your own notes, then break it on purpose.
Ask a question the retriever gets wrong and watch the answer go bad.
Fix it by changing the chunk size.
Add BM25 keyword search next to the embeddings (hybrid retrieval) and measure whether answers improve.
Add a reranker, such as a cross-encoder or a hosted rerank API, and compare the top 3 results before and after.
When you outgrow a numpy array, move to a vector database (FAISS for speed, Qdrant or Pinecone for filtering) and a framework like LlamaIndex or LangChain that handles storage and search for you.
To measure quality instead of eyeballing it, RAGAS gives you RAG-specific metrics: faithfulness, answer relevancy, context precision, and context recall.
Skill #2: Model routing: paying for the model the task needs
Sending every request to a frontier model is the fastest way to a bill nobody can explain.
Routing sends easy, high-volume requests to a small or local model and saves the expensive model for the hard ones.
Adding a cache for repeated prompts is reported to cut 40% to 70% off production inference bills, which is why routing went from an advanced trick to a baseline expectation.
The skill is scoring a request and picking a tier. Here’s the shape of it:
A router only pays off if you can see what you’re spending. Wrap your calls so every one gets logged with its task type, token count, and cost.
How to learn model routing
Log every LLM call in a project you already have, then look at where the money goes.
Take the single highest-volume, simplest task and route it to a cheaper model, and measure the quality drop honestly.
Add caching for repeated prompts. W
hen hand-rolling gets old, try a routing library like RouteLLM or a gateway like LiteLLM that sits in front of many providers. Write down the before-and-after cost.
Skill #3: Guardrails, input and output you can defend
Guardrails moved from a bonus to something interviewers expect you to have.
Prompt injection has been the number 1 risk in the OWASP Top 10 for LLM Applications for 2 editions running [3].
The reason it works is simple: an LLM reads instructions and data on the same channel, so an attacker can write input that the model treats as a new instruction and follows it, because it can’t tell the two apart.
The work covers input and output validation, catching injection and jailbreak attempts, redacting (Personally Identifiable Information) PII before it reaches the model or your logs, and keeping the model inside its allowed scope.
Here’s a starting screen you can run with no dependencies.
A word of warning: treat regex as a first screen only.
A determined attacker gets around a pattern list.
OWASP’s own guidance is defense in depth: input validation plus output filtering, least-privilege tools, human approval for sensitive actions, and regular adversarial testing [3].
Production systems reach for Microsoft Presidio for PII, and Guardrails AI or NeMo Guardrails for validation, instead of the regex above.
How to learn model guardrails
Read the OWASP Top 10 for LLM Applications once, start to finish.
Then take your own project’s system prompt and try to break it.
Get the model to ignore its instructions, then patch the hole.
Add input and output validation with one of the libraries above. Add PII detection before anything hits the model or the logs.
The interview question is often “red-team your own system prompt and name the injection vectors,” so practice writing an attack and its defense from memory.
Skill #4: Evals and observability, knowing whether it works
Change a prompt with no eval and you’re guessing.
When a multi-step agent fails with no observability, you see the wrong final answer and none of the steps that produced it.
Start with a tiny eval set.
You don’t need a framework to start. You need 20 to 50 real inputs with the answers you’d accept. Even 8 examples shows you the shape.
The first time you change a prompt and can prove the score held, this stops feeling like busywork.
Grade open-ended answers with an LLM judge
Exact matching breaks down for open-ended answers where wording varies. The common fix is to have a second model grade the first. DeepEval’s guidance on judges makes one point worth keeping: a binary PASS or FAIL is more reliable than asking a judge for a score from 0 to 100 [4]. So keep the verdict binary.
Check the judge against yourself
An unchecked judge is a number you can’t trust.
LLM judges show known biases: they favor longer answers, they favor whichever answer comes first, and they tend to be too lenient [4].
So before you rely on the judge’s numbers, label about 20 answers yourself and measure how often the judge agrees with you.
See inside a failing run
Observability is the other half. When something breaks, you want the whole sequence of steps that produced the answer. A tiny decorator gets you started: record every step, its status, and how long it took.
In production you don’t hand-roll this.
The industry settled on the OpenTelemetry GenAI semantic conventions as the standard schema for LLM traces, and OpenTelemetry graduated in the CNCF in 2026, which makes it a safe long-term choice [5].
Tools like Langfuse, LangSmith, Arize Phoenix, and Braintrust plug into it and give you a UI over every step.
How to learn evals
Start by writing the 20-example set above by hand for a project you already have.
Doing it by hand forces you to decide what a good answer even is, which is not a decision any tool will make for you. Once you want more than exact matching, pick a framework:
– DeepEval is pytest-native, MIT-licensed, and runs locally with no account, so it drops into a CI pipeline. Good first stop for a solo engineer [1].
– promptfoo is configured in YAML and is strong at comparing models side by side and at red-teaming, if security is your near-term concern [1].
– RAGAS is purpose-built for RAG, with the faithfulness and context metrics mentioned earlier [1].
For production monitoring, add one of Langfuse, LangSmith, Phoenix, or Braintrust on top [1].
Skill 5: Agentic loops, multi-step work that recovers
This skill has the most hype and the most churn, so learn it with clear eyes.
Gartner’s Q1 2026 survey found only 17% of organizations have deployed AI agents, though more than 60% expect to within two years [6].
The caution that keeps you credible: Gartner also expects over 40% of agentic AI projects to be scrapped by 2027 over cost, unclear value, or weak governance [6].
Adoption is running ahead of reliability.
An agent is a model plus tools plus a loop that keeps calling tools until the task is done. Build it by hand once so you feel where it gets fragile.
Run this a few times and you’ll see how easily it derails: the model returns prose instead of JSON, a tool comes back empty, the loop spins.
That fragility is the whole reason frameworks exist.
LangGraph and CrewAI give you state machines and checkpointing, so a run resumes from the step that failed instead of restarting the entire task.
How to learn agentic loops
Build the loop above by hand and feel where it breaks.
Rebuild the same thing in LangGraph or CrewAI and notice what the framework handles for you: state, retries, checkpoints.
Force a failure and make the agent recover from it.
Give it a real tool and handle the case where the tool returns junk.
Then read one postmortem of an agent project that got canceled.
The cost and governance lessons are the part no tutorial teaches, and knowing them makes you the person who asks whether a task needs an agent at all or just a good function call.
Wrap-up
Learn these five skills and you can ground a model in company data, take a large share off the bill, keep the system from leaking or getting jailbroken, prove it works with numbers, and get it to do multi-step work without crashing.
That combination is what lets you make the architecture call instead of implementing someone else’s: “this task runs local for free, we route the rest, here’s the eval that proves quality held.”
You probably don’t need all five at once, and trying to learn them in parallel is how people burn out and learn none of them. Pick the one your current work touches and go deep.
For most people that’s RAG or evals, because those show up in almost every project.
Evals is where I’d start if nothing else pulls you. Building a test set is boring work, and it’s what makes senior engineers trust what you ship.
Agent loops are the one I’d be most careful with. The hype is loud and the cancellation rate is real.
Learn it, build with it, and stay willing to conclude that a plain function call would have done the job.
None of this requires a new degree.
It takes picking one skill, building something small that breaks, and fixing it. Then the next one.
Open a project you already have and add the pattern it’s missing: retrieval if it can’t see your data, routing if the bill scares you, evals if you’re changing prompts on vibes.
Thank you for reading!
···
My name is Sara Nóbrega. I’m an AI engineer with background in physics.
Useful links:
···
References
[1] genai.qa, Promptfoo vs DeepEval vs RAGAS: 2026 LLM Evaluation Tools Comparison (2026), https://genai.qa/blog/promptfoo-vs-deepeval-vs-ragas/
[2] Directional figure from vendor and practitioner reports on caching and routing savings in LLM inference (2025-2026). Treat it as a range, not a guarantee.
[3] OWASP, Top 10 for LLM Applications 2025 (2024), https://genai.owasp.org
[4] DeepEval, LLM-as-a-Judge: evaluation techniques and best practices (2026), https://deepeval.com/blog/llm-as-a-judge
[5] OpenTelemetry, Generative AI semantic conventions (2026), https://opentelemetry.io/docs/specs/semconv/gen-ai/
[6] Gartner, 2026 Hype Cycle for Agentic AI and enterprise agent adoption forecasts (2026)

