Work / AI & Machine Learning
Regulatory Compliance AI

OSFI CAR RAG Agent

A retrieval-augmented generation agent for OSFI's Capital Adequacy Requirements achieving a 0.805/1.0 quality score on ground-truth regulatory Q&A evaluation.

0.805
Quality Score
LangGraph
Framework
Gemini 1.5 Pro
Model
OSFI CAR
Domain

Overview

A retrieval-augmented generation (RAG) agent built to answer questions about OSFI’s Capital Adequacy Requirements (CAR) — Canada’s primary banking capital regulation. Achieved 0.805/1.0 quality score.

The Challenge

OSFI’s Capital Adequacy Requirements is a dense, multi-chapter regulatory document. Compliance teams spend hours manually searching for relevant capital treatment rules, interpretation guidance, and specific regulatory thresholds. A single question about how to classify an exposure can require cross-referencing 3–4 chapters simultaneously.

What We Built

Implemented a LangGraph-based RAG pipeline with Gemini 1.5 Pro as the reasoning engine. The CAR document was chunked, embedded, and stored in a vector database. The agent uses hybrid retrieval — semantic similarity + BM25 keyword matching — to surface the most relevant regulatory passages, then synthesizes a cited answer. Quality was evaluated against a ground-truth test suite, achieving 0.805/1.0.

Results

  • 0.805 — Quality Score. Out of 1.0 on ground-truth regulatory Q&A evaluation
  • LangGraph — Framework. Multi-step retrieval and reasoning pipeline
  • Gemini 1.5 Pro — Model. Google's long-context reasoning model
  • OSFI CAR — Domain. Canada's capital adequacy regulatory framework
More Work

Related case studies.

Get Started

Have a project like OSFI CAR RAG Agent?

Tell us about your problem. We'll tell you honestly how we'd approach it — and whether we're the right team.