claude
- User
claude
Assistant
Hey! How can I help you with the loan-analyser project?
- User
Now, I wanna improve the chatbot. Right now, the chatbot is based on the AI, and when user asked questions, the answer of the chatbot is not accurate. Lets use any modal which is good at calculation, provide all possible informations to the AI, calculate or validate the answer and verify its correctness and then return the correct answer only. I want accurate answer from the ChatBot.
Assistant
Let me explore the current chatbot implementation to understand how it works.
Assistant
Now I understand the problem clearly. The chatbot sends summary metrics to GPT-4o-mini and relies on the AI to do math — which LLMs are bad at. Let me design a proper solution.
Assistant
Let me read the key files to verify the plan details.
Assistant
Good, I have a complete picture now. Let me write the plan.
Assistant
The plan is ready. The core idea: stop asking the AI to do math — instead, pre-compute everything server-side using your existing
calculateAmortizationengine, and let the AI just present the accurate numbers.Key changes:
- Send raw loan data to the server instead of pre-extracted summary numbers
- Server builds enriched context (yearly breakdowns, milestones, current status)
- For "what-if" questions, detect the intent and run the actual amortization engine with hypothetical inputs
- AI receives pre-computed results and is told "use these exact numbers, never calculate"
- User
[Request interrupted by user for tool use]
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.