QuantumCopilot

AI Loan & Financial Assistant

Ask about a loan in plain English and get calculated scenarios side by side, while the LLM never does the math.

What's my EMI on a ₹20 lakh home loan over 15 years? And what if the rate drops?

Here are three rate scenarios for a ₹20,00,000 home loan over 15 years:

RateMonthly EMITotal interest
9.0%₹20,285₹16,51,360
8.5%₹19,695₹15,45,062
8.0%₹19,113₹14,40,348

Dropping from 9.0% to 8.0% saves you ₹2,11,012 in interest.

Illustration with example numbers, calculated with the standard EMI formula. Not a screenshot of the live product.

The problem

People think about loans in sentences: “What’s my EMI on a 20-lakh home loan over 15 years, and what if the rate drops?” Loan calculators make them fill in forms instead.

Constraints

  • The numbers must be exact. An LLM’s arithmetic isn’t good enough for money.
  • Follow-up questions should feel natural.
  • It’s a production API, so it has to be secure and keep working when dependencies fail.

How it works

After an API key check and loading recent conversation memory, the LLM turns the question into typed parameters: loan product, amount, tenure, rate. Up to three scenarios are built and sent to the calculation engine at the same time, then the LLM writes a comparison table and the memory is updated. If no loan details are found, it falls back to a general finance chat.

Key decisions

  1. The LLM extracts, the engine computes. The model only turns language into typed parameters. A deterministic calculation engine does every number.
  2. Parallel scenarios. Up to three scenarios run at once, so the wait is the slowest one instead of all three added together. That made the scenario stage about 3x faster.
  3. Memory as summaries. Each turn is saved as a short summary. “Make it 20 years” changes only the tenure and carries everything else over.
  4. Boring security, done properly. Constant-time API key checks with key rotation, parameterized SQL, retries with backoff on rate limits and server errors, and one consistent error format.

Results

  • Plain-English questions answered across 6 loan products.
  • ~3x faster scenario stage, from running the scenario calculations in parallel.
  • Live in production, running on 8 Uvicorn workers.

What I’d do next

  • Bring the amortization engine fully in-house and benchmark latency formally.
  • Move parameter extraction to schema-enforced structured outputs.

Next projectRAG Support & Concierge Chatbots