← Back to Agentic AI map
Lesson 1.13 · Agents From Scratch

Module 1 Final Quiz

Seven core questions covering every lesson in the module, then six on what the real runs showed.

review

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

This is the final review for Module 1: Agents From Scratch. Answer each question from memory before revealing it - if one is hard, the lesson it came from is worth another read. The core questions are in lesson order.

Every lesson in this module was run against a real local model, and the runs taught things the theory alone does not. The last six questions come from those runs: invented tool results, instructions hidden in files, memory that quietly forgets, and agents that repeat each other’s mistakes.

One sentence to carry into Module 2: an agent is an LLM that can use tools, observe their results, and repeat the process until it can produce a final answer.

ArchitectureModule 1 in one picture

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.

Module 1 cheat sheet

LLM

Generates text - including the decision about what to do next.

ollama.chat(model, messages)
Tool

A function your code runs on the model’s behalf.

TOOLS = {"calculate": calculate}
Agent

LLM + tools + a loop.

for step in range(max_steps):
ReAct

Thought -> Action -> Observation, repeated, then Final Answer.

options={"stop": ["Observation:"]}
Structured output

Machine-readable data: parse it, then validate it.

json.loads(raw)
Memory

Previous messages, resent - or facts in a file, loaded each start.

messages.append(...)
Planning

Break a goal into steps; carry results forward; re-check.

make_plan(goal)
Error handling

Turn failures into Observations, within limits.

except Exception as e: ...
Multi-agent

Specialised agents pass outputs to each other.

writer(researcher(topic))
Frameworks

Hide 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.

    1. What are the three components that turn an LLM into an agent?

  2. 2.

    2. In the ReAct pattern, what do Thought, Action, Observation and Final Answer each mean?

  3. 3.

    3. Why do we ask the model for JSON in a fixed format, and what do we do if it does not comply?

  4. 4.

    4. Where is "memory" actually stored in a hand-built agent, and why must it be trimmed?

  5. 5.

    5. Give two examples of failures a sturdy agent should catch, and how each is handled.

  6. 6.

    6. What is the difference between the hand-off pattern in Lesson 1.11 and the ReAct loop in Lesson 1.6?

  7. 7.

    7. Why build all of this by hand before using LangChain in Module 2?

  8. 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. 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. 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. 11.

    From the runs - 11. A conversation of about 5,700 tokens was sent to a model running with a 4,096-token window. What did Ollama do?

  12. 12.

    From the runs - 12. A plan step "calculate the difference" got stuck when run on its own. Why?

  13. 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...