Courses  /  Generative AI

Generative AI Software Engineering

AI-Powered Software Engineering and Automation. Master AI agents, prompts, and automated workflows with cutting-edge generative AI tools.

Progress: 0 / 36 lessons done

Study order: Python agents first, then TypeScript agents, then MCP, then Claude Code. Python and TypeScript first courses teach the same ideas in different languages, so pick one first, not both.

Note: Claude Code needs a paid subscription [PAID]. Custom GPTs need a ChatGPT account [CHATGPT]. Everything else on this page is offline practice [OFFLINE].

Start here

1. How to use this program

What it is

Read in order. Tick the box when you finish a lesson. Your progress is saved in your browser. Each lesson has the same shape: What it is, Why it matters, Code or examples to copy, Try it yourself, and Check questions with answers you can open.

Why it matters

You do not need to do everything in one day. Ten minutes a day is enough. Do one lesson, run its code, then stop.

How this page is organised

# No code in this lesson.
# Use the sidebar on the left to jump to any lesson.
# Tick "Done" when you finish a lesson.

Try it yourself

Open the sidebar and find Module 1. Tick this lesson Done.

Check

Do I need to finish all 4 courses before the Applied Learning Project?

No. The project grows with you. You start it in Course 1 and add to it in each course.

Can I do the lessons in a different order?

Yes, but the order on this page is the easiest one. Python or TypeScript first, then MCP, then Claude Code.

Start here

2. Setup — what you need

What it is

You need: a computer, Python 3.10 or newer, Node.js 20 or newer, Git, and a code editor. You do not need a cloud account or an API key for the practice parts of this page. All the code here runs offline with a small practice model.

Why it matters

If setup is hard, learning stops. So setup is kept to three commands. The real tools come later, one at a time.

Check your tools

python3 --version
node --version
git --version
# Each command should print a version number.
# If one is missing, install it first, then come back.

Try it yourself

Run the three commands above and write down the three version numbers.

Check

Do I need a paid account to follow this page?

No, not for the practice code. Claude Code itself needs a paid subscription, and custom GPTs need a ChatGPT account. Those steps are marked [PAID] and [CHATGPT]. Everything else is [OFFLINE].

What if Python or Node is missing?

Install Python from python.org and Node.js from nodejs.org, then run the commands again.

What you'll learn

3. 1. Python agents that work alone

What it is

A Python agent is a small program that can do a job by itself: read data, read a document, decide what to do next, use a tool, and finish a multi-step job without a human clicking each step.

Why it matters

Most office work is multi-step work. An agent that can do the steps in order, and check its own work, saves hours.

A tiny Python agent (offline practice model)

def fake_llm(prompt):
    """A small practice model. It does not call the internet."""
    if "expense" in prompt.lower():
        return "ACTION: check_receipt"
    return "ACTION: final"

def run_agent(task):
    step = fake_llm(task)
    print("Task:", task)
    print("Agent decided:", step)
    return step

run_agent("Process this expense report")
# Swap note: replace fake_llm with a real model call later.
# The rest of the agent code stays the same.

Try it yourself

Run the code above, then change the task to "Read this invoice" and run it again.

Check

What makes an agent different from a normal program?

A normal program follows fixed steps. An agent decides the next step from what it sees.

Do I need a real AI model to practise?

No. The fake model above is enough to learn the loop. Swap it later.

What you'll learn

4. 2. Claude Code agents that build software in minutes

What it is

Claude Code is a tool that writes software for you. You describe the app in plain words, and it writes the code, the database, and the screens. You act like a tech lead: you give the job, check the work, and ask for fixes.

Why it matters

Writing every line by hand is slow. Delegating the typing to an agent, while you keep the design and the checks, is much faster.

A Claude Code prompt you can copy [PAID]

# Type this to Claude Code (needs a paid subscription):
# "Build a small expense-report app.
#  It needs: a form to add an expense, a list of expenses,
#  and a total. Use Python and a simple web page.
#  Add tests that check the total is correct."
# Then ask: "Run the tests and fix any failures."

Try it yourself

Write your own one-paragraph description of an app you want, using the same shape: what it does, what it needs, what to test.

Check

Is Claude Code the same as a chatbot?

No. A chatbot answers questions. Claude Code changes files, runs tests, and builds apps.

Do I still need to know how to code?

Yes, a little. You need enough to check the work and describe what you want clearly.

What you'll learn

5. 3. Prompts and custom GPTs for business work

What it is

Prompt engineering is writing clear instructions so an AI gives a precise, useful answer. A custom GPT is a version of ChatGPT that you set up for one business job — for example, reading expense reports — with its own instructions, its own documents, and its own rules.

Why it matters

A vague prompt gives a vague answer. A clear prompt, with the rules and the format you want, gives an answer you can use at work.

A prompt template you can copy

BUSINESS_PROMPT = """You are an expense-report checker.
Rules:
- Only accept amounts with a receipt.
- Reject any amount over $500 without a manager note.
- Answer in this exact format:
  Decision: APPROVED or REJECTED
  Reason: one short sentence
Expense: {expense}
"""

print(BUSINESS_PROMPT.format(expense="Taxi $40, receipt attached"))

Try it yourself

Change the $500 limit to $200 in the template and run it again.

Check

What is a custom GPT?

A ChatGPT set up for one job, with its own instructions and documents.

Why write the format in the prompt?

So the answer is always in the same shape, and a program can read it.

Skills and tools

6. Skills you'll gain

What it is

This program teaches 16 skills: Software Development, Artificial Intelligence and Machine Learning (AI/ML), Agentic systems, Software Design, AI Personalization, Generative AI, Software Architecture, LLM Application, Prompt Patterns, Retrieval-Augmented Generation, Automation, Software Engineering, Multimodal Prompts, Prompt Engineering, Agentic Workflows, and Software Testing.

Why it matters

Skills are what an employer can check. Each lesson on this page builds one or more of them, and the Applied Learning Project shows them all together.

The 16 skills, as a Python list

skills = [
    "Software Development",
    "Artificial Intelligence and Machine Learning (AI/ML)",
    "Agentic systems",
    "Software Design",
    "AI Personalization",
    "Generative AI",
    "Software Architecture",
    "LLM Application",
    "Prompt Patterns",
    "Retrieval-Augmented Generation",
    "Automation",
    "Software Engineering",
    "Multimodal Prompts",
    "Prompt Engineering",
    "Agentic Workflows",
    "Software Testing",
]
print(len(skills), "skills")
for s in skills:
    print("-", s)

Try it yourself

Run the code and count the skills. Pick the three you most want to learn and write them down.

Check

What is Retrieval-Augmented Generation (RAG)?

It means the AI reads your documents first, then answers from them, instead of guessing.

What is an agentic workflow?

A job split into steps that an agent does in order, with tools and checks.

Skills and tools

7. Tools you'll learn

What it is

You will learn four tools: Claude Code, ChatGPT, Generative AI Agents, and Software Development Tools (your editor, Git, Python, and Node.js).

Why it matters

Tools change. Principles do not. Learn the tool, but also learn the idea behind it, so you can move to the next tool later.

The 4 tools, as a Python list

tools = ["Claude Code", "ChatGPT", "Generative AI Agents",
         "Software Development Tools"]
print("Tools:", ", ".join(tools))

Try it yourself

Write one sentence for each tool saying what you will use it for.

Check

Do I need all four tools on day one?

No. Start with Python and your editor. Add each tool when its lesson arrives.

Is ChatGPT the same as a custom GPT?

ChatGPT is the general tool. A custom GPT is a ChatGPT you set up for one job.

Advance your expertise

8. Build a portfolio that proves your skills

What it is

This program has four courses and one Applied Learning Project. You master a subject with hands-on projects and build a deep understanding by doing the work yourself. The proof of what you learned is the project you can show: a working system that solves a real business problem.

Why it matters

Finishing the lessons shows you did the work. The projects show you can do the work. You need both.

What your portfolio should show

# A good portfolio from this program shows:
# - You finished the 4 courses.
# - You built the Applied Learning Project.
# - You can demo the project and explain how it works.

Try it yourself

Write down what you want your project to show: one sentence about the business problem it solves.

Check

Does this page give a certificate?

No. This page is a study guide. Your proof is the project you build and can show.

What matters more, finishing lessons or the project?

The project. It is what you show in an interview.

The 4-course series

9. Transform from Code Writer to AI Orchestrator

What it is

This is a 4-course series. The software engineering landscape has fundamentally shifted. Instead of only writing code, you learn to orchestrate AI agents: agents that build entire applications in minutes, manage parallel work, and solve complex problems on their own. You amplify what you can do by 1000X through strategic AI partnership.

Why it matters

Writing code line by line has a speed limit. Orchestrating agents does not. The tech lead who can direct agents gets more done than the coder who works alone.

The idea in one line of code

# Old way:  you write every line.
# New way:  you describe the job, the agent writes the code,
#           you check it, the agent fixes it.
# Your job moves up: from typing to directing.

Try it yourself

Write down one job you do now that an agent could help with, and one job only you should do.

Check

Will AI replace developers?

The course says no — it amplifies them. The developer who can direct agents does more, not less.

What does 1000X mean here?

It is the course's own phrase for a very large speedup, not a measured number.

The 4-course series

10. Study order — read this first

What it is

Study order: Python agents first, then TypeScript agents, then MCP, then Claude Code. Important: the Python and TypeScript first courses teach the same ideas in different languages. Pick one first, not both. Python first is the simplest start. TypeScript first keeps one language through MCP.

Why it matters

Doing both first courses at once doubles the work for the same ideas. Pick one, finish it, then move on.

The order, as a list

study_order = [
    "1. Python AI Agents (or TypeScript AI Agents — pick one)",
    "2. MCP with TypeScript",
    "3. Claude Code",
    "4. Prompt Engineering + Custom GPTs (on this page)",
]
for step in study_order:
    print(step)

Try it yourself

Choose your first course now: Python or TypeScript. Write it down.

Check

I already know Python. Which first course?

Python AI Agents. It is the simplest start.

I already know TypeScript. Which first course?

TypeScript AI Agents. It keeps one language through MCP.

Course 1

11. Course 1: Building AI Agents in Python

What it is

Python agents that process data, analyse documents, and run multi-step workflows alone. This is the first course in the program, and it is also a full course page in this repo: folder Building_AI_Agents_in_Python. It has 5 modules and 52 lessons, with a working agent-loop demo and an Inventory Management Agent capstone.

Why it matters

This is the foundation. Everything later — tools, GAME, MCP, Claude Code — builds on the agent loop you learn here.

Open the course page

# Open this file in the same repo:
# Workshop/Building_AI_Agents_in_Python/index.html
# 5 modules, 52 lessons, Python, no API key needed.

Try it yourself

Open the Python course page and finish its Module 1 before you continue here.

Check

How many lessons are in the Python course?

52 lessons in 5 modules.

What is the capstone in the Python course?

An Inventory Management Agent.

Course 2

12. Course 2: Building AI Agents in TypeScript

What it is

The same agent ideas as the Python course, in TypeScript and JavaScript. Folder Building_AI_Agents_in_TypeScript. It has 4 modules and 42 lessons, with a working agent-loop demo and an Inventory Management Agent capstone in TypeScript.

Why it matters

Pick this one first only if you already know TypeScript. Otherwise do the Python course first and skip this one for now.

Open the course page

# Open this file in the same repo:
# Workshop/Building_AI_Agents_in_TypeScript/index.html
# 4 modules, 42 lessons, Node.js 20+, TypeScript.

Try it yourself

If you picked TypeScript first, open its page and finish its Module 1.

Check

How is this different from the Python course?

Same ideas, different language. That is the only big difference.

Do I need both first courses?

No. Pick one first, not both.

Course 3

13. Course 3: MCP for AI Agents: Tools, Servers and Clients

What it is

Model Context Protocol (MCP) is a standard way for an agent to talk to tools on a computer — like a plug that lets the agent use files, search, and other programs safely. Folder MCP_for_AI_Agents. It has 5 modules and 34 lessons, with a real MCP server and agent, and a workspace capstone.

Why it matters

Without MCP, every tool is custom work. With MCP, one agent can use many tools the same way.

Open the course page

# Open this file in the same repo:
# Workshop/MCP_for_AI_Agents/index.html
# 5 modules, 34 lessons, official MCP SDK, stdio transport.

Try it yourself

Open the MCP course page and read its Module 1 before you continue here.

Check

What does MCP stand for?

Model Context Protocol.

What does an MCP server do?

It offers tools, resources, and prompts that an agent can use.

Course 4

14. Course 4: Software Engineering with Claude Code

What it is

Claude Code as a development partner: big prompts, Best-of-N, rubrics, CLAUDE.md, command libraries, git worktrees, subagents, token limits, and multimodal prompting. Folder Software_Engineering_with_Claude_Code. It has 6 modules and 32 lessons. Note: Claude Code itself needs a paid subscription [PAID].

Why it matters

This is where you stop typing every line and start directing a team of agents.

Open the course page

# Open this file in the same repo:
# Workshop/Software_Engineering_with_Claude_Code/index.html
# 6 modules, 32 lessons. Paid subscription needed for Claude Code.

Try it yourself

Open the Claude Code course page and read its Setup lesson.

Check

How many modules are in the Claude Code course?

6 modules, 32 lessons.

Do I need to pay for Claude Code?

Yes. Claude Code needs a paid subscription. The offline practice on its page does not.

What You'll Achieve

15. 1. Build production software at unprecedented speed

What it is

Claude Code constructs full-stack applications with databases, APIs, and user interfaces while you focus on architecture and strategy. You describe the system, it builds the parts, you check the design.

Why it matters

Speed is not about typing faster. It is about building the whole app — database, API, screens — in one go, instead of piece by piece over weeks.

A full-stack app, described in one prompt [PAID]

# Prompt for Claude Code [PAID]:
# "Build an expense-report app.
#  Database: expenses with date, amount, category, receipt.
#  API: add, list, and total expenses.
#  Screens: a form and a list with a total.
#  Add tests for the total."
# Your job: check the architecture, not the typing.

Try it yourself

Write a one-paragraph description of a full-stack app you want, naming its database, API, and screens.

Check

What is a full-stack application?

An app with a database, a server/API, and screens a user can see.

What do I focus on while Claude Code builds?

Architecture and strategy: what the app should do and how it should be checked.

What You'll Achieve

16. 2. Command AI agents that think and act independently

What it is

Python-powered agents that analyse requirements, write code, run tests, and integrate features across multiple git branches simultaneously. They do not wait for you to click each step.

Why it matters

One agent on one branch is useful. Many agents on many branches, working at the same time, is how a small team does the work of a large one.

Agents on branches, in plain code

branches = ["feature/expenses", "feature/reports", "feature/tests"]
for branch in branches:
    print("Agent working on:", branch)
print("Then: merge each branch, run tests, fix failures.")

Try it yourself

List three features of your app, one per branch, and write one sentence for each.

Check

What is a git branch?

A separate copy of your code where you can work on one feature without breaking the rest.

Who merges the branches?

You, or an agent you direct, after the tests pass.

What You'll Achieve

17. 3. Deploy custom AI assistants for real business problems

What it is

Specialized GPTs that understand company policies, process expense reports, analyse legal documents, and handle complex workflows with human-like intelligence. They are the front door: a person talks to the GPT, the GPT talks to your agents.

Why it matters

A business does not need a general chatbot. It needs an assistant that knows its own rules and its own documents.

Three business GPTs, as a list

business_gpts = [
    "Expense GPT: checks expense reports against company policy",
    "Legal GPT: reads contracts and lists risks in plain words",
    "Policy GPT: answers questions from the company handbook",
]
for g in business_gpts:
    print("-", g)

Try it yourself

Pick one business problem from your own work and write it as a GPT job in one sentence.

Check

What makes a GPT 'custom'?

Its instructions, its documents, and its rules are set for one business job.

Does a GPT replace the agent?

No. The GPT talks to the person. The agent does the work behind it.

Prompt Engineering

18. Prompt Engineering 1: Clear instructions first

What it is

Prompt engineering is writing instructions so the AI gives a precise answer. A good prompt has four parts: role (who the AI should act as), task (what to do), rules (what is allowed), and format (how the answer should look).

Why it matters

A vague prompt gives a vague answer. A prompt with a role, a task, rules, and a format gives an answer you can use.

A prompt with all four parts

PROMPT = """Role: You are an expense-report checker.
Task: Decide if this expense is approved.
Rules: Only accept amounts with a receipt. Reject over $500 without a manager note.
Format: Decision: APPROVED or REJECTED. Reason: one sentence.
Expense: Taxi $40, receipt attached.
"""
print(PROMPT)

Try it yourself

Write a prompt with role, task, rules, and format for a job you do.

Check

What are the four parts of a good prompt?

Role, task, rules, and format.

Why put the format in the prompt?

So the answer is always in the same shape.

Prompt Engineering

19. Prompt Engineering 2: Prompt patterns

What it is

A prompt pattern is a reusable shape for a prompt. Common patterns: Role pattern (act as an expert), Few-shot pattern (show examples), Step-by-step pattern (think step by step), and Constraint pattern (list what is not allowed).

Why it matters

Patterns save time. You do not invent a new prompt each time — you pick a pattern and fill in the details.

Three patterns, as Python templates

role_prompt = "Act as a {role}. {task}"
few_shot = "Example 1: {ex1}\nExample 2: {ex2}\nNow do: {task}"
step_prompt = "Think step by step, then give the final answer. Task: {task}"

print(role_prompt.format(role="auditor", task="Check this report."))
print(step_prompt.format(task="Add up these expenses."))

Try it yourself

Take one of your prompts and rewrite it using the few-shot pattern, with two examples.

Check

What is a few-shot prompt?

A prompt that shows the AI two or three examples before asking it to do the job.

When do I use step-by-step?

When the job has more than one step, like adding numbers or checking rules in order.

Prompt Engineering

20. Prompt Engineering 3: Few-shot examples that teach

What it is

Few-shot means showing examples. Two or three good examples teach the AI the format and the standard better than a long description. Pick examples that cover the normal case and one edge case.

Why it matters

Examples are clearer than rules alone. A rule says 'be careful'. An example shows what careful looks like.

A few-shot expense checker

examples = [
    ("Taxi $40, receipt attached", "APPROVED"),
    ("Hotel $600, no manager note", "REJECTED"),
    ("Meal $25, receipt attached", "APPROVED"),
]
for expense, decision in examples:
    print(expense, "->", decision)
print("Now decide: Flight $300, receipt attached")

Try it yourself

Add a fourth example to the list: an edge case from your own work.

Check

How many examples do I need?

Two or three is usually enough. One normal case and one edge case.

What makes a good example?

It shows the exact format you want, with a real-looking input.

Prompt Engineering

21. Prompt Engineering 4: Precise reasoning, step by step

What it is

For precise reasoning, ask the AI to show its steps: read the document, list the facts, apply the rules in order, then give the answer. This is called chain-of-thought. It makes mistakes easier to find.

Why it matters

A final answer with no steps cannot be checked. Steps can be checked, one by one.

A reasoning template

def reason(expense):
    steps = [
        "Step 1: Read the amount and the receipt.",
        "Step 2: Check the amount against the $500 limit.",
        "Step 3: Check for a manager note if over $500.",
        "Step 4: Give the decision.",
    ]
    for s in steps:
        print(s)
    print("Decision: APPROVED" if "receipt" in expense else "Decision: REJECTED")

reason("Taxi $40, receipt attached")

Try it yourself

Run the code, then write the four steps for a legal document check.

Check

What is chain-of-thought?

Asking the AI to show its reasoning steps before the final answer.

Why show the steps?

So you can find where a mistake happened.

Prompt Engineering

22. Prompt Engineering 5: Constraints and rubrics

What it is

Constraints are limits: what the AI must not do. A rubric is a scorecard: what 'good' means, with points for each part. Together they stop the AI from guessing and give you a way to check its work.

Why it matters

Without a rubric, 'good' is a feeling. With a rubric, 'good' is a score you can compare.

A rubric in Python

rubric = {
    "Correct decision": 40,
    "Reason mentions the rule": 30,
    "Format is exact": 30,
}
print("Total points:", sum(rubric.values()))
for item, points in rubric.items():
    print(f"- {item}: {points} points")

Try it yourself

Write a 3-item rubric for a job you care about, with points that add to 100.

Check

What is a rubric?

A scorecard that says what 'good' means, with points for each part.

What is a constraint?

A limit on what the AI may do, for example 'never invent a number'.

Prompt Engineering

23. Prompt Engineering 6: Retrieval — answer from your documents

What it is

Retrieval-Augmented Generation (RAG) means the AI reads your documents first, then answers from them. You search for the right pages, put them in the prompt, and ask the AI to answer only from those pages.

Why it matters

Without retrieval, the AI guesses from memory. With retrieval, it quotes your own documents.

Retrieval in plain Python (offline, keyword search)

documents = [
    "Policy: Travel over $500 needs a manager note.",
    "Policy: Meals are limited to $50 per day.",
]
def retrieve(question):
    words = question.lower().split()
    return [d for d in documents if any(w in d.lower() for w in words)]

print(retrieve("Do I need a manager note for $600 travel?"))

Try it yourself

Add a third policy document to the list and search for it.

Check

What does RAG stand for?

Retrieval-Augmented Generation.

Why retrieve before answering?

So the answer comes from your documents, not from a guess.

Custom GPTs

24. Custom GPTs 1: What a custom GPT is

What it is

A custom GPT is a ChatGPT set up for one business job. You give it instructions, documents, and rules. Then anyone can talk to it in plain words, and it answers like an expert in that job. [CHATGPT — needs a ChatGPT account.]

Why it matters

A general chatbot knows a little about everything. A custom GPT knows a lot about one job — your job.

A custom GPT, described in one block

# Custom GPT: Expense Checker
# Instructions: Check expenses against company policy.
# Knowledge: company expense policy document.
# Rules: Never approve over $500 without a manager note.
#         Always give Decision + Reason in the same format.

Try it yourself

Write the same four lines (instructions, knowledge, rules, format) for a GPT for your own job.

Check

Do I need to write code to make a custom GPT?

No. You write instructions and upload documents in ChatGPT.

What does a custom GPT need from me?

Instructions, documents, and rules. That is the whole setup.

Custom GPTs

25. Custom GPTs 2: Writing the instructions

What it is

Instructions are the GPT's job description. Write them in plain words: who it is, what it does, what it must check, what it must never do, and how it must answer. Keep them short — one page is enough.

Why it matters

Instructions are the difference between a helpful assistant and a confused one. Short, clear instructions beat long, vague ones.

Instructions for an Expense GPT (copy and use)

EXPENSE_GPT_INSTRUCTIONS = """You are the Expense Checker for our company.
Your job: decide if an expense is approved.
Check: 1) Is there a receipt? 2) Is the amount within the limit?
3) If over $500, is there a manager note?
Never invent a receipt. Never approve without one.
Answer always as: Decision: ... Reason: ...
"""
print(EXPENSE_GPT_INSTRUCTIONS)

Try it yourself

Write instructions for a Legal GPT: what it reads, what it lists, and what it must never do.

Check

How long should instructions be?

One page is enough. Short and clear beats long and vague.

What must instructions always include?

What to check, what never to do, and how to answer.

Custom GPTs

26. Custom GPTs 3: Knowledge — give it your documents

What it is

Knowledge is the documents you upload: the expense policy, the handbook, a contract template. The GPT reads them when it answers, so its answers match your company, not a general guess.

Why it matters

A GPT without your documents can only guess your rules. A GPT with your documents can quote them.

What to upload, as a list

knowledge = [
    "expense-policy.pdf — the rules for expenses",
    "handbook.pdf — company policies",
    "contract-template.docx — how contracts look",
]
for doc in knowledge:
    print("Upload:", doc)

Try it yourself

List three documents from your own work that a GPT should read.

Check

What documents should I upload?

The rules the GPT must follow: policies, handbooks, templates.

Should I upload private data?

Only what the GPT is allowed to see. Never upload secrets or other people's private data.

Custom GPTs

27. Custom GPTs 4: Actions — let the GPT use tools

What it is

Actions let a GPT call a tool: look up an expense, check a balance, or save a report. An action is a small, named job with clear inputs and outputs, like the tools in the MCP course.

Why it matters

Talking is not enough. A GPT that can also act — look things up and save results — is useful at work.

An action, described in plain words

# Action: check_expense
# Input: expense amount, receipt (yes/no), manager note (yes/no)
# Output: Decision: APPROVED or REJECTED, Reason: one sentence
# Rule: The GPT may call this action, but it may not change the rules.

Try it yourself

Write an action for your GPT: name it, list its inputs, and list its output.

Check

What is an action in a GPT?

A tool the GPT can call, with clear inputs and outputs.

Can a GPT change company rules?

No. The GPT follows the rules. It does not change them.

Custom GPTs

28. Custom GPTs 5: Guardrails and testing

What it is

Guardrails are safety rules: what the GPT must never do, what it must always check, and when it must ask a human. Test the GPT with ten real questions before you let anyone else use it, including two tricky ones.

Why it matters

A GPT that is never tested will fail in front of a customer. A GPT tested with tricky questions fails in private, where you can fix it.

A 10-question test list, in Python

test_questions = [
    "Taxi $40, receipt attached — approved?",
    "Hotel $600, no manager note — approved?",
    "Meal $25, receipt attached — approved?",
]
print("Test with", len(test_questions), "questions first.")
print("Add 7 more, including 2 tricky ones, before launch.")

Try it yourself

Write 3 test questions for your GPT, including 1 tricky one.

Check

What is a guardrail?

A safety rule: what the GPT must never do, and when it must ask a human.

How many test questions before launch?

At least ten, including two tricky ones.

Applied Learning Project

29. Project Step 1: Prototype the app with Claude Code [PAID]

What it is

Start with Claude Code: rapidly prototype the expense-report app. Describe the app in one paragraph — form, list, total — and let Claude Code build the first version in minutes. Then check it and ask for fixes.

Why it matters

A prototype you can see and click beats a plan on paper. It shows what works and what is missing, fast.

The prototype prompt [PAID]

# Prompt for Claude Code [PAID]:
# "Build an expense-report app.
#  Form: date, amount, category, receipt.
#  List: all expenses with a total.
#  Test: the total must be correct."
# Then: "Run the tests and fix any failures."

Try it yourself

Write your prototype prompt for an app you want, in one paragraph.

Check

Why prototype first?

So you can see the app early and fix the design before you build the rest.

What do I check in the prototype?

That the form works, the list shows, and the total is correct.

Applied Learning Project

30. Project Step 2: A Python agent that reads documents

What it is

Now add a Python agent that reads documents on its own: it takes an expense report, finds the amount and the receipt, and decides if it passes the rules. It uses the fake model offline, so no API key is needed.

Why it matters

The app can show expenses. The agent can read and check them. That is the step from a website to a working system.

Document-reading agent (runnable, offline)

def fake_llm(prompt):
    if "receipt" in prompt.lower() and "$" in prompt:
        return "DECISION: APPROVED"
    return "DECISION: REJECTED"

def check_expense(text):
    result = fake_llm("Check expense: " + text)
    print(text, "->", result)
    return result

check_expense("Taxi $40, receipt attached")
check_expense("Hotel $600, no receipt")

Try it yourself

Run the code, then add a third expense of your own and check it.

Check

What does the agent read?

The expense text: amount, category, and whether a receipt is attached.

Why use a fake model here?

So you can learn and test without an API key. Swap it for a real model later.

Applied Learning Project

31. Project Step 3: Process expense reports end to end

What it is

Put it together: the agent takes a list of expenses, checks each one, adds up the approved total, and writes a short report. Each expense gets a decision and a reason.

Why it matters

One expense checked is a demo. A whole report checked, with a total, is a system.

Process a whole report (runnable, offline)

expenses = [
    {"item": "Taxi", "amount": 40, "receipt": True},
    {"item": "Hotel", "amount": 600, "receipt": False},
    {"item": "Meal", "amount": 25, "receipt": True},
]

def decide(e):
    if not e["receipt"]:
        return "REJECTED", "no receipt"
    if e["amount"] > 500:
        return "REJECTED", "over $500, needs manager note"
    return "APPROVED", "receipt ok"

total = 0
for e in expenses:
    decision, reason = decide(e)
    print(e["item"], e["amount"], "->", decision, "-", reason)
    if decision == "APPROVED":
        total += e["amount"]
print("Approved total: $", total)

Try it yourself

Add a fourth expense to the list and run it again. Check the total by hand.

Check

What is the approved total in the example?

$65 — Taxi $40 plus Meal $25. The hotel is rejected.

Why check each expense separately?

So one bad expense does not block the whole report.

Applied Learning Project

32. Project Step 4: Prompt templates for precise reasoning

What it is

Add prompt templates so the agent reasons precisely: for each expense, it lists the facts, applies the rules in order, and then gives the decision. The same templates work for legal documents and company policies — only the rules change.

Why it matters

Templates make reasoning repeatable. The same shape, different rules, for every domain.

A reusable prompt template (runnable)

TEMPLATE = """Facts: {facts}
Rules: {rules}
Steps: 1) List the facts. 2) Apply each rule in order. 3) Give the decision.
Decision: """

print(TEMPLATE.format(
    facts="Taxi $40, receipt attached",
    rules="Receipt required. Over $500 needs a manager note."))

Try it yourself

Write a template for a legal document check, using the same three steps.

Check

Why use a template instead of a new prompt each time?

So every decision follows the same steps and can be checked.

What changes between domains?

The rules. The shape of the reasoning stays the same.

Applied Learning Project

33. Project Step 5: A custom GPT as the front door [CHATGPT]

What it is

Finally, deploy a custom GPT as the interface for end users. A person talks to the GPT in plain words. The GPT uses your instructions, your documents, and your agent to check the expense and answer. [CHATGPT — needs a ChatGPT account.]

Why it matters

People do not want to learn your system. They want to ask a question and get an answer. The GPT is that front door.

The GPT setup, in plain words

# Custom GPT: Business Automation Assistant
# Instructions: Help staff with expenses, policies, and documents.
# Knowledge: expense policy, handbook.
# Actions: check an expense, look up a policy.
# Guardrail: never approve without a receipt. Ask a human if unsure.

Try it yourself

Write the setup for your GPT in the same four lines: instructions, knowledge, actions, guardrail.

Check

Who talks to the GPT?

End users — staff who ask questions in plain words.

Who does the work behind the GPT?

Your Python agent, using your prompts and rules.

Applied Learning Project

34. Project Step 6: Tests and evaluation

What it is

Test the whole system before you show it to anyone: run the expense tests, check the decisions against the rules, and write down the score. If a test fails, fix the rule or the prompt — that is the ratchet rule from the Harness course.

Why it matters

A system without tests is a guess. A system with tests is a system you can trust.

A test suite (runnable, offline)

tests = [
    ({"item": "Taxi", "amount": 40, "receipt": True}, "APPROVED"),
    ({"item": "Hotel", "amount": 600, "receipt": False}, "REJECTED"),
    ({"item": "Meal", "amount": 25, "receipt": True}, "APPROVED"),
]

def decide(e):
    if not e["receipt"]:
        return "REJECTED"
    if e["amount"] > 500:
        return "REJECTED"
    return "APPROVED"

passed = 0
for expense, expected in tests:
    got = decide(expense)
    ok = got == expected
    passed += ok
    print(expense["item"], "->", got, "OK" if ok else "FAIL")
print(f"{passed}/{len(tests)} tests passed")

Try it yourself

Add a fourth test — an expense over $500 with a receipt — and decide what the answer should be.

Check

How many tests should I have?

At least the three above, plus one for each rule you add.

What do I do when a test fails?

Fix the rule or the prompt, then run the tests again. Do not change the test to match a wrong answer.

Finish

35. Final checklist

What it is

Tick each item when it is done. When all are ticked, you have finished the program project.

Why it matters

A checklist turns a big project into small, finishable steps.

The checklist, as a list

checklist = [
    "Picked Python or TypeScript first, finished its Module 1",
    "Finished the MCP course",
    "Finished the Claude Code course",
    "Wrote prompt templates for expenses, legal, and policy",
    "Built a custom GPT with instructions, knowledge, and guardrails",
    "Built the Applied Learning Project end to end",
    "Ran the tests — all passed",
    "Showed the project to one other person and fixed what they found",
]
for item in checklist:
    print("[ ]", item)

Try it yourself

Tick the first item you have already done.

Check

What counts as finished?

All 8 items ticked, with tests passing.

What if I get stuck?

Go back one lesson. The answer is usually in the previous step.

Finish

36. What to do next

What it is

Next in the repo: Prompt Engineering in depth, then Trustworthy AI, then the Financial agent workshop. Each one builds on this program: better prompts, safer agents, and a real financial system.

Why it matters

Learning stops when you stop. The next course is already in the same repo, in the same folder style.

The next steps, as a list

next_steps = [
    "Prompt Engineering in depth",
    "Trustworthy AI",
    "Financial agent workshop",
]
for step in next_steps:
    print("Next:", step)

Try it yourself

Pick your next course and open its folder.

Check

Which course is next?

Prompt Engineering in depth, then Trustworthy AI.

Where are the next courses?

In the same Workshop folder in the repo.

Try the business automation system here

Type a request, for example: process this expense report for $250 travel

Type a request above and press Run.

Python AI Agents course · TypeScript AI Agents course · MCP with TypeScript course · Claude Code course