Hands-On Labs

Build It Yourself

Eight labs, one project. You build a Financial Intelligence Assistant layer by layer: a RAG system, then an agent, then guardrails, then full observability.

8 Labs~8 hours totalReal public documentsColab-readyFinance-focused

The Capstone

The labs are not isolated exercises. Each one extends the previous build, so by Lab 7 you own a RAG-powered, agent-augmented, guardrailed and observable system for financial document analysis.

RAG
Lab 3
→
Agent
Lab 4
→
Guardrails
Lab 6
→
Observability
Lab 7

Labs 0, 1, 2 and 5 feed the capstone (clean text, model choice, prompts, governance documentation) and can be done on their own.

Lab 0
Available

Document Preprocessor

Module 0 · NLP Foundations

NLP pipeline on a real regulatory circular: cleaning, tokenisation, NER, TF-IDF.

⏱ 45 min🛠 Google Colab
Lab 1
Available

Model Comparison Bench

Module 1 · Foundation Models

Run one financial task across Claude, GPT-4o and Gemini; compare accuracy, tone and variance at temperature 0 vs 0.7.

⏱ 30 min🛠 Provider consoles / playgrounds
Lab 2
Available

Financial Prompt Library

Module 2 · Prompt Engineering

Five production-ready prompt templates, zero-shot vs few-shot vs CoT, and prompt caching cost measurement.

⏱ 60 min🛠 Claude API + Colab
Lab 3
Available

Regulatory Document RAG

Module 3 · Embeddings & Vector Stores

Chunk and embed three public documents into ChromaDB, then answer questions with citations. Start here.

⏱ 90 min🛠 Colab + Chroma + Anthropic
Lab 4
Available

Financial Research Agent

Module 4 · AI Agents

Add three tools and a ReAct loop on top of Lab 3, with a human-in-the-loop checkpoint for high-stakes answers.

⏱ 90 min🛠 Colab + LangGraph + Anthropic
Lab 5
Available

Bias Audit & Model Card

Module 5 · Governance

Audit a mock credit-scoring dataset, compute fairness metrics and SHAP values, then write a model card.

⏱ 60 min🛠 Colab + SHAP + scikit-learn
Lab 6
Available

Security Guardrail Layer

Module 6 · AI & GenAI Security

Harden the Lab 4 agent: Presidio PII detection, spotlighting, LLM Guard injection checks, and a Garak attack run.

⏱ 75 min🛠 Colab + Presidio + Garak
Lab 7
Available

Full Observability Stack

Module 8 · Observability & Evals

Trace the agent in Langfuse, build a 20-question golden set, and report groundedness, latency and cost per query.

⏱ 90 min🛠 Langfuse (Docker) + DeepEval

Choose Your LLM Provider

Every lab is written so the model provider is a single setting. Pick whichever fits your budget and your data-privacy needs, and the rest of the code stays the same.

Ollama
Local · free
  • ▸Runs open models on your own machine, so no data leaves it
  • ▸No API key and no rate limits
  • ▸Needs a decent laptop (8 GB+ RAM) and a model download
  • ▸Best for privacy-sensitive financial data
Groq
Hosted · free tier
  • ▸Fast hosted open models via an API key
  • ▸Free tier is rate-limited; check current limits
  • ▸OpenAI-compatible API, so setup is easy on Colab
  • ▸Best when your laptop is too small for Ollama
Anthropic Claude
Hosted · paid
  • ▸Strongest results for long documents and tool use
  • ▸Needs an API key with billing enabled
  • ▸Costs for the whole lab series are small but not zero
  • ▸Best for the closest match to the module examples

Lab 4 adds three more options: Google Gemini (free tier), OpenRouter (free models with small limits) and OpenAI (paid). Embeddings in Labs 3 and 4 run locally with a small open model through ChromaDB, so they need no key on any path. Lab 1 compares several providers by design, so it uses more than one. Results and quality will differ between providers; expected outputs on each lab page note where that matters.

Before You Start

  • ▸Accounts: a Google account for Colab, plus access to one LLM provider from the table below. You do not need a paid API key to complete the labs.
  • ▸Order: read the matching module first, then do the lab. Labs 3, 4, 6 and 7 build on one another, so do them in sequence.
  • ▸Data: every lab uses publicly available documents, with sources listed on each lab page.