Skip to content

Add Lab D: observe, evaluate, and secure your agents - #234

Merged
ivorb merged 4 commits into
mainfrom
ivorb-lab-d-observe-evaluate-secure
Aug 18, 2026
Merged

Add Lab D: observe, evaluate, and secure your agents#234
ivorb merged 4 commits into
mainfrom
ivorb-lab-d-observe-evaluate-secure

Conversation

@ivorb

@ivorb ivorb commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Adds Lab D — Observe, evaluate, and secure your agents, closing the biggest gap in the catalogue: there is currently no observability, evaluation or security-testing content anywhere in the repo.

Tasks

Task Level Time
Core Trace your agent — instrument with OpenTelemetry and read traces in Foundry Monitor L300 ~25 min
Core Evaluate answer quality — score a grounded agent against ground truth with the built-in evaluators L300 ~35 min
Optional Red team your agent — attack strategies and custom seed prompts via azure-ai-evaluation[redteam] L400 ~35 min

Plus a Getting started page. Core path is 60 minutes.

What's included

  • 5 instruction pages following the A/B/C structure, with the task table generated by tools/generate_lab_blocks.py
  • 14 starter files with fill-in-the-blank placeholders, and 15 completed solution files
  • A 10-row ground-truth JSONL for evaluation, and custom attack objectives for red teaming
  • setup/check_env.py and setup/bootstrap_agent.py, so each task can be started on its own
  • Lab B's knowledge documents copied in, so Lab D stands alone
  • One entry in Labfiles/_shared/manifest.yml; the four infra files are generated by sync.py

Not validated end to end

Nothing in this lab has been run. No trace was exported, no evaluation scored, no scan executed — there was no Azure subscription available while writing it.

What was checked: every API call against the shipped SDK source and current Learn docs, Tier 0, sync.py --check, and the Tier 1 contract (imports resolve against azure-ai-projects==2.3.0 and azure-ai-evaluation==1.18.3, pip check clean).

It needs a walkthrough against a real subscription before it can be considered tested. The frontmatter carries status: 'draft' accordingly.

Choices worth a reviewer's eye

  1. Application Insights is connected in the portal, not provisioned in Bicep. Adding it to the shared template would have given Labs A, B and C a resource they never use. D0 has the learner connect it via Agents > Traces > Connect, which is where they then read traces.
  2. Task 3 attacks through a callback into the deployed agent, not a model config, so it exercises the same grounded agent that Task 2 evaluated.
  3. agent_target.py is provided complete, so Task 2 is about evaluation rather than re-teaching agent calls the earlier labs already cover.

Region and preview constraints for the Red Teaming Agent are surfaced at project-creation time in D0 and repeated in D3.

No CI/CD content: that was cut deliberately as the wrong persona for a developer learning path.

@ivorb
ivorb marked this pull request as draft August 14, 2026 19:31
@ivorb
ivorb deleted the branch main August 17, 2026 14:45
@ivorb ivorb closed this Aug 17, 2026
@ivorb ivorb reopened this Aug 17, 2026
@ivorb
ivorb changed the base branch from shared-lab-infra to main August 17, 2026 14:46
@ivorb
ivorb force-pushed the ivorb-lab-d-observe-evaluate-secure branch from 85478fb to ed46b2a Compare August 17, 2026 15:14
@ivorb
ivorb marked this pull request as ready for review August 17, 2026 18:32
ivorb and others added 3 commits August 18, 2026 11:20
Closes the observability gap in the consolidated catalogue: there was no
tracing, evaluation or safety-testing content anywhere in the repo.

Instructions/Consolidated/
  D  landing page (generated task table from frontmatter)
  D0 getting started - project, Application Insights connection, agent to measure
  D1 trace your agent (core, L300) - OpenTelemetry + Azure Monitor, custom spans
  D2 evaluate answer quality (core, L300) - groundedness, relevance, similarity
  D3 red team your agent (optional, L400) - attack strategies + custom seed prompts

Labfiles/D-observe-evaluate-and-secure-agents/
  Python/ starter files with fill-in-the-blank placeholders, Solution/Python/
  reference code, a ground-truth JSONL dataset, custom attack objectives, and
  setup/check_env.py + setup/bootstrap_agent.py so the lab stands alone without
  Lab B. azd template, Bicep and write_env scripts are generated from
  Labfiles/_shared/ via manifest.yml.

Verified: Tier 0 checks (frontmatter, code blocks, links, line endings),
Labfiles/_shared/sync.py --check, and the Tier 1 SDK contract check against
azure-ai-projects 2.3.0 and azure-ai-evaluation 1.18.3. Not run end to end
against a live Foundry project.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The landing page called {% include lab-tasks-table.html lab='D' %}, written
when that include existed on the PoC branch. It never reached main: lab pages
are read directly by platforms that don't render Liquid, so A, B and C now
carry a real markdown table written by tools/generate_lab_blocks.py between
HTML comment markers. Lab D now follows the same pattern.

Also drops the core duration from the intro prose, which restated a number
the generated block already gives. A, B and C had the same line removed for
the same reason - one source for the timings, not two.

Verified against main's tooling: all Tier 0 checks pass, --check is clean,
and sync.py reports 4 labs in sync with no files updated, confirming the
generated infrastructure matches the canonical source byte for byte.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
Lab D stated a 3.10-3.13 range because the [redteam] extra pulls PyRIT,
which has no 3.14 build. That is true, but 3.13 already sits inside the
supported range, so the extra precision only made this lab read differently
from the others.

Now matches A, B and C. The 'tested with 3.13.12' sentence is left off,
since nothing in this lab has been run yet.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
@ivorb
ivorb force-pushed the ivorb-lab-d-observe-evaluate-secure branch from ed46b2a to 7a60d62 Compare August 18, 2026 15:20
Both pages sat flush against the window edge with no site chrome. The layout
inherited the theme's 'default' layout, which is only a <head> and
{{ content }} - no <body>, no nav bar, no footer, and none of the Bootstrap
.container that gives every other page its margins.

Inheriting 'home' instead picks all of that up, so these pages now sit in the
same column as the rest of the site and gain the header and footer.

Also adds vertical padding to the grid and a little more breathing room
around the nav rail, and keeps the sticky rail clear of the top edge. The
bottom padding clears the theme's fixed footer.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
@ivorb
ivorb merged commit 8289641 into main Aug 18, 2026
15 checks passed
@ivorb
ivorb deleted the ivorb-lab-d-observe-evaluate-secure branch August 18, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant