← All projects
Project

HDFC Fund Facts

A RAG assistant for five HDFC mutual funds that cites a source for every answer and refuses anything that sounds like advice.

Role
Solo, from a brief
When
Jul to Sep 2026
Status
Live
Links
Live app, code
The obvious version

A bot that compares funds and calculates returns

What I built

Short, sourced answers and polite refusals

Left out

Return calculations Fund comparisons

It's working if

0 unsupported answers on the test set

01Where it started

The brief: a facts-only assistant for five HDFC mutual funds, with Groww's fund pages as the only source. Retail investors ask the same questions again and again: expense ratio, exit load, minimum SIP, lock-in, benchmark.

02What changed my mind

Refusing investment advice was a given, so that isn't the interesting decision. The harder one was refusing the questions that make a finance bot feel smart: what were the returns over five years, which fund is better.

Any number the bot calculates is a number no source page contains, and an investor has no way to check it. In finance, an answer you can't verify is worse than no answer.

How strong is this? Facts-only came from the brief. Drawing the line at calculations and comparisons was my call.

03What I built

A retrieval pipeline over the five fund pages. A classifier first sorts each question into factual, advice-seeking or out of scope. Factual questions get an answer of three sentences or fewer, with exactly one source link and the date the data was last refreshed. Advice-seeking questions get a polite refusal and a link to investor education from AMFI or SEBI.

A scheduled job re-reads the pages every day so the facts stay current, and anything that looks like a PAN, phone number or account number is blocked.

HDFC Fund Facts answering a question with a source link

04What I left out, and why

  • Return calculationsA computed return isn't in any source, so it can't be cited.
  • Fund comparisons"Which is better" is advice dressed up as a fact.
  • Sources beyond the five pagesMore sources mean more answers, and more ways for them to contradict each other. One source per answer keeps every claim checkable.

05How I'll know it's working

Main metric target

0

answers on the test set say something the source pages don't.

What moves it
  • Advice-seeking questions caught: above 95%
  • Right passage among the top three retrieved: above 85%
  • Answers within the length and citation rules: 100%
What must not get worse

No personal data stored, ever.

06Trade-offs I accepted

  • Answers are short by rule, which sometimes feels curt. Accuracy over cleverness was the point.
  • Mixed questions, like "what's the exit load, and should I invest?", are refused entirely. Erring towards refusal costs one annoyed user; erring the other way costs trust.

07What I'd do next

Log real questions for a month and look at what gets refused. If people mostly ask about returns, the next build is a link to the official factsheet, not a calculator.