Skip to content

Comments

Add notebooks for AML investigation use case#63

Open
fcogidi wants to merge 3 commits intomainfrom
fco/aml_notebooks
Open

Add notebooks for AML investigation use case#63
fcogidi wants to merge 3 commits intomainfrom
fco/aml_notebooks

Conversation

@fcogidi
Copy link
Collaborator

@fcogidi fcogidi commented Feb 20, 2026

Summary

Add notebooks for AML investigation use case.

Clickup Ticket(s): N/A

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test improvements
  • 🔒 Security fix

Changes Made

  • Add notebook to explore AML dataset and database tools.
  • Add notebook to explain how cases are built and how to run the agent on a case file.
  • Add notebook to showcase evaluation pipeline and explain metrics.

Testing

  • Tests pass locally (uv run pytest tests/)
  • Type checking passes (uv run mypy <src_dir>)
  • Linting passes (uv run ruff check src_dir/)
  • Manual testing performed (describe below)

Manual testing details:
Ran the notebooks.

Screenshots/Recordings

N/A

Related Issues

N/A

Deployment Notes

N/A

Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Documentation updated (if applicable)
  • No sensitive information (API keys, credentials) exposed

@fcogidi fcogidi self-assigned this Feb 20, 2026
@fcogidi fcogidi added the enhancement New feature or request label Feb 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three comprehensive Jupyter notebooks that document and demonstrate the AML (Anti-Money Laundering) investigation use case for evaluating AI agents. The notebooks provide a step-by-step walkthrough from data exploration to running evaluations.

Changes:

  • Added notebook 01 to explore the IBM AML dataset, build a SQLite database, and demonstrate the ReadOnlySqlDatabase tool
  • Added notebook 02 to explain case file structures, case generation, and running the agent on individual cases
  • Added notebook 03 to showcase the full evaluation pipeline with item-level, trace-level, and run-level graders

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
implementations/aml_investigation/01_data_and_tools.ipynb Introduces the AML dataset, demonstrates database setup and schema, and explains the ReadOnlySqlDatabase safety tool
implementations/aml_investigation/02_running_the_agent.ipynb Documents the case file data structures, explains the four case types (TP/TN/FP/FN), and demonstrates running a single case through the agent
implementations/aml_investigation/03_evaluation.ipynb Demonstrates the full evaluation pipeline including dataset upload to Langfuse, explains the three-tier grading system, and shows how to inspect results

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@amrit110 amrit110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @fcogidi! Can you actually try running everything from your implementations once on a coder workspace? I think if it all works, then merge this PR, and we should be good :)

@fcogidi
Copy link
Collaborator Author

fcogidi commented Feb 20, 2026

Great work @fcogidi! Can you actually try running everything from your implementations once on a coder workspace? I think if it all works, then merge this PR, and we should be good :)

It works in Coder. I just had to change the OPENAI_API_KEY envvar to GOOGLE_API_KEY for the agent calls to work. I think this is an environment variable that is not explicitly passed in, so it's looking for the canonical names internally.

I can do this as a workaround: os.environ["GOOGLE_API_KEY"] = Configs().openai_api_key.get_secret_value()

I'd recommend changing to GOOGLE_API_KEY in the .env file and updating firestore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants