Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye

# Remove Yarn apt repo entirely to avoid expired GPG key errors during feature installs
USER root
RUN rm -f /etc/apt/sources.list.d/yarn.list \
&& rm -f /usr/share/keyrings/yarn.gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {
"installBicep": true
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": "true"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "pip3 install --user uv==0.9.17 && uv sync --frozen",
"customizations": {
"vscode": {
"extensions": [
"github.copilot",
"github.copilot-chat",
"ms-azuretools.vscode-azurefunctions",
"ms-python.autopep8",
"ms-python.debugpy",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.vscode-python-envs",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.vscode-jupyter-slideshow",
"benjaminbenais.copilot-theme",
"Azurite.azurite",
"ms-azuretools.vscode-azurestorage",
"ms-azuretools.vscode-bicep",
"vs-publisher-1448185.keyoti-changeallendoflinesequence",
"ms-windows-ai-studio.windows-ai-studio",
"mechatroner.rainbow-csv"
],
"settings": {
"workbench.colorTheme": "Copilot Theme"
}
}
}
}
31 changes: 31 additions & 0 deletions 03-Azure/01-04-AI/05_Claims_Processing/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copy this file to .env at the repository root, then replace required values
# with credentials supplied by the MicroHack platform or event coach.

# Microsoft Foundry project and models
AI_FOUNDRY_PROJECT_ENDPOINT=https://<foundry-resource>.services.ai.azure.com/api/projects/<project-name>
FOUNDRY_PROJECT_ENDPOINT=https://<foundry-resource>.services.ai.azure.com/api/projects/<project-name>
MODEL_DEPLOYMENT_NAME=gpt-5.4
FOUNDRY_MODEL=gpt-5.4
FOUNDRY_QUARANTINE_MODEL=gpt-5.4

# Mistral Document AI
MISTRAL_DOCUMENT_AI_ENDPOINT=https://<foundry-resource>.cognitiveservices.azure.com
MISTRAL_DOCUMENT_AI_KEY=<foundry-api-key>
MISTRAL_DOCUMENT_AI_DEPLOYMENT_NAME=mistral-document-ai-2512
MISTRAL_DOCUMENT_AI_API_VERSION=2024-05-01-preview

# Azure AI Search and Foundry IQ
FOUNDRY_IQ_SEARCH_ENDPOINT=https://<search-service>.search.windows.net
FOUNDRY_IQ_SEARCH_KEY=<search-admin-key>
FOUNDRY_IQ_SEARCH_INDEX_NAME=crash-statements
FOUNDRY_IQ_KNOWLEDGE_SOURCE_NAME=crash-statements-ks
FOUNDRY_IQ_KNOWLEDGE_BASE_NAME=crash-statements-kb
SEARCH_SERVICE_ENDPOINT=https://<search-service>.search.windows.net
SEARCH_ADMIN_KEY=<search-admin-key>

# Azure Storage policy documents
AZURE_STORAGE_CONNECTION_STRING=<storage-connection-string>
AZURE_POLICIES_CONTAINER_NAME=policies

# Sequential workflow
HUMAN_REVIEW_CONFIDENCE_THRESHOLD=0.9
55 changes: 55 additions & 0 deletions 03-Azure/01-04-AI/05_Claims_Processing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv/
ENV/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
.excalidraw-copilot
# VS Code
.vscode/
.idea/
*.swp
*.swo
*~
.copilot-tracking

# Environment
.env
.env.local
local.settings.json

# Node
node_modules/
package-lock.json
yarn.lock

# Azure Functions
AzureFunctionsProject.csproj
bin/
obj/

# Azurite
__azurite_db_*.json
__blobstorage__/

# macOS
.DS_Store
88 changes: 88 additions & 0 deletions 03-Azure/01-04-AI/05_Claims_Processing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Agentic Claims Processing Hackathon

This microhack walks through an end-to-end claims workflow built with Microsoft Foundry and Azure Functions.

## What you will build

You start with claim intake and document understanding, then move through policy grounding, sequential orchestration, security hardening, and finally deployment as an HTTP-triggered Azure Function.

```mermaid
flowchart LR
C1[Challenge 1\nOCR + knowledge grounding] --> C2[Challenge 2\nPolicy coverage decision]
C2 --> C3[Challenge 3\nSequential workflow]
C3 --> C4[Challenge 4\nFIDES security fence]
C4 --> C5[Challenge 5\nAzure Function deployment]
```

## Challenge flow

1. [Challenge 1](./challenges/challenge-01.md) - OCR a claim statement and ground it in Azure AI Search / Foundry IQ knowledge.
2. [Challenge 2](./challenges/challenge-02.md) - Compare the claim against real policy documents and produce a coverage decision.
3. [Challenge 3](./challenges/challenge-03.md) - Combine the intake and decision agents into a sequential workflow with an optional human-review branch.
4. [Challenge 4](./challenges/challenge-04.md) - Harden the workflow against prompt injection and data exfiltration with FIDES.
5. [Challenge 5](./challenges/challenge-05.md) - Expose the secured workflow as an Azure Function with an HTTP trigger and managed identity.

## Repository layout

- `challenges/` contains the step-by-step lab instructions.
- `docs/` contains the Python scripts that support each challenge.
- `functions/` contains the Azure Functions project used in Challenge 5.
- `labautomation/` contains the deployment template and lab setup scripts.
- `data/` contains the sample claim and policy files used throughout the microhack.
- `walkthrough/` contains the numbered solution walkthrough for each challenge.

## Before you start

Use Python 3.11 and [uv](https://docs.astral.sh/uv/) for the participant environment.
From the repository root, install the pinned project dependencies:

```bash
uv sync
```

Activate the generated environment on PowerShell:

```powershell
.\.venv\Scripts\Activate.ps1
```

On Bash, run `source .venv/bin/activate`.

Create the single environment file used by Challenges 1 through 4:

```powershell
Copy-Item .env.example .env
```

On Bash, use `cp .env.example .env`. Replace the placeholders in `.env` with
the credentials supplied by the MicroHack platform or your event coach. Then
authenticate the same event account used for the lab:

```bash
az login
```

After activation, confirm the participant CLI is available:

```bash
python docs/claims-intake-agent.py --help
```

If you run Challenge 5 locally, also install Azure Functions Core Tools v4 and
start Azurite or provide a real storage connection string.

## Coach provisioning

Participants must not run `labautomation/deploy-lab.ps1`. The MicroHack
platform invokes this script and supplies its five-parameter contract,
including the platform-only `Get-MhhStableHash` helper. Coaches should import
the lab through the platform, verify the returned Hackbox credentials, and
provide each participant with the values required by `.env.example`.

## Notes

- Challenge 3 now includes a conditional human-review branch.
- Challenge 4 builds on that workflow with deterministic security enforcement.
- Challenge 5 deploys the secured workflow behind an HTTP endpoint instead of a CLI script.

If you want to start from the beginning, open [challenge-01.md](./challenges/challenge-01.md).
Loading
Loading