Spaces:
Sleeping
Sleeping
Commit History
-
feat: add LLM query correction step to fix phonetic STT mispronunciations
Aniket Sirsikar8059126 -
fix: improve handling of short conversational affirmations
Aniket Sirsikar243e878 -
fix: double max_output_tokens to support Devanagari string lengths
Aniket Sirsikar52d1ebd -
fix: relax LLM length constraints to prevent mid-sentence EOS truncation
Aniket Sirsikarf3ebf4f -
perf: implement benchmark-driven optimizations
Aniket Sirsikar- Fixed LLM prompt to prevent mid-sentence cut-offs - Fixed LLM prompt to forbid hallucinating ages and numbers - Increased RAG chunk_size to 512 for better semantic paragraph coverage - Upgraded TTS from gTTS to high-quality edge-tts neural voicec13b073 -
fix(llm): remove lightbulb emoji from prompt to stop TTS from dictating it
Aniket Sirsikar3a82cfe -
feat(llm): add conversational memory for follow-up questions
Aniket Sirsikar- Passed Gradio chat_history State into the LLM prompt - Gemini now remembers the last 2 conversational turns - Enables user to ask contextual follow-ups like 'tell me more' or 'what is that'8ea24f3 -
fix(llm): prevent prompt hallucination and internal thought leaking
Aniket Sirsikar- Added Rule 9 prohibiting Gemini from outputting internal reasoning hooks (e.g '*Drafting the follow-up*') - Forces strictly clean Hindi conversational output290f461 -
fix(rag): remove english translation step & increase top-k chunks
Aniket Sirsikar- Eliminated the Gemini translation step from app.py - Re-routed raw Hindi queries directly to the multilingual RAG retriever - Increased retrieval chunks from k=5 to k=15 to handle 37 PDFs - Removed redundant translation code from llm.py This drastically improves finding complex Hindi concepts (like फिक्स दिपोज़ित) and shaves 2-3 seconds off latency per query.40cec9a -
feat(llm): add context-aware follow up question to prompt
Aniket Sirsikar- Added Rule 8 teaching the model to output a single follow-up question - Matches format '💡 क्या आप यह भी जानना चाहेंगे: [question]?'ee26538 -
feat: session chat history with inline 🔊 audio + safety exception for fraud
Aniket Sirsikarapp.py: - Session-based chat history using gr.State - Each bot response has a 🔊 play button (base64 inline audio) - Scrollable conversation history showing all Q&A pairs - Renamed chat label from 'Kisan Assistant' to 'Financial Assistant' llm.py: - Added SAFETY EXCEPTION rule for fraud/theft/scam questions - Bot can now give common-sense safety advice even if FAQ doesn't cover it - Still grounded to FAQ for all other factual answersaeda6f7 -
feat(rag): switch to multilingual embedding model
Aniket Sirsikar- Swapped all-MiniLM-L6-v2 (English-only) for paraphrase-multilingual-MiniLM-L12-v2 - Enables native indexing and cross-lingual search for Hindi and Marathi PDFs - Keeps memory usage low enough for free CPU tiers990bd50 -
fix(llm): enforce strict RAG grounding
Aniket Sirsikar- Changed temperature from 0.5 -> 0.1 to minimize hallucination - Rewrote prompt to include CRITICAL STRICT GROUNDING RULES - Heavily emphasized refusing to answer if info is not in the provided FAQ contextdf9ee9f -
ui & llm: rearrange layout and enforce concise chat
Aniket Sirsikarapp.py: - Grouped Audio In / Audio Out together at the top of the UI - Reformatted text Transcripts & Answers into a chat-bubble layout at the bottom - Custom CSS for user/bot bubbles llm.py: - Updated system prompt for 'सहायक' to be extremely direct - Enforced max length of 2-3 short sentences - Removed banking jargon and polite fluff - Hard stop condition to prevent truncationea7eceb
-
feat: auto-load PDFs, CSVs, and TXT files from data/ directory
Aniket Sirsikar- rag.py scans data/ and loads all .csv, .pdf, .txt files automatically - PDFs extracted page-by-page using pypdf - Just drop RBI PDFs into data/ and restart — no code changes needed - Added pypdf to requirements.txt5c31616 -
fix: few-shot chat translation, max_output_tokens 1024, bigger textbox
Aniket Sirsikar- Translation uses system_instruction + few-shot chat turns (not single prompt) - Answer max_output_tokens 600→1024 (Hindi Devanagari uses more tokens) - Removed truncation guard that was trimming answers - Textbox lines 8→14 for full answer visibilityae29635 -
feat: conversational bot overhaul — warm persona, complete answers, no truncation
Aniket Sirsikar- Simplified translation prompt (direct format works better with gemini-3-flash) - Answer persona: 'सहायक' — warm, elder-like bank helper - max_output_tokens 300→600, temperature 0.3→0.5 for natural Hindi - Truncation guard: ensures answers end at sentence boundaries - 3-5 sentence answers with specific details from FAQd3339a5 -
fix: robust translation (3-tier fallback), dual-query RAG, pipeline safeguards
Aniket Sirsikar- Rewrite translation prompt: Question/Answer format instead of arrow - Add 3-word minimum validation with retry + Hindi keyword fallback - Bump translation temp from 0.0 to 0.2 - Add retrieve_context_multi() for dual English+Hindi RAG search - Add raw response logging for debugginge9be45f
-
revert: restore correct model name gemini-3-flash-preview
Aniket Sirsikarc48deb1 -
fix: use gemini-2.0-flash, robust Hinglish translation, RAG k=5
Aniket Sirsikar6b008eb -
fix: suppress Whisper duplicate logits-processor warning; add gTTS 429 retry backoff
Aniket Sirsikar57db340 -
fix: handle NoneType response.text from gemini-3-flash-preview
Aniket Sirsikarb628075 -
fix: update Gemini 3 Flash model ID to gemini-3-flash-preview
Aniket Sirsikara52a18a -
feat: upgrade to gemini-3-flash for paid API account
Aniket Sirsikarfdc93e1 -
fix: switch to gemini-2.5-flash (2.0 series retired March 2026)
Aniket Sirsikar2bde7a3 -
fix: migrate from deprecated google-generativeai to new google-genai SDK
Aniket Sirsikarc410e1e -
fix: update Gemini model from deprecated gemini-1.5-flash to gemini-2.0-flash
Aniket Sirsikar21be132
-
Financial literacy UX: follow-up suggestions, emerald theme, Hindi-first labels
Aniket Sirsikarbbe2a10 -
Switch LLM to Gemini Flash (free, better Hindi, no billing issues)
Aniket Sirsikar8c9b31f -
Switch to Mistral-7B API: clean prompts, fix UI labels, restore HF_TOKEN warning
Aniket Sirsikar207e13d -
Fix LLM prompts: strict few-shot examples, low temp, anti-hallucination post-processing
Aniket Sirsikar1dc646a -
Full audit fixes: src/__init__.py, tmp TTS, soundfile+accelerate, remove HF_TOKEN warning, clean imports
Aniket Sirsikar4677012 -
Fix: remove duplicate Mistral functions that were overriding Qwen code
Aniket Sirsikar3eb2b46 -
Switch LLM to Qwen2.5-1.5B-Instruct (local CPU, no token needed)
Aniket Sirsikarfc1d30e -
Clean rewrite: whisper-small local, clean RAG+LLM with Hindi prompts
Aniket Sirsikarfc3f34d -
Upgrade: Use openai/whisper-large-v3 via Inference API for CPU compatibility
Aniket Sirsikard1693f1 -
Fix: switch to Mistral-7B, use chat completions API, use LlamaIndex + CSV
Aniket Sirsikar6b71e15 -
Migrate RAG from LangChain to LlamaIndex
Aniket Sirsikar2be51ac -
Add BankFAQs dataset and fix langchain-community dependency
Aniket Sirsikar0b6870c -
Clean commit without venv
Aniket Sirsikar9b73f19