FinSight Copilot

Project type

RAG Research Copilot

Date

2025

Location

Remote

AI-native copilot for finance teams. Upload PDFs, interrogate them in chat, and get cited answers pulled from SEC filings and internal documents. Behind the scenes, a Next.js BFF drives a FastAPI AI service that chunks, embeds, and searches documents, with Supabase edge functions handling large uploads and storage limits.

What I Built

  • Next.js 16 App Router experience with shadcn/ui and Tailwind. Users drag-and-drop filings, watch real-time upload progress, and chat in a thread that renders cited excerpts and page numbers.
  • TypeScript API routes that proxy to a Python FastAPI microservice. The service owns the RAG logic: chunking PDFs, embedding them with OpenAI, running vector similarity via pgvector, and composing answers with citations.
  • Supabase as the backbone: Storage buckets bypass Vercel's 4.5MB cap, Postgres holds documents/chunks/eval metrics, and edge functions pre-process uploads before they hit the AI service.
  • SEC awareness with a filing scout agent that resolves tickers to CIKs, queries EDGAR and AnnualReports.com, and auto-enqueues candidates. Natural-language filing search extracts company/filing/year and drops results into the candidate list.
  • Automated quality loops: PySpark evaluation pipeline computes accuracy, success rate, response time, and semantic similarity. Falls back to Python if Spark isn't available so CI/CD stays green.
  • UX polish: temperature pinned to 0.2 for focused answers, structured JSON prompts for predictable outputs, upload progress indicators, and evidence-first chat threads so analysts trust every response.

Why it's interesting

  • End-to-end RAG system: ingestion, chunking, embeddings, vector search, and cited chat answers tailored for financial analysts—not a generic chatbot.
  • Production-minded integrations: Supabase edge functions for uploads, pgvector for similarity, BFF pattern for secure AI calls, and ticker-to-CIK resolution for SEC data.
  • Operational rigor: automated evaluation pipeline, structured prompts, deterministic temperature settings, and agents that keep filings flowing without manual work.
  • UX credibility: evidence-rich chat, upload progress, and filing search flows that feel purpose-built for finance teams.

Tech Stack

Next.js 16TypeScriptFastAPISupabasepgvectorOpenAIPySparkshadcn/uiTailwind CSS