Inspiration

We kept hearing from portfolio managers that regulations hit faster than they can interpret them. Analysts lose hours digesting dense legal text, and by the time insights reach the trading desk, the market has already reacted. RegulAI aims to compress that lag—turn regulatory change into portfolio intelligence before it’s priced in.

What It Does

RegulAI lets a user paste or upload a regulatory document and instantly returns:

  • A ranked list of affected sectors and tickers
  • A natural-language summary of the regulation
  • Plain-English guidance on potential portfolio moves

The app is deployed at regul-ai.vercel.app.

How We Built It

  • Frontend: React + TypeScript + Tailwind, framed in Vite, with shadcn/ui for polished UX.
  • Backend: AWS Lambda orchestrating Bedrock (text extraction + structured JSON) and a finance Lambda that scores exposure using sector/ticker mappings and live market data.
  • Data & Inference: Yahoo Finance API for quotes; Bedrock Titan for summarization and NER; bespoke heuristics for risk scoring.

Key workflow:

  1. Regex pre-cleaning and chunking to keep prompts within Bedrock token limits.
  2. Lambda calling Bedrock with a strict JSON schema (temperature-tuned for determinism).
  3. Finance Lambda maps structured insights to our curated sector/ticker catalog, applies weighted scoring, and returns actionable guidance.
  4. The frontend streams status updates to keep users in the loop.

Challenges

  • Prompt determinism: Getting Bedrock to respect our JSON schema required iterative temperature and few-shot tuning.
  • Data sparsity: Many regulations reference niche sectors; we had to enrich our catalog and fall back gracefully when tickers weren’t obvious.
  • Latency: We inlined caching for repeated market-data lookups and trimmed Lambda cold-start time with smaller bundles.

Accomplishments

  • Live deployment with fully serverless backend—judge-ready and already demoed with sample regulations.
  • Insight pipeline that translates legal text into portfolio actions in under a minute.
  • UI polish that makes the experience approachable for both analysts and execs.

What We Learned

  • Prompt engineering is as much about schema design as wording—valid JSON comes from tight guardrails.
  • Sector mapping needs human-in-the-loop oversight; we iterated with SME feedback to keep outputs relevant.
  • Observability in serverless stacks matters; structured logs saved us during late-night debugging.

What’s Next

  1. Integrate confidence intervals using Monte Carlo simulations on market scenarios.
  2. Expand the regulation library with pre-tagged historical laws to improve fine-tuning.
  3. Add alerting so users get proactive notifications when new regulations match their portfolio.

Built With

  • api-gateway
  • aws-bedrock
  • aws-lambda
  • framer-motion
  • node.js
  • react
  • react-query
  • shadcn/ui
  • tailwind-css
  • typescript
  • vercel
  • vite
  • yahoo-finance-api
Share this project:

Updates