---
title: "AI103 · Prompting that works"
publisher: Maestro College (Maestro Open)
lessons: 35
source: https://open.maestrocollege.edu/prompting-that-works
full: https://open.maestrocollege.edu/prompting-that-works/llms-full.txt
---

# Prompting that works (AI103)

How large language models work and where they fail, and how to write prompts and build simple LLM systems that give reliable results.

## Course objectives
- Explain how large language models process language, generate outputs, and exhibit limitations such as hallucination, bias, and context sensitivity.
- Design and refine prompts that provide effective instructions, context, examples, constraints, and structured outputs for reliable model behavior.
- Develop Python-based LLM applications that use APIs, structured outputs, tool calling, and cost-aware request handling.
- Evaluate and select LLM models and system architectures based on task requirements, capabilities, privacy, performance, and cost considerations.
- Design supervised agent workflows and use evaluation, tracing, and monitoring practices to assess and improve LLM systems.

## Course teaching approach
- Start from a real-world problem, then introduce the concept as the solution.
- Keep it true beginner level, hands-on, a little gamified. The learner should feel they are winning.
- Balance explanation, demonstration and practice. No copy-paste exercises: give small story-based tasks.
- End with one fun closed question about the topic.

## Lessons
### Unit 1: How LLMs work (and fail)
- [From GenAI history to foundation models](https://open.maestrocollege.edu/prompting-that-works/from-genai-history-to-foundation-models.md)
- [Tokens: what the model actually reads](https://open.maestrocollege.edu/prompting-that-works/tokens-what-the-model-actually-reads.md)
- [Embeddings: meaning as vectors](https://open.maestrocollege.edu/prompting-that-works/embeddings-meaning-as-vectors.md)
- [The LLM inference lifecycle](https://open.maestrocollege.edu/prompting-that-works/the-llm-inference-lifecycle.md)
- [How attention works inside transformers](https://open.maestrocollege.edu/prompting-that-works/how-attention-works-inside-transformers.md)
- [How base models become assistants](https://open.maestrocollege.edu/prompting-that-works/how-base-models-become-assistants.md)
- [What the model sees in its context window](https://open.maestrocollege.edu/prompting-that-works/what-the-model-sees-in-its-context-window.md)
- [Sampling, temperature, and non-determinism](https://open.maestrocollege.edu/prompting-that-works/sampling-temperature-and-non-determinism.md)
- [Why models hallucinate and show bias](https://open.maestrocollege.edu/prompting-that-works/why-models-hallucinate-and-show-bias.md)
- [Context sensitivity and reasoning failures](https://open.maestrocollege.edu/prompting-that-works/context-sensitivity-and-reasoning-failures.md)

### Unit 2: Prompt and context engineering
- [Anatomy of a strong prompt](https://open.maestrocollege.edu/prompting-that-works/anatomy-of-a-strong-prompt.md)
- [Clear instructions and roles](https://open.maestrocollege.edu/prompting-that-works/clear-instructions-and-roles.md)
- [Supplying relevant context](https://open.maestrocollege.edu/prompting-that-works/supplying-relevant-context.md)
- [Few-shot examples](https://open.maestrocollege.edu/prompting-that-works/few-shot-examples.md)
- [Constraints and output formats](https://open.maestrocollege.edu/prompting-that-works/constraints-and-output-formats.md)
- [Prompting for JSON outputs](https://open.maestrocollege.edu/prompting-that-works/prompting-for-json-outputs.md)
- [Breaking tasks into steps](https://open.maestrocollege.edu/prompting-that-works/breaking-tasks-into-steps.md)
- [Iterative prompt refinement](https://open.maestrocollege.edu/prompting-that-works/iterative-prompt-refinement.md)
- [Diagnosing failing prompts and prompt injection](https://open.maestrocollege.edu/prompting-that-works/diagnosing-failing-prompts-and-prompt-injection.md)
- [Challenge: engineer a reliable prompt](https://open.maestrocollege.edu/prompting-that-works/challenge-engineer-a-reliable-prompt.md)

### Unit 3: Building and choosing LLM systems
- [First API call in Python](https://open.maestrocollege.edu/prompting-that-works/first-api-call-in-python.md)
- [Token usage and API pricing](https://open.maestrocollege.edu/prompting-that-works/token-usage-and-api-pricing.md)
- [Validating JSON from an API](https://open.maestrocollege.edu/prompting-that-works/validating-json-from-an-api.md)
- [Tool and function calling](https://open.maestrocollege.edu/prompting-that-works/tool-and-function-calling.md)
- [Challenge: build a working LLM script](https://open.maestrocollege.edu/prompting-that-works/challenge-build-a-working-llm-script.md)
- [Modalities and reasoning modes](https://open.maestrocollege.edu/prompting-that-works/modalities-and-reasoning-modes.md)
- [Choosing commercial or open-weight models](https://open.maestrocollege.edu/prompting-that-works/choosing-commercial-or-open-weight-models.md)
- [Retrieval-augmented generation (RAG)](https://open.maestrocollege.edu/prompting-that-works/retrieval-augmented-generation-rag.md)
- [Choosing a GenAI system architecture](https://open.maestrocollege.edu/prompting-that-works/choosing-a-genai-system-architecture.md)
- [From tool call to agent loop](https://open.maestrocollege.edu/prompting-that-works/from-tool-call-to-agent-loop.md)

### Unit 4: Agents, evals, and observability
- [Inside an agent harness](https://open.maestrocollege.edu/prompting-that-works/inside-an-agent-harness.md)
- [Building evals beyond benchmarks](https://open.maestrocollege.edu/prompting-that-works/building-evals-beyond-benchmarks.md)
- [Tracing runs and monitoring production](https://open.maestrocollege.edu/prompting-that-works/tracing-runs-and-monitoring-production.md)
- [Challenge: design an agent with oversight](https://open.maestrocollege.edu/prompting-that-works/challenge-design-an-agent-with-oversight.md)
- [Challenge: evaluate and improve an LLM system](https://open.maestrocollege.edu/prompting-that-works/challenge-evaluate-and-improve-an-llm-system.md)

## How to use this document
You are acting as a tutor for a learner on Maestro Open. Teach from this document, one small step at a time. Ask the learner to try things, wait for their answer, then give feedback. Keep it beginner-friendly. If the lesson involves code or spreadsheets and you cannot run them, ask the learner to try it on their own computer and paste the result back. Do not award grades, credit or certificates.
Start with lesson 1 unless the learner asks for a specific lesson. Keep track of which lesson you are on.

## When a lesson is done
Teach one lesson at a time. A lesson is complete only when the learner has shown they can do every outcome listed for it; check each with a small task or question.
When it is complete:
1. Say clearly: "Lesson N complete: <lesson title>." (use the lesson's number and title).
2. Give a two-line recap of what they learned.
3. Name the next lesson, say "Lesson N+1 of 35: <title>", and ask if they're ready to start it. Start it only when they say yes.
After the last lesson, congratulate them on finishing the course.
