docs(examples): bank-manager agent-control demo (AIEWF) + talks slideshow - #262
Conversation
…lideshow Introduces the bank_manager_agent_control example — the AIEWF live demo that takes one banking agent through three beats (baseline -> defensive prompting -> principled ACS control plane) and uses ASSERT to measure the difference and ACS to enforce it. - Customer-facing README with the 3-beat walkthrough + mechanics (internals like calibration/FRP stats kept out). - runtime/ engine (LangGraph agent, MCP servers, typed-feature policy) + policy knowledge corpus with an index README (VIP / high-net-worth enhanced-protection). - acs/ policy-as-code (Rego) + manifest; kb_ui/ retrieval-grounding UI; ci/ pointer to the standalone responsibleai/assert-ci-banking-demo gate repo. - Foundry IQ KB provisioner (scripts/setup_foundry_kb.py) reading runtime/knowledge. - 77 unit tests (feature policy, generalization, retrieval tuning, text invariance). - talks/aiewf-18min/: self-contained follow-along HTML slideshow + charts. Result artifacts are intentionally NOT committed (regenerate via assert-ai run; they write to the gitignored artifacts/results/). ACS installs via assert-ai[acs] with a vendored wheel offline fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Trim the demo to only what the 3 beats + talk use: - eval_variants/ (17 archived experiment yamls) — not part of the demo - ci/sample-pages/ + assert-ci.yml + ci_gate.py + pareto_baseline.json — mock CI scaffolding; the talk used the REAL action-run summaries from the standalone responsibleai/assert-ci-banking-demo, which ci/README.md now points to. - scripts/retrieval_eval.py, scripts/pareto_frontier.py — unused. 77/77 unit tests still pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Strip the example to exactly what the 3-beat talk needs (baseline -> defensive prompting -> principled ACS control plane), removing an entire earlier a/c/e generation left in the tree: - Delete zombie files: runtime/mcp_server.py (old bank server), acs/manifest.yaml + acs/policy/bank_manager.rego (old text policy), acs/manifest_text_realistic.yaml (unused text-gate arm), docs/GATES.md (internal experiment methodology that referenced deleted arms). - agent.py: remove the old callables (chat_unguarded / chat_unguarded_prompted / chat_guarded_acs) and unused realistic variants (text-gate, feature+LLM), plus their helpers and constants. Now exposes exactly the 3 beat callables + the live-compare console entry points (709 -> ~420 lines). - docs/README.md: reconcile 'What's here' + ACS-integration sections to the realistic servers / manifest_feature.yaml / bank_manager_feature.rego. - scripts/smoke_test.py: fix stale post-reorg paths (corpus at runtime/knowledge, acs/ under the example root) and the callable-presence check. - scripts/setup_foundry_kb.py: fix CodeQL clear-text-logging finding — read secrets via accessors instead of storing them in the printed _cfg() dict. Verified: 77/77 unit tests pass; offline smoke test 10/10; agent.py imports with all three beat callables present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…bank demo Follow-up to the demo minimization: remove artifacts that shouldn't ship and fix a target-import bug that broke clean-clone runs. - Delete vendor/acs/ (agent-control-specification wheel + sdist + README). The �cs extra already declares agent-control-specification + acs-generator, both published on PyPI, so pip install assert-ai[acs] is the single supported install path; the bundled 2.7 MB Linux-only manylinux wheel was redundant. - Fix agent.py: it called �uto_trace(), but assert_ai ships �uto_trace as a module whose entry point is �uto_trace.enable(). The old call raised TypeError: 'module' object is not callable at import on a clean clone, breaking every eval run. enable() installs the OpenInference instrumentors (verified: LangChain + OpenAI active) and only exports when a Phoenix collector is reachable. - Remove dead runtime/llm_classifier.py + its test (the callable that used it was dropped in the minimization; only its own test referenced it), and reword the acs_shim.py failsafe comment that pointed at the deleted test. - docs/README.md: drop the vendor/acs offline-fallback section and bullet. Validated end to end on the unguarded beat: 6/6 inference + 6/6 judge with zero errors, KB retrievals grounded, OpenInference spans captured in Phoenix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
Adds examples/bank_manager_agent_control/behaviors/: 4 failure modes, each in its own suite, with 3 arms (baseline/prompted/acs) sharing that suite's generated test set for apples-to-apples comparison. Adds a behaviors/README explaining the 1 behavior = 1 suite best practice, run order, and how to compare with the viewer and companion `assert-ai results matrix` command. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
Removes examples/bank_manager_agent_control/behaviors/ (12 one-behavior-per-
yaml configs + README). The published AIEWF talk ships the combined 4-behavior
spec (eval_realistic_{unguarded,prompted,acs_feature}.yaml on suite
bank-manager-feature-rep), which is the shape presented and the result the
slideshow shows. The per-behavior split is handed off separately for science
review and is intentionally kept out of the public talk PR.
Also make the slideshow fail loud: if a chart image can't load, show a hint to
open index.html directly or serve from the aiewf-18min/ folder, and document
the same in talks/README.md.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
Replace real subscription id, resource names (Azure OpenAI / AI Search / Foundry project), resource group, region hints and a personal name with generic placeholders in .env.example, and drop the same resource names from comments in agent.py, runtime/aad_auth.py and scripts/setup_foundry_kb.py. Keeps this customer-facing example free of internal infrastructure detail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
…go slide - Title slide: �val + control -> optimize (drop the min_control formula line) - Loop slide: redraw as outer lifecycle ring (Spec/Build/Test/CI/CD/Monitor) around the Control-with-ACS <-> Eval-with-ASSERT core, straight arrows, solid inner boxes; retitle 'The inner loop to power the outer loop' - Pareto slide: move the 'better' cue to the top-left, drop the frontier L-bracket, relabel the null arm 'Defensive prompt (no gain, p = .31)' and the subtitle 'manual prompt tuning didn't help here' - Remove the policy-as-code / Rego generalization slide + its asset Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
Document the demo's deliberate fail-open choices (post-tool-call scrubber, OPA-error handling, format-narrow SSN regex) and what to switch to fail-closed for a real deployment. Highest-severity money-moving actions are already gated pre-tool-call and fail closed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
Maintainer review — do the ACS mitigations make sense?Liam / Mike (additional reviewers) — I traced the full mitigation chain (rego policy → manifest → What holds up ✅
Hardening notes (fine for a demo; documented in the new README section)
Net: coherent design, highest-severity actions fail-closed. Not blocking — the fail-open choices are deliberate demo trade-offs and now called out in the README so customers don't ship them verbatim. |
Replace the old 'min_control failure(YOUR agent)' formula with the current tagline 'evaluate and optimize your AI agents' in talks/README.md and the bank-manager example README, and correct the deck length to 7 slides (the policy-as-code slide was removed). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
…d file Downloading index.html on its own (without the sibling assets/ folder) broke the relative image paths. Embed loop_diagram.png and pareto.png as base64 data URIs so the deck renders anywhere — double-click, file://, or served from any dir. Drops the now-unnecessary onerror fallback + chartFail helper and corrects talks/README to describe the deck as a single self-contained file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d429caee-f2da-4fb0-8b2c-d0eff7cf40a3
The AIEWF 2026 deck now ships as a single-file PDF rendered from the same 7 slides, instead of a self-contained interactive HTML slideshow. Drops the keyboard/click-nav docs from talks/README.md since PDF viewers handle their own navigation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I did some AI review and it suggested some issues: • ACS lets sensitive transaction history through because risk_tier is omitted and defaults to standard ( bank_core.py:201 , bank_manager_feature.rego:56 ). Feel free to ignore if you think its not necessary |
… examples extra read_transaction_history built its return dict from scratch and never included risk_tier, unlike read_account (which copies the full record). The Rego policy's object.get(result, "risk_tier", "standard") default meant the sensitive_read_gate silently never fired for this tool, even on VIP/high-net-worth/restricted accounts -- despite read_transaction_history being listed in read_tools. Added risk_tier to the returned dict plus a regression test (test_read_transaction_history_signals) that would have caught this. Also: the example's quickstart pip install command (README.md, ci/README.md) omitted the examples extra, which is required for langchain-mcp-adapters (agent.py's top-level MCP import). Following the quickstart verbatim would raise ModuleNotFoundError on the first assert-ai run. The more detailed docs/README.md setup guide already had this right; synced the two shorter quickstart commands to match. Per audit of AI-review feedback on PR #262 (issuecomment-5097447052) -- the third flagged item (config generates 60 cases vs docs claiming n=100) was independently verified as a false positive: the actual generated test_set.jsonl has exactly 100 rows (50 prompt + 50 scenario); sample_size in the stratified test-set config does not map 1:1 to final case count. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks for flagging these — ran them all down against the actual code/artifacts rather than taking the AI review at face value. Two real, one false positive: #1 (risk_tier bypass) — real, fixed in #2 (n=100 vs 60) — false positive. That's naive arithmetic on the two #3 (missing One more thing I found while auditing #1, not from your list: the Python All 68 existing tests + the new one pass. Pushed in |
… nonexistent index.html Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
What
Introduces the
bank_manager_agent_controlexample — the AIEWF live demo. One banking support agent, taken through three beats:ASSERT measures the difference; ACS enforces it. Plus a follow-along HTML slideshow under
talks/.Scope / decisions (please sanity-check)
mainbefore.assert-ai runinto the gitignoredartifacts/results/. The three READMEs were reconciled to a "generate, then view" flow.assert-ai[acs](already onmain) with a vendored wheel offline fallback. Note: the[acs]extra isn't on PyPI0.1.0yet — needs a release beforepip install assert-ai[acs]works off PyPI.responsibleai/assert-ci-banking-demoas the shipping vehicle (pip-install-in-your-own-repo), publishing separately.Verification
python -m unittest discover -s tests)..env.exampleplaceholders only.docs/README.mdhad pre-existing staleness (oldvariant-a/c/enames,eval_unguarded.yamlrefs,build-demo-finalbranch, deadresults/copy-step) — reconciled to the currenteval_realistic_*configs /variant-b0/b1/b2/bank-manager-feature-repsuite. Worth a read to confirm.Draft — for review, not merge
Opened as a draft so you can review on github.com. Nothing merges. Flagging the "no committed results" call and the
docs/README.mdreconciliation as the two things most worth your eyes.