AI City Popy ๐Ÿ™๏ธ
๐Ÿง 
โœจ
๐Ÿ”ค
District 03 ยท Model District

Meet theLLM Brain

Before agents, tools, and RAG, there is one magical engine underneath it all: the large language model. Learn what it is good at, where it breaks, how to engineer its context window, and why the rest of AI City exists.

Enter Model District

LLM in one sentence

An LLM is a pattern-predicting text engine that guesses the next best token, one tiny piece at a time.

What An LLM Actually Does

A large language model is not a tiny person hiding inside your app. It does not "know" facts the way a librarian does. It studies enormous amounts of text and learns patterns about what words, phrases, and structures usually come next.

That means an LLM is incredibly good at language-shaped work: explaining, summarizing, drafting, translating, classifying, and formatting. But it can still sound confident while being wrong.

๐Ÿค–

Think of the LLM as AI City's talking brain. It is brilliant at shaping language, but it still needs memory, tools, and tests if you want trustworthy systems.

Great at
Summaries, rewrites, extraction, classification
Weak at
Fresh facts, perfect math, guaranteed truth
Needs help from
RAG, tools, schemas, evals

Tokens And The Context Window

LLMs don't read giant paragraphs the way you do. They process smaller chunks called tokens. Their context window is the size of the desk they can keep in front of them at once.

Context Window
Capacity: 10 tokens
More tokens = more room
PlanatriptoTokyotomorrowfor3friendsunderโ‚น50kwithfoodideas

Why Prompting Matters

Active Layer
System message

Sets the model's long-lived behavior: tone, rules, role, constraints.

You are a careful travel planner. Be concise. Never invent prices.

Context Engineering Is The Real Product

In production, most LLM quality problems are not solved by changing the base model. They are solved by deciding what goes onto the model's desk for this turn.

Context engineering means choosing the right instructions, retrieved facts, tool outputs, summaries, and user state, then leaving out everything noisy or stale.

๐Ÿค–

Prompt engineering writes clever words. Context engineering decides which facts, rules, and memories the model is allowed to see.

Curated context

Good context engineering keeps only the facts, rules, and state the model needs right now.

System rules
Current user goal
Top retrieved facts
Fresh tool results

Choose The Right Context Move

Good systems do not keep throwing more text at the model. They decide whether this turn needs a direct answer, a retrieval step, a tool call, or a compact memory summary.

Recommended move
Retrieve fresh facts

Use retrieval when the answer depends on company docs, knowledge bases, or recent information.

Example: What is our current refund policy for annual plans?

Temperature, Determinism, And Hallucinations

Lower temperature usually makes answers steadier. Higher temperature usually makes them more varied and imaginative. But neither setting guarantees truth. A confident wrong answer is still wrong.

Model reply

A lower temperature makes the model stick closer to common, stable patterns. It helps when you want consistent formatting or safer extraction.

Hallucination warning
The model lacks the needed facts in context.
The prompt is vague, so it fills the gaps by guessing.
The task needs a tool or database, not pure text prediction.

Why LLMs Need RAG, Tools, And Evals

RAG

When the model needs fresh or private facts, give it retrieved documents instead of hoping it remembers.

Tools

When the task needs actions, math, search, or APIs, the model should call software instead of pretending.

Evals

When quality matters, measure the behavior. Otherwise every prompt tweak is just a feeling.

Final Mission: Fix The Right LLM Problem

Mission 1 / 4

Your model must answer refund-policy questions using the latest company PDF.

Goal: learn when the raw LLM is enough and when the system must help it.

Model District Complete

Now you know what the brain can and cannot do.

Next, step into the AI Worker Office to see how one LLM brain becomes specialized agents with roles, tools, and teamwork.

Meet the AI Workers
Mini Project
Build Quest

Prompt + Context Pack

Deliverable: Design a system prompt and context packet for one support question, then produce a grounded answer.

Stretch: Show quality difference with and without context.

Complete the deliverable first, then unlock the stretch goal.

Previous
๐Ÿ›ต Async Roads
Next
๐Ÿง‘โ€๐Ÿ’ผ AI Workers