Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

AI Engineering
  • The AI Stack in One Picture: Six Layers Every AI Product Is Built From
  • Tokenization: What an LLM Actually Sees When You Type
  • LLM Tokens, Context Windows and Cost: What One Question Really Costs
  • What an LLM Can and Cannot Do: One Prediction Loop, Its Strengths and Its Gaps
  • Structured LLM Output with Pydantic: Describe the Shape Once, Check Every Reply
  • Temperature, Top-p and Sampling: Why the Same Prompt Gives a Different Answer
  • Open vs Closed LLMs: Cost, Control, Privacy and Capability, Decided per Workload
  • Streaming and Error Handling for LLM Calls: Show the First Word Early, Retry Politely, Fail Calmly
  • Practice: Build a CLI Chat Tool with Memory, Commands, Error Handling and a History Cap
  • Explicit Criteria vs Vague Prompts: Turn Every Adjective Into a Check a Script Can Run
  • Few-Shot Prompting Done Right: How Many Examples, How Different, What Order, and the Leak That Lies
  • Prompt Caching: Keep the Start of Every Request Identical and Pay for the Long Part Once
  • Prompt Versioning and Testing in a Repo: Prompt Files, a Registry, a Hash per Answer and Tests That Gate
  • Context Engineering: What Belongs in the Context Window, Turn by Turn
  • Context Engineering for a Long-Running Agent: Clear, Compact, Take Notes, Prove It
  • Zero-Shot, Few-Shot or Reasoning: Pick the Cheapest Prompting Technique the Failure Asks For
  • What an Embedding Actually Is: Meaning as Numbers, Search by Closeness, and Where Hand-Made Numbers Break
  • The RAG Pipeline Explained: 7 Stages From Documents to a Cited Answer
  • Similarity Search: Finding the Closest Vectors with NumPy and NearestNeighbors
  • Why RAG Exists: The Problem It Solves, Compared With Pasting Everything and Fine-Tuning
  • Real Embedding Models: an Open Model or a Provider API, Then Search, Duplicates and Recommendations
  • Chunking Strategies for RAG: Fixed Size, Sentences or Headings, Measured on One Handbook
  • Vector Databases Hands-On: The Same Search in Chroma and pgvector
  • RAG Prompt Assembly and Citations: Number the Blocks, Fit a Token Budget, Check Every Claim
  • Hybrid Search: BM25 Plus Dense Embeddings, Merged With Reciprocal Rank Fusion
  • Reranking With a Cross-Encoder: When the Second Pass Helps, and When It Doesn't
  • Retrieval Evals: Score the Retriever With Recall@K, MRR and nDCG Before Blaming the Model
  • Choosing a Vector Index: Flat, HNSW or IVF-PQ, a Memory Estimate, and Filters That Starve Small Customers
  • Citations and Abstention in RAG: What a Citation Proves, and When the Right Answer Is "It's Not in the Documents"
  • Embedding Migration With Zero Downtime: Two Indexes, a Dual-Write Backfill, a Shadow Check and a Flag
  • Cosine, Dot Product or Euclidean Distance: Why Three Measures Pick Three Winners, and the One Fix
  • Choosing an Embedding Model: Dimension, Context Length, Domain and Cost, Tested on Your Own Questions
  • Loading and Parsing Real Documents for RAG: PDF Headers, Wrapped Lines, Tables and HTML Chrome, Scored
  • Where Naive RAG Fails: Five Ways the Simplest Retriever Hands the Model the Wrong Pages
  • RAG Generation Metrics: Faithfulness, Groundedness and Relevance, One Claim at a Time
  • Capstone: A Production RAG Service Over the Python Standard Library, With an Eval a Hiring Manager Can Rerun
  • Agentic Search or RAG: an Index Decides Before the Call, Search Tools Decide During It
  • A Retrieval Router: Match the Route to the Data Shape and the Query Pattern
  • Progressive Discovery or Monolithic Context: Load It All, Fetch by Index, or Both
  • Building a Claims Assistant: RAG, an Eval Harness With a Gate, and OpenTelemetry Tracing
  • Context Engineering for a Long-Running Agent: Clear, Compact, Take Notes, Prove It
  • What LangChain Is For, and When to Skip It: Five Standard Parts, One Pipe, and a Decision Table
  • Why Chains Break: No Branch, No Retry, No Pause, and the Same Refund Assistant as a LangGraph Graph
  • LangGraph Nodes, Edges and State: Build Your First Graph, Route With a Conditional Edge, and Read the Run Three Ways
  • Human-in-the-Loop and Checkpointing in LangGraph: interrupt, a SQLite Save Slot and Command(resume=...)
  • Multi-Agent Patterns: Hub and Spoke in LangGraph, With Short Briefs, Owned Tools and a Retry the Hub Decides
  • A Research Agent in LangGraph: Plan, Search, Read, Write, and a Check Node That Rejects Citations Nobody Read
  • What Is MCP? One Plug Between AI Apps and Tools: Host, Client, Server and the Three Messages
  • Configuring MCP Servers in Claude Code: A Command or a URL, Three Scopes, and Three Moves When One Breaks
  • Workflow or Agent: Decide Who Picks the Next Step, Then Let the Constraints Choose the Design
  • Custom Agent Loops and Harnesses: A Dispatch Table, an Approval Hold, Error Results and a Turn Budget
  • Building an MCP Server: Tools, Resources and Prompts in Python and TypeScript
  • MCP Transports: stdio or Streamable HTTP, and Who Starts the Server
  • Deploying and Authenticating an MCP Server: Environment Keys for stdio, Bearer Tokens and Scopes for HTTP
  • A Remote MCP Server in Production: Tokens Bound to One Server, Tool Versions Side by Side, and a Gateway With Its Own Upstream Token
  • MCP, an API/CLI Call or Agent-to-Agent: Choosing How Claude Connects to a Capability
  • From ML Metrics to LLM Evals: Same Ruler, New Targets
  • Why You Cannot Ship an LLM Feature Without an Eval: Five Parts, Three Graders, One Tiny Eval
  • Building a Golden Dataset for LLM Evals: Cases, a Schema, a Coverage Table and a Seeded Split
  • Retrieval Evals: Score the Retriever With Recall@K, MRR and nDCG Before Blaming the Model
  • Regression Testing an LLM Bot in CI: A Golden Set, Two pytest Gates and GitHub Actions
  • Testing a RAG Bot Before It Ships: Slices, a Release Gate per Slice, and the Week After
  • RAG Generation Metrics: Faithfulness, Groundedness and Relevance, One Claim at a Time
  • LLM-as-Judge: Write a Rubric, Check Every Verdict, and Trust the Grader Only After Kappa Says So
  • RAGAS and Custom Evals: Framework Faithfulness Plus Your Own Citation and Required-Fact Checks, Behind One Gate
  • Which Test Layer Owns the Failure? Unit, Functional, Integration and End-to-End Tests for a Claude App
  • Six Ways a 200 Can Still Be Wrong: Hallucination, Refusal, Under-Acting, Context Loss, Format Drift and Inconsistency
  • Keeping an Eval Suite Valid: Check It for Contamination, Saturation and Coverage Before You Trust a Green Gate
  • Eval Metrics by Task Type, and Evaluating a Non-Deterministic Agent With Repeated Trials
  • Proving a Model Upgrade Is Ready: A Frozen Golden Set, a Calibrated Judge, the Right Layer and a Release Gate
  • The Failure Nobody Saw: Finding the Instrumentation Gap in an LLM Agent
  • Six Metrics, Not One Score: Accuracy, Groundedness, Latency, Cost, Safety and Security for an LLM Agent
  • The Metric That Would Have Caught It: Finding Eval Coverage Gaps After a Green Suite
  • Eval Datasets and Mixed-Method Test Frameworks: Code Checks, an LLM Judge and Human Review
  • Calibrating an LLM Judge: Diagnosing Position, Verbosity, Self-Preference and Drift
  • Trials per Case: Separating a Real Effect From Run-to-Run Variance When You Compare Two Prompts
  • Diagnosing a Bad Answer: Prompt Failure, Hallucination or Model Mismatch?
  • Building a Claims Assistant: RAG, an Eval Harness With a Gate, and OpenTelemetry Tracing
  • Fallback Models for an LLM App: A Chain That Checks Region and Fit, Flags Degraded Answers and Gets Rehearsed
  • Back Pressure for LLM Traffic: Bound the Queue, Give Chat Its Own Lane, Count Tokens, Cancel When the Caller Leaves
  • Load Balancing LLM Traffic: Count the Work, Weigh the Prefix Cache, Check Real Health, Drain Before Deploys
  • A Message Queue for Document Ingestion: At Least Once, Leases, an Idempotent Consumer and a Dead Letter Queue
  • Caching for AI Apps: Four Layers, What Goes in Each Key, and How a Delete Travels
  • Semantic Caching: Why a Similarity Threshold Can't Stop Confident Wrong Answers
  • LLM Model Routing: Rules, a Classifier or a Cascade, Judged on Cost per Win and Every Topic
  • Cutting p95 and Cost in Half for an LLM App: Read the Bill, Match the Lever, Guard Success
  • Observability and Tracing for LLM Apps: A Span per Stage, Redaction First, Bad Traces Become Tests
  • Guardrails for an LLM Agent: Check What Comes In, What It Wants to Do, and What Goes Out
  • Embedding Migration With Zero Downtime: Two Indexes, a Dual-Write Backfill, a Shadow Check and a Flag
  • Design a Multi-Tenant RAG Assistant, Part 1: Requirements, Rough Numbers and a Contract
  • Design a Multi-Tenant RAG Assistant, Part 2: Tenant Isolation, a Scoped Cache and Walking an Outage
  • A 500 MB PDF Takes 50 s to Answer, Get It to 2 s: Measure First, Then Promise Per Path
  • A 500 MB PDF From 50 s to 2 s, the Fast Path: Queue, Status, Streaming and an Acceptance Test That Fails
  • FastAPI for AI Services: Schemas at the Door, Load Once in the Lifespan, Depends, and def vs async def
  • Streaming LLM Answers From FastAPI: Sources First, Token Events Over SSE, and the Same Events Over a WebSocket
  • Docker for AI Apps: Bake the Model Weights In at Build Time, Use CPU-Only PyTorch, and Run Offline
  • Deploy a RAG Service: A Service Key, Health and Ready Checks, Caddy in Front and a Smoke Test
  • Cost Tracking and Budget Guards for an LLM App: Count the Tokens, Log Every Call, Check Before You Spend
  • Versioning Prompts, Models and Indexes: Three Moving Parts, One Release File and a One-Line Rollback
  • Retries With Limits for LLM Calls: Jitter Under a Capped Ceiling, a Retry Budget, a Circuit Breaker and a Graceful Reply
  • Multi-Tenant Quotas for One Shared LLM: a Bounded Line per Tenant, Fair Turns and a Pause When the Model Says Wait
  • Find the Binding Constraint Before You Tune: Requests, Input Tokens or Output Tokens per Minute, and When to Send a Batch
  • SLIs and SLOs for an LLM Service: Count Good Events, Promise a Level, Page on Burn Rate
  • Drift After a Model Update: Tag Every Event, Split the Dashboard by Version, Alert Against a Baseline
  • Trace Analysis at Scale: Tail-Sample to Read, Count Every Trace by Failure Cohort to Measure
  • Incident Response for an LLM Agent: Triage, Flip the Pointer, Check the Canaries, Then Tell People
  • From Incident to Regression Eval and Postmortem: One Incident, Three Things Left Behind, and a Gate That Remembers
  • Fleet Cost Forecasting for an LLM Service: Profile per Workload, Times Mix, Times Volume
  • From One Claude Call to a System: Input, Processing, Output and the Feedback Loop
  • Stress-Testing an LLM Architecture: Find the Component That Fails First
  • Five Reference Architectures for Claude Systems: Read the Cue, Name the Shape
  • Business Value Pillars for an LLM System: Turn "Cheaper and Faster" Into Targets, Then Pick the Lane
  • The Claude Model Ladder: Pick the Cheapest Model That Passes, Then Price the Month
  • Connecting Claude to a Legacy System You Can't Change: The Adapter Pattern
  • Speed Has a Price and the Rate Limit Is the Ceiling: Choosing Model, Effort and Fast Mode per Path
  • Reliability Controls for Claude Apps: Backoff, Idempotency Keys, Fallback Routing and Circuit Breakers
  • Observability at Scale and a Gated Rollout: Metrics for All, Traces by Rule, Content on Trigger
  • The Failure Nobody Saw: Finding the Instrumentation Gap in an LLM Agent
  • An Ops Runbook for Claude Failures: Case Cards, Request IDs, Owners and a Read-Only Investigation
  • Guardrails for an LLM Agent: Check What Comes In, What It Wants to Do, and What Goes Out
  • The Agent Attack Surface: Blast Radius, Narrow Tools, Scoped Keys and the Dangerous Three
  • Prompt Injection, Jailbreaks and Untrusted Input: Label What Comes In, Gate What Goes Out
  • Injection Exposure Review for an Agent: Map Inputs, Data and Effects, Layer Every Path, Retest the Job
  • Data Leakage and PII in LLM Apps: Redact, Minimize, Log Safely and Count Every Place
  • Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies
  • Claude API Keys: Keep the Key on a Server Proxy, One Key per Environment, Rotate and Scope It
  • Tuning an LLM Guard: False Positives Against False Negatives, a Review Band, and Model Refusals
  • Red-Teaming an LLM Agent with the OWASP LLM Top 10 and the NIST AI RMF: Judge What It Did, Not What It Said
  • Least-Privilege Tools and an Audit Log for Agent Actions: Grant by Job, Decide in Code, Record Every Allow and Deny
  • Agent Identity with Workload Identity Federation: a Short-Lived Token Instead of a Static Key, and Tool Secrets Kept in the Harness
  • Memory Poisoning and Tool Poisoning in LLM Agents: Three Doors In, Two Ways Out, and the Controls That Hold
  • Authentication and Authorization for Claude Agents: Find the Gaps Hop by Hop
  • Risk Framing for LLM Systems: A Risk Register Ranked by Exposure, Not by Odds
  • Ranking Deployment Risk: Attack Surface, Failure Modes, Quota Exhaustion and Supply Chain
  • Human-in-the-Loop Routing: Send Each Agent Action to Auto, Review or Block by Confidence, Reversibility and Cost
  • Compliance for an LLM System: Tie Every Obligation to a Control, an Owner and Evidence
  • Control Sets for Compliance: Residency, Retention and ZDR, PII Redaction, Audit Logs and Tenant Isolation
  • Bias, Fairness and Transparency in LLM Decisions: Find the Source of a Gap, Then Pick the Fix
  • An AI Governance Operating Model on One Page: Risk Tiers, Named Gates and Re-Gating on Change
  • A Regulated Dispute Desk on Claude: Pin the Geography, Gate by Risk, Log Before Release, Fail Closed
  • The AI Reply Is Untrusted Too: Links, Commands and Hidden Content in What It Writes Back
  • Poisoned Data, Poisoned Models and the AI Supply Chain: Attacks Before Anyone Types a Prompt
  • How Data Leaks from AI Tools: Five Quiet Ways Out, Shadow AI and a Table of What May Go Where
  • AI for Defenders, and AI in Attackers' Hands: Faster Alert Triage, Cleaner Phishing, Cloned Voices and the Habits That Still Work
  • AI Security Frameworks in Plain Words: NIST AI RMF, ISO/IEC 42001, the EU AI Act and the OWASP Top 10 for LLMs
  • AI Policy, the Risk Register and Who Owns What: An Inventory, One Owner, a Two-Question Score and a One-Page Policy
  • Reading a Business Requirement Like an Architect: Function, Quality, Constraints and Assumptions
  • Discovery for an AI Project: Running the First Conversation, Five Question Groups and Three Red Flags
  • Communicating AI Decisions, Trade-offs and Risk to Executives: The Decision Card, the Risk Matrix and One Ask
  • Feedback Loops, Expectations and SLAs for an AI Service: Find the Promise the Architecture Can't Keep
  • Documenting an AI Architecture for Handoff: One Document per Reader, a Handoff Gate and Rules With a Reason
  • The Architecture Decision Record for a Claude System: Context, Options, Decision, Consequences and the Evidence You Will Need
  • The Evidence Readout: Presenting Eval Numbers and Traces to Stakeholders as a Decision
  1. Blog
  2. /
  3. AI Engineering
  4. /
  5. LLM Fundamentals

Zero-Shot, Few-Shot or Reasoning: Pick the Cheapest Prompting Technique the Failure Asks For

One refund ticket, three prompts. Zero-shot fails to give a parseable label, few-shot fixes the format at the cost of input, prompted reasoning fixes logic at the cost of output. Climb one step per measured failure.

Chaand Sheikh

·27 November 2026LLM Fundamentals

What you will learn

  • Climb a prompting ladder: zero-shot, then few-shot, then prompted reasoning
  • Match each technique to the failure it fixes: format drift or multi-step logic slips
  • See where each technique pays: few-shot in input, reasoning in output and latency
  • Prefer native thinking and effort over hand-written step plans, and avoid the everything-on prompt

Before you start

  • One Claude API call with a system prompt
  • Basic Python and regular expressions

A refund ticket arrives at a blender shop: Bought the blender 40 days ago. The motor burns out after a minute. I want my money back. The triage bot has to decide what happens next, and there are several ways to prompt it: zero-shot, few-shot, prompted reasoning and native thinking.

An architect doesn't pick the fanciest one. They pick the cheapest one that holds.

Three ways to brief a new hire

Think of a new hire at the refund desk. They can get three kinds of help:

  • Just do it. "Handle this refund." No past cases. Fast, when the work is routine. That's zero-shot.
  • Here are past cases. Ten days, refund. Fifty days with a fault, escalate. Two years, reject. Now handle this one. That's few-shot.
  • Show your working. Forty days, past thirty. The motor dies, so it's a fault. Inside a year, so escalate. Slower, but fewer slips. That's prompted reasoning (chain-of-thought).

Each one buys reliability and charges for it. Zero-shot is the shortest prompt, costs the least and gives the least control. Few-shot sends examples on every call: more input, steadier output. Prompted reasoning writes the reasoning before the answer: more output, more latency. The technique is a way of briefing, not a magic word.

The ladder

The prompting ladder 1. Zero-shot start here 2. Few-shot pays in input 3. Prompted reasoning pays in output, latency climb if format or judgment drifts climb if multi-step reasoning slips Every climb is only a prompt edit. The trigger is a measured failure, not a feeling.
Start with the cheapest step. Add only what the failure asks for.
  1. Zero-shot. Start with the shortest prompt that could work.
  2. Few-shot. Climb when the format or the judgment drifts.
  3. Prompted reasoning. Climb when multi-step reasoning slips.

Prompt before you fine-tune: every step on this ladder is only a prompt edit. And the trigger is a failure you measured with an eval, not a feeling. Each step adds cost, so each step needs evidence.

The three prompt files

The project runs against a stand-in: the Anthropic SDK on an httpx mock transport with scripted replies, so no API key is needed and the replies show the design, not a real model's quality. The stand-in only checks which technique the prompt holds. The word counts and the parsing are real Python.

zero_shot.txt

You triage refund tickets for a blender shop.
Policy: refund within 30 days of purchase, escalate a fault
under the one-year warranty, reject everything else.
Answer with one label: refund, escalate or reject.

few_shot.txt

You triage refund tickets for a blender shop.
Policy: refund within 30 days of purchase, escalate a fault
under the one-year warranty, reject everything else.
Write one line: label: <refund|escalate|reject> | reason

<examples>
<example>
ticket: Bought it 10 days ago, changed my mind.
answer: label: refund | inside 30 days
</example>
<example>
ticket: Bought it 50 days ago, the lid cracked in use.
answer: label: escalate | a fault inside the warranty
</example>
<example>
ticket: Bought it 2 years ago, it no longer fits my kitchen.
answer: label: reject | outside both windows
</example>
</examples>
  • The instructions fix the output format: one line, the label, then the reason.
  • The examples sit in their own tags, apart from the instructions.
  • The middle one is the ambiguous case, a fault past 30 days, where a rule alone isn't enough.
  • The examples are diverse, one per label. The docs ask for relevant, diverse examples; more in few-shot prompting.

reasoning.txt

You triage refund tickets for a blender shop.
Policy: refund within 30 days of purchase, escalate a fault
under the one-year warranty, reject everything else.
Reason it through in <reasoning> tags: the days since purchase,
then whether it is a fault, then which rule applies.
Then give only the final label in <answer> tags.

It asks for the reasoning first, names the steps that matter for this task, and puts the final label in answer tags so code can extract it. This file is the fallback for when native thinking is off.

The script: only the label leaves

From triage.py (the stand-in client setup is left out here): the ladder pairs each failure with the prompt it earns, and the parser keeps the label and drops the reasoning.

TICKET = ("Bought the blender 40 days ago. The motor burns out "
          "after a minute. I want my money back.")
EXPECTED = "escalate"
LADDER = [("no failure seen yet", "zero_shot"),
          ("format or judgment drifts", "few_shot"),
          ("multi-step reasoning slips", "reasoning")]

ANSWER = r"<answer>(refund|escalate|reject)</answer>"
LABEL = r"^label: (refund|escalate|reject)\b"


def parse(text):
    """Only the label leaves. The reasoning stays here."""
    hit = re.search(ANSWER, text)
    hit = hit or re.search(LABEL, text)
    return hit.group(1) if hit else None


def words(text):
    return len(text.split())


for failure, name in LADDER:
    path = f"{name}.txt"
    system = open(path, encoding="utf-8").read()
    msg = client.messages.create(
        model="claude-sonnet-5-5", max_tokens=300, system=system,
        messages=[{"role": "user", "content": TICKET}])
    reply = msg.content[0].text
    label = parse(reply)
    print(f"{name:10} after: {failure}")
    print(f"  prompt {words(system):3} words | reply {words(reply):3} words"
          f" | label {label} | right {label == EXPECTED}")
zero_shot  after: no failure seen yet
  prompt  33 words | reply  10 words | label None | right False
few_shot   after: format or judgment drifts
  prompt  95 words | reply   8 words | label escalate | right True
reasoning  after: multi-step reasoning slips
  prompt  54 words | reply  27 words | label escalate | right True

Zero-shot got a chatty reply, and the label is None: no parser can read it. Few-shot has the longest prompt and returns escalate. Prompted reasoning has the longest reply, because it carries the reasoning, and also returns escalate. The parser is the architect's gate: nothing but the label reaches the customer.

The bill: where each technique pays

Prompt words versus reply words prompt words (every call) reply words (output, time) 33 95 54 10 8 27 green: zero-shot blue: few-shot red: prompted reasoning
Few-shot pays on the input; prompted reasoning pays on the output. Stand-in replies, so read the bars as a shape, not a measurement.

A steady block of examples is a candidate for prompt caching. Reasoning is output you wait for.

Prompted reasoning or native thinking

Reasoning has also moved into the model, as native thinking. With thinking on, the model can think before it answers, and effort sets how much. The docs say a general instruction often beats a hand-written step plan. With thinking off, prompted reasoning is the fallback: ask it to think first, and put the final answer in answer tags you can extract. So set thinking and effort first, and write reasoning steps only as a fallback. The settings are covered in Claude adaptive thinking and effort.

The trap: the everything-on prompt

A routine ticket, one clear label, and a prompt that switches on everything at once:

  • Three examples on every call: input, paid every single time.
  • A hand-written step plan: more reply words.
  • Native thinking switched on as well: now the same reasoning is paid for twice, in output and in waiting time.

Three costs, for a failure nobody measured. Add one technique per measured failure, and stop when the evidence says enough.

A worked judgment

The labels are right, but the reply format changes between calls, and the parser fails on some replies. The tickets are simple. Should you add a step-by-step plan, add three diverse examples, or switch native thinking on?

Add the examples. The failure is format drift, and examples fix format and judgment. A step plan would add reply words, and the labels were never wrong. Native thinking would add output and waiting time, and this isn't a logic slip. Format drift points to examples. Logic slips point to reasoning.

Quick recap

TechniqueFixesPays inIn the run
Zero-shotNothing yet: the starting pointLeast of both33 / 10 words, label None
Few-shotFormat and judgment driftInput, every call95 / 8 words, escalate
Prompted reasoningMulti-step logic slipsOutput and latency54 / 27 words, escalate
Native thinkingMulti-step logic, as a settingOutput and latency, set by effortNot in the run

The project files for this lesson are in the community, free to join.

Try it yourself

Swap the ticket for Bought it 25 days ago, the jug arrived cracked. Decide the right label from the policy first. Then, against a real model, run the zero-shot prompt with its instruction changed to the one-line label: ... | reason format and see whether that alone fixes the parse, before you pay for examples.

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in AI Engineering · 16 of 153

Previous
Context Engineering for a Long-Running Agent: Clear, Compact, Take Notes, Prove It
Next post
What an Embedding Actually Is: Meaning as Numbers, Search by Closeness, and Where Hand-Made Numbers Break

Related course on Udemy

Claude Certified Architect - Professional (CCAR-P) Exam Prep

Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)

Related posts

The AI Stack in One Picture: Six Layers Every AI Product Is Built From

Every AI product is built from six layers: data, model, retrieval, orchestration, serving and ops, with evals and security across all of them. A restaurant analogy, one request traced through all six, and what an AI engineer actually builds around the model call.

Tokenization: What an LLM Actually Sees When You Type

A language model never sees letters, only token ids. Use tiktoken to watch strawberry become three ids, see a space or a capital change them, fix the letter-counting problem, and compare English, German and Hindi token counts.

LLM Tokens, Context Windows and Cost: What One Question Really Costs

Follow one four-word help desk question that becomes 911 input tokens. Learn what fills the context window, why chat memory grows every turn, how max_tokens cuts a reply, and how to price a call.

What an LLM Can and Cannot Do: One Prediction Loop, Its Strengths and Its Gaps

A large language model predicts the next token, over and over. That one loop makes it strong at drafting, summarising and classifying, and weak at fresh facts, exact maths, memory and guaranteed truth. See why with a three-line tiktoken script, and learn the fix for each gap.

On this page

  • Three ways to brief a new hire
  • The ladder
  • The three prompt files
  • zero_shot.txt
  • few_shot.txt
  • reasoning.txt
  • The script: only the label leaves
  • The bill: where each technique pays
  • Prompted reasoning or native thinking
  • The trap: the everything-on prompt
  • A worked judgment
  • Quick recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

Claude Certified Architect - Professional (CCAR-P) Exam Prep

Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact us
Legal
Terms of UsePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.