Inspiration

Every major financial scandal — Enron, Wirecard, Satyam — left a paper trail. The evidence was sitting right there in plain filings: revenue recognized before it was earned, cash flow that didn't match reported profits, related-party deals buried in a footnote nobody read closely enough. In every case, the fraud wasn't invisible. It was just missed, because reading a 200-page 10-K closely enough to catch it takes hours most people don't have.

That gap is what got us thinking. Institutional investors have entire forensic accounting teams for this. Retail investors, students, and even junior analysts don't — they're stuck either trusting a filing at face value or skimming it and hoping nothing's buried in the details. We wanted to close that gap: give anyone the ability to interrogate a financial document the way a forensic analyst would, without needing a CFA or a team of auditors behind them.

We also wanted it to not feel like another dashboard full of numbers nobody wants to stare at. Digging through financial statements for red flags is, at its core, detective work — pattern recognition, cross-referencing evidence, building a case. So we built Sherry: a character who turns "run this filing through an anomaly model" into "let's go find out what this company isn't telling you." The noir, case-file aesthetic isn't just decoration — it's meant to make forensic literacy feel less intimidating and a little more fun, while the RAG pipeline underneath keeps every finding grounded in the real document instead of a guess.

FinSherlock exists because we believe financial transparency shouldn't be a privilege reserved for people who can afford a forensic accountant. Every financial statement leaves clues — we just wanted to build something that helps people actually find them.

What it does

FinSherlock is an AI-powered forensic analysis platform that lets anyone interrogate a financial report the way a forensic accountant would. Upload a 10-K, 10-Q, 8-K, annual report, or proxy statement, and Sherry — our AI detective — reads it, chunks and embeds the actual text, and lets you ask questions in plain language. Instead of keyword search or a generic AI summary, FinSherlock uses Retrieval-Augmented Generation (RAG) to ground every answer in the real document, retrieving the exact passages relevant to your question before the LLM ever generates a response.

Every finding comes with a severity rating (HIGH/MEDIUM/LOW), a category from our six-part risk taxonomy — revenue recognition inconsistencies, cash flow mismatches, accounting pattern shifts, related-party transactions, aggressive forecasting, and off-balance-sheet arrangements — and a page reference back to the source. Findings build into a persistent investigation timeline and evidence board, so a session isn't just a chat log, it's an audit trail.

How we built it

The frontend is a Next.js 14 app with TailwindCSS and Framer Motion, built around a noir/detective aesthetic — glassmorphism panels, CRT scanline textures, and Sherry's pixel-art states (idle, thinking, speaking) driving the personality of the interface. The dashboard splits into a chat panel to talk with Sherry, a sidebar evidence board, and an animated SVG risk gauge.

The backend runs on FastAPI. When a PDF is uploaded, PyMuPDF extracts the text, LangChain's RecursiveCharacterTextSplitter chunks it (1,000 tokens, 200 overlap), and Sentence-Transformers (all-MiniLM-L6-v2) generates 384-dimensional embeddings stored in a persistent ChromaDB collection. When a question comes in, it's embedded and matched against the document via cosine similarity (top-k retrieval), and the retrieved chunks — along with independently extracted metrics and rule-based red-flag detection — get assembled into a prompt sent to Google's Gemini 2.5 Flash for the actual forensic analysis. Findings are parsed and persisted through SQLAlchemy so every investigation has a full record.

Challenges we ran into

Getting the RAG pipeline to feel trustworthy rather than just plausible was the hardest part — it's easy to get an LLM to sound confident about a financial filing, much harder to make sure every claim traces back to an actual page. We had to be deliberate about combining semantic retrieval with deterministic rule-based extraction so the two would reinforce rather than contradict each other.

Model churn was a real, unglamorous obstacle — we started on Groq/Mixtral and had to migrate off after deprecation, and later had to account for Google retiring the entire Gemini 1.0 and 1.5 families and shutting down 2.0 Flash mid-build. That taught us the hard way to keep the model identifier configurable rather than hardcoded, and to build in a way that assumes the underlying model will change out from under you.

Balancing the noir aesthetic with usability was its own challenge — it's easy for a heavily themed UI to undercut trust in a tool meant to feel rigorous and forensic. We spent real time making sure the personality (Sherry, the case-file language) sat on top of a genuinely evidence-based system rather than papering over a shallow one.

Accomplishments that we're proud of

We're proud that FinSherlock isn't just a chatbot wrapped around a PDF — every finding is retrieved, scored, and sourced, and we proved that out against eight real fraud cases rather than just demoing it on a clean example. We're proud of the risk taxonomy itself, which took real research into how forensic accountants actually categorize fraud signals rather than inventing categories that sounded good. And we're proud of Sherry — building a character that makes forensic literacy feel approachable, without losing the rigor underneath, was harder than it looks.

What we learned

We learned that RAG is as much about what you don't send to the LLM as what you do — scoping context tightly to what's actually relevant made a bigger difference to answer quality than almost anything else we tried. We learned to treat third-party model APIs as inherently unstable dependencies, not fixed infrastructure, after living through a deprecation and a full model-family retirement in one build cycle. And on the product side, we learned that financial forensic analysis is a genuinely underserved space outside of institutional tooling — most of the people who'd benefit most from this kind of pattern detection have never had access to anything like it.

What's next for FinSherlock

The most immediate priority is closing the gap between the streaming UI we've already built (typing indicators, the typewriter effect) and true token-level streaming from the backend — right now the frontend simulates it client-side, and wiring up real SSE from FastAPI is next. We also want to add retry and backoff logic around LLM calls so a transient rate limit doesn't just surface as a raw error to the user.

Beyond that, we're looking at multi-document comparison (analyzing a company's filings across several years to catch trend-level anomalies, not just single-document red flags), persistent cloud storage so investigations survive beyond a single session, and expanding the risk taxonomy with input from actual forensic accountants to sharpen precision on real-world edge cases.

Built With

Share this project:

Updates

Submission history