Learn how LLMs generate text, how to choose a model on capability, cost, and latency, and how to call and prompt it for reliable structured output.
You have a local model running and a helper to call it.
A large language model (LLM) is a next-token predictor trained at huge scale.
Picking a model is an engineering tradeoff, not a leaderboard lookup. The strongest model is rarely the right default for a production feature.
A model does not compose a whole answer at once.
Almost every LLM call you make is a list of role-tagged messages in and a message out.
Temperature decides how adventurous the model is when picking the next token, which makes it the cheapest lever for consistency.
You have a local model running and a helper to call it.
A large language model (LLM) is a next-token predictor trained at huge scale.
Picking a model is an engineering tradeoff, not a leaderboard lookup.
A model does not compose a whole answer at once.
Almost every LLM call you make is a list of role-tagged messages in and a message out.
Temperature decides how adventurous the model is when picking the next token, which makes it the cheapest lever for...
Everything above exists so that prompting is not your first move.
You now have the building blocks, and every later module leans on one of them.
The lab runs on the free local path through Ollama and llm.py, so it costs nothing.
A compact summary of the rules of thumb to keep close. Rules of thumb Quick checks before you ship a prompt
Six patterns cause most of the pain, and each has a short fix.
You can now explain how a model produces text, choose between models using evidence, call one with structured output...
Roles that use the skills in this module.
AI Engineer
MLOps Engineer
Platform Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetA token is a sub-word chunk of text from the model's fixed vocabulary, and it is the unit models read, generate, and bill by. As a rough starting estimate, one token is around three-quarters of an English word, but the ratio varies by tokenizer and language. Measure real counts with your provider's tokenizer or the usage fields in the API response.
No. The strongest model costs more and responds more slowly, and many tasks such as classification and extraction do not need it. Pick the cheapest model that reliably clears the quality bar on an evaluation set built from your own data.
Models sample from a probability distribution, and higher temperature spreads that sampling more widely. Even at temperature 0, output is not guaranteed to be identical across calls because of server-side batching and floating point effects. Design systems that tolerate small variation.
No. A system prompt sets behavior but a determined user can sometimes get a model to ignore it. Enforce authorization, tool permissions, and data access in your application code and infrastructure.