Skip to content

Module 5: Activities

Carlos Lizarraga-Celaya edited this page Oct 22, 2026 · 15 revisions

Responsible Agentic AI: Production Deployment, Evaluation, and Responsible AI

a. Self-Check Prompts (~30 minutes)

Before moving on, answer the three prompts in a notes document or on a piece of paper. These won't be submitted or graded, they're meant to help you recall what you've learned. If you're unsure how to answer, revisit the relevant reading before continuing.

Prompt 1 - Where a Human Has to Approve

Pick an agent you have built or proposed in this course and find its riskiest action — the one that would be hardest to undo. Would you let it run unattended? If not, what does the reviewer need to see in order to approve it responsibly? ("The agent's final answer" is usually not enough.)

Prompt 2 - What the Trace Tells You That the Output Doesn't

Your agent returns a correct answer, but it takes 40 seconds and costs four times what you expected. The final output alone cannot tell you why. Name three specific things you would look for in the trace, and what each one would point to as the cause.

Prompt 3 - Why One Metric Isn't Enough

Describe a change to an agent that would improve one evaluation dimension while making another worse. Use two of the six dimensions (task accuracy, safety, resource efficiency, robustness, fairness, observability) and be concrete about the change. Then say which dimension you would protect with an automated test, and which one you would not trust a test to judge.

Prompt 4 — What Could Go Wrong in Production

Pick an agent you built in this course. Name two kinds of hidden technical debt it would accumulate in production (entanglement, unstable data dependencies, feedback loops, configuration debt, or undeclared consumers) and one infrastructure layer you would need before real users could rely on it.

Prompt 5 — Attack Surface

Using the agent from Prompt 4, name the two OWASP risks (LLM or Agentic) you think matter most, and describe one mitigation for each that does not depend on the model "behaving well."

b. Guided Lab Exercise — LangSmith Observability (~60 minutes)

PLATFORM SETUP — READ BEFORE STARTING
All lab work runs in Google Colab (free tier). You do not need a paid subscription. You will need: (1) a Google account to access Colab; (2) a free LangSmith account at smith.langchain.com for observability tracing; (3) an Nvidia, Groq, or OpenAI API key for the LLM provider, or a locally hosted Ollama model as a free alternative — setup instructions are included in the notebook.

In this lab, you will instrument a research agent with LangSmith tracing, execute it on 10 complex research prompts using real web search tools (DuckDuckGo + webpage reading), and explore what the resulting traces reveal about how your agent actually behaves.

Open the lab notebook: Module5_Learner_Starter.ipynb

Notebook Flow Summary

The notebook walks you through a complete observability instrumentation sequence:

  1. Build a research agent with two real tools (web search and webpage reading) using LangGraph.
  2. Configure LangSmith tracing and verify traces appear in your dashboard.
  3. Execute the agent on 10 diverse research prompts with structured metadata tags for filtering.
  4. Compute observability metrics (latency distribution, token consumption, error rate) from trace data.
  5. Interpret what the metrics and traces reveal about how your agent behaves.

All detailed instructions, code scaffolding, and reflection questions are embedded directly in the notebook.

WHAT TO SUBMIT
Add to github: Submit the .ipynb file with Lab A complete — all cells executed with output visible, and all 10 traces confirmed in LangSmith. Filename: Module5_Lab_[YourName].ipynb.

c. Hands-On Project: Comparative Observability Study (~2 hours)

In this project, you will continue in the same notebook from the guided lab to design and execute a controlled experiment comparing 2–3 agent configurations on the same research tasks, then write a Comparative Observability Report with a deployment recommendation.

Notebook Flow Summary

  1. Hypothesis and conditions. Pick one variable to test (for example, system prompt detail, model choice, or tool availability) and keep everything else constant.
  2. Run each configuration on the same 10 research prompts. Collect traces and metrics for each condition.
  3. Compute comparative metrics across conditions, covering at least three of the six evaluation dimensions:
    • Resource efficiency: average latency, p90 latency, tokens per task.
    • Task accuracy / output quality: a 1–5 LLM-as-judge score using a written rubric (you will validate the judge by hand-scoring at least 3 outputs and noting any disagreement).
    • Robustness or safety: one additional measure of your choice, for example the success rate on 2 deliberately difficult or adversarial prompts you add to the set, or whether the agent follows an instruction planted in a test webpage.
  4. Write the Comparative Observability Report with a trade-off analysis specifying which configuration to deploy under which conditions.
WHAT TO SUBMIT
Add to GitHub: Submit the completed .ipynb file (Lab + Project) with all cells executed and output visible. The Comparative Observability Report must include: hypothesis, results table, analysis (minimum 200 words), a note on what your automated metrics could not judge, and a deployment recommendation with a trade-off matrix. Filename: Module5_Project_[YourName].ipynb.

d. Peer Discussion: Capstone — Responsible Deployment Plan

You have been carrying one agent system through the discussion posts since Module 2. In this final post, revise that design with what you now know and add a plan for deploying it responsibly.

Part A: Discussion Post (~60 minutes)

Post to the Module 5 Discussion Forum addressing all five sections.

Section 1 — Revised Design (LO 1)

Restate your agent system in a few sentences: what it does, who uses it, what it produces. Then name two things you would change about your earlier design, and what you learned that changed your mind: your Module 3 or 4 results, the framework trade-offs from Module 4 (Chapter 3), or what the lab traces showed you. If nothing changed, defend your design against one alternative you rejected. Name two forms of technical debt your system would be prone to, and one infrastructure layer you would need.

Section 2 — Security (LO 4)

Name the three OWASP risks (from the LLM or Agentic lists) that matter most for your system, with one sentence on why each applies. For each, give a layered mitigation: at least one control outside the model (permissions, validation, sandboxing, an approval gate) in addition to anything prompt-based.

Section 3 — Risk and Governance (LO 5)

  • Which EU AI Act tier does your system fall in? Justify it in two sentences, citing the criterion. Remember the tier depends on what your agent's output affects, not how it is built.
  • Name your three biggest risks, using the NIST RMF functions (Govern, Map, Measure, Manage) as a checklist. For each: who is affected, how bad it would be, and one specific mitigation. "Add monitoring" is too vague to count.
  • Name which governance artifacts you would produce first (model card, system card, risk register, incident response plan), and one item that each would have to record.

Section 4 — Oversight, Evaluation, and Monitoring (LO 2, 3, 5)

  • Where a human approves. List the actions your agent takes that are hard to undo. Which need sign-off, and which would you automate? For the gated ones, what does the reviewer need to see to approve responsibly?
  • How you would build it. Name the mechanism (a framework's built-in pause/approval feature, or a custom gate) and whether your framework makes this easy. If you have not used one, say what you would check in its documentation.
  • What gets tested automatically. Which evaluation dimensions would you gate on before a change ships, and what result blocks a deploy? Note anything a test cannot judge for you.
  • What you would monitor. Name two signals from Chapter 3's list that you would alert on, and what each would tell you.

Section 5 — Open Questions about Deployment (LO 1)

Deployment is its own discipline, and this module only opened the door to it. Give us two or three questions you would still need answered, with where you would go to find each answer. Aim for questions whose answers would change your design, not ones a tutorial would settle. Two examples: "Would my organization allow prompt content to leave its network, or do I need self-hosted observability?" and "How often does my source data change, and who is responsible for re-indexing it when it does?"

Part B: Peer Response

Reply to at least one classmate's post with something they could use. Things worth thinking about as you read:

  • Their risk tier. Would you have classified it the same way? If your deployment context differs from theirs, say how that changes your read.
  • Their oversight decisions. Where they chose to automate or gate an action, does that match your instinct? If you'd draw the line elsewhere, explain what you'd be worried about.
  • Their gates and tests. Do the tests they described connect to the risks they named? If a risk seems hard to test for, that's worth naming — you may not have a solution, and that's fine.
  • Their open questions. If you know something about one of them, or have faced it yourself, share what you learned.
  • Their security choices. Would the controls they named still protect them if the model were fooled? If not, say what you would add.

A useful reply gives them something specific to think about. "Great post, I agree" doesn't.

WHAT TO SUBMIT
Discussion Initial Post: submitted in the LMS Discussion thread. Addresses all five sections
Peer Reply: substantive engagement (≥100 words) with at least one classmate's system design, security analysis, governance analysis, or oversight plan.

Created: 05/15/2026 (C. Lizárraga)
Updated: 10/21/2026 (M. Yung)

Clone this wiki locally