Module 1 Final Quiz
Seven core questions covering every lesson in the module, then six on what the real runs showed.
What you will be able to do
- Explain what turns an LLM into an agent
- Describe the ReAct loop and who writes each part of it
- Say why agents need structured output, memory, planning, and error handling
- Tell a multi-agent hand-off apart from a ReAct loop
- Explain why Module 1 built everything by hand before Module 2’s framework
How to use this
The final review for Module 1: Agents From Scratch. Questions 1-7 cover the core ideas, in lesson order. Questions 8-13 come from the real runs - the things a local model actually did that theory alone would not tell you.
One sentence to carry into Module 2: an agent is an LLM that can use tools, look at their results, and repeat until it can give a final answer.
The loop at the centre is Lessons 1.4 to 1.6. Everything around it - memory, planning, error handling, more agents - is what Lessons 1.7 to 1.12 added.
How to use this quiz
- Answer each question out loud or on paper BEFORE you open the answer.
- Every answer names the lesson it comes from. If one was hard, reread that lesson - that is the point of the quiz.
- Use the cheat sheet below to check the words, and the table of everyday examples to check the ideas.
Module 1 in everyday examples
Each lesson had a story. If you can explain the story, you understand the idea:
1.3 - Filling in a bank formAsk for an exact JSON shape. Not JSON: retry with feedback. Wrong data: reject.1.4 - The owner talks, the helper presses the buttonsAgent = LLM + tools + loop. The model decides; your code runs the tool.1.5 - A code phrase for the helperAn exact text format (TOOL: ...) that your code can find with a regex.1.6 - Several trips; ask, then waitThe ReAct loop. A stop sequence so the model never writes its own Observation.1.7 - A key that opens one drawerReal tools need limits in the tool, not the prompt - files can carry instructions.1.8 - The helper’s notebookMemory is the message list, resent each call. Trimming is forgetting.1.9 - A to-do list before startingPlan first, with steps the tools can do. Carry results forward. Re-check.1.10 - "We have no computer"Every error becomes an Observation. And let the model say "no tool can help".1.11 - A reporter who never leaves the deskAgents pass text, not truth. A writer polishes errors; a reviewer checks only consistency.1.12 - Opening dayTools for answers, a file for lasting memory, sources for facts.Module 1 cheat sheet
LLMGenerates text - including the decision about what to do next.
ollama.chat(model, messages)
ToolA function your code runs on the model’s behalf.
TOOLS = {"calculate": calculate}AgentLLM + tools + a loop.
for step in range(max_steps):
ReActThought -> Action -> Observation, repeated, then Final Answer.
options={"stop": ["Observation:"]}Structured outputMachine-readable data: parse it, then validate it.
json.loads(raw)
MemoryPrevious messages, resent - or facts in a file, loaded each start.
messages.append(...)
PlanningBreak a goal into steps; carry results forward; re-check.
make_plan(goal)
Error handlingTurn failures into Observations, within limits.
except Exception as e: ...
Multi-agentSpecialised agents pass outputs to each other.
writer(researcher(topic))
FrameworksHide these details - Module 2 starts there.
LangChain, LangGraph
Key points
- An agent is an LLM that can use tools, observe their results, and repeat until it can answer.
- The model decides; your code executes - and every safety limit lives in your code.
- Structured output must be parsed and validated; retries need feedback to help.
- Memory is what your code resends or reloads; trimming and context limits make it forget.
- Plans are guesses - carry results forward and re-check as you go.
- Errors become Observations, inside step and retry limits.
- Agents chained together repeat each other’s mistakes unless grounded in real sources.
Module 1 final quiz
- 1.
1. What three things turn an LLM into an agent?
- 2.
2. In the ReAct pattern, what do Thought, Action, Observation and Final Answer each mean?
- 3.
3. Why ask the model for JSON in a fixed format, and what do you do if it does not comply?
- 4.
4. Where is "memory" actually stored in a hand-built agent, and why must it be trimmed?
- 5.
5. Give two failures a sturdy agent should catch, and how each is handled.
- 6.
6. What is the difference between the hand-off in Lesson 1.11 and the ReAct loop in Lesson 1.6?
- 7.
7. Why build all of this by hand before using LangChain in Module 2?
- 8.
From the runs - 8. Asked for 47 x 89 three times, the model said 4193 once. What does that show, and what fixes it?
- 9.
From the runs - 9. In five of six first replies, the model wrote its own "Observation:". Why is that dangerous, and what stopped it?
- 10.
From the runs - 10. A file the agent read told it to open /etc/hosts. What happened, and where does the defence belong?
- 11.
From the runs - 11. About 8,000 tokens of conversation went to llama3.1 running with Ollama’s default 4,096-token window. What did Ollama do?
- 12.
From the runs - 12. A plan step "calculate the difference" got stuck when run on its own. Why?
- 13.
From the runs - 13. A writer agent was given notes with one false fact, and a reviewer agent approved the article. Why did both fail?
Comments
Sign in to leave a comment. Your name and photo come from Google; nothing else is shared.
Loading comments...