Lab 07 — Capstone: Banking Agentic Assistant

Goal. Assemble Labs 01–06 into one deployable, evaluated, secured banking assistant and record a short demo. This is the artifact you point to in the interview when they say "tell me about something you've built." It exercises every line of JD4 at once.

Read first. The whole knowledge/ set; this lab integrates it.

Run it (offline, no Azure)

pip install -r requirements.txt        # only pytest
python run.py                          # walks all 8 acceptance criteria below
pytest -q                              # 9 integration tests

The capstone composes Labs 01, 02, 03, and 06 (assistant.py imports them from the sibling lab directories), so run those first. It runs fully offline and demonstrates every line of the JD in one flow: grounded RAG with citations, tool-based balance, human-approved transfer, indirect-injection blocked from moving money, Arabic end-to-end, refusal, document IDP, and a full audit trail. Going live = swapping each lab's Azure* provider; this orchestration is unchanged.

FileRole
assistant.pythe integrated orchestrator (input guard → route → RAG/agent → output guard → audit)
run.pydemos acceptance criteria 1–8
test_capstone.pythe acceptance criteria as tests

What you build

A bilingual (Arabic/English) customer assistant that:

  • Answers policy/product questions via hybrid+semantic RAG with citations (Lab 01).
  • Fetches live account data via least-privilege tool calls to a mock core-banking system — never hallucinating money facts (Lab 02).
  • Processes uploaded documents (statement/ID/cheque) via Document Intelligence + OpenCV + GPT-4o vision, with confidence-gated human review (Labs 03, 04).
  • Acts agentically on a multi-step task (e.g. dispute a transaction) with a LangGraph graph, durable checkpoints, and human-in-the-loop approval on money-moving steps (Lab 02).
  • Runs in production shape: async FastAPI + SSE, Cosmos state, Docker → ACR → Container Apps, CI/CD with an eval gate (Lab 05).
  • Is provably safe: groundedness/safety eval gate, Content Safety + Prompt Shields + PII redaction, full audit trail (Lab 06).

Architecture

Draw and narrate the §3 reference stack. Every layer should be represented in your build (or explicitly stubbed with a note on what the production version would use).

Acceptance criteria (tie to understanding, not just "it runs")

  • A live balance question returns a value from the tool, and you can show in the audit trail that the LLM never produced the number.
  • A transfer/dispute pauses for human approval and resumes after; the approver is logged.
  • An out-of-scope/advice request is correctly refused.
  • An indirect-injection attempt (instruction hidden in an uploaded doc) fails to move money — and you can explain why (least-privilege + approval, not just the filter).
  • Arabic end-to-end works (question, OCR, response) and you can name what Arabic changed.
  • The CI eval gate goes red on a deliberate grounding regression.
  • An App Insights trace shows the full path (prompt → retrieval → tool → model) with tokens/latency/cost.
  • You can state the partition key for Cosmos and why, and PAYG vs PTU for the model and why.

Deliverable

A 3-minute demo video showing: a grounded cited answer, a live tool-based balance, a human-approved action, a refused out-of-scope ask, an Arabic interaction, and the CI eval gate. Plus a one-page architecture + safety note (how each of the 5 banking fears is addressed).

Resume bullet

"Delivered an end-to-end bilingual (Arabic/English) banking agentic assistant on Azure: hybrid+semantic RAG (Azure OpenAI + AI Search) with citations, LangGraph agent with durable checkpointing and human-in-the-loop approval, Document Intelligence + OpenCV/GPT-4o multimodal ingestion, async FastAPI + Cosmos + Container Apps with CI/CD and an AI eval gate, and a defense-in-depth safety/audit stack — live financial figures sourced from systems of record, never the model."