Inspiration
Commercial credit policy manuals, banking regulations, and loan underwriting guidelines are dense documents spanning hundreds of pages. Credit officers and loan underwriters spend countless hours manually cross-referencing covenant ratios (such as DSCR, Current Ratio, and LTV caps), regulatory thresholds (such as LEI and CRILC reporting), and pre-disbursement compliance checklists.
A single missed covenant or miscalculated limit can result in severe audit penalties or loan defaults. While general-purpose LLMs are powerful, they frequently hallucinate numbers and cannot be trusted in financial risk assessments. We were inspired to build CrediSense AI—a zero-hallucination, 100% grounded credit policy RAG copilot that provides instant, page-exact audit citations from the bank's active policy manual.
What it does
CrediSense AI transforms dense institutional loan policies into an interactive, real-time credit underwriting copilot:
- Single Active Policy Document Workflow: Upload or update any loan policy PDF (e.g., RBIC Loan Compliance Policy, SBA Underwriting Guide). The system cleanly wipes previous vectors and embeds the new manual instantly.
- Real-Time Token Streaming with Citations: Delivers answers token-by-token in under 2 seconds, backed by exact page numbers, chunk IDs, and cosine similarity scores.
- Strict Ground Truth & Zero Hallucination: If a policy criterion or ratio isn't present in the active document, the AI explicitly states that it is not covered rather than making assumptions.
- Interactive Vector Explorer: Allows risk officers to inspect semantic embeddings, similarity distributions, and raw chunk contexts directly inside ChromaDB.
- Audit Report Generation: Exports comprehensive Markdown audit reports containing dialogue turns, grounded answers, and verified source citations with a single click.
How we built it
- Embeddings & Vector Store: Built with
nomic-ai/nomic-embed-text-v1.5generating 768-dimensional asymmetric vector embeddings (search_documentvssearch_queryprefixes) stored in a persistent ChromaDB collection with cosine similarity indexing. - LLM Reasoning & Generation: Integrated Groq-accelerated open-weights inference (
openai/gpt-oss-120band fallback models) via streaming Server-Sent Events (SSE). - Backend Architecture: High-performance FastAPI backend with automated PDF extraction, semantic text chunking, and multi-turn dialogue memory management.
- Frontend Experience: Modern, responsive UI built with Vanilla JavaScript and CSS featuring dark-mode glassmorphism, live status indicators, preset loan scenarios, and collapsible citation cards.
Challenges we ran into
- Eliminating Financial Hallucinations: Ensuring the LLM strictly adhered to the retrieved context without inventing realistic-sounding interest rates or covenants required rigorous system prompt engineering and similarity threshold filtering.
- Asymmetric Embedding Precision: Tuning the 768-dim Nomic embedding pipeline to distinguish nuanced banking terminology (e.g., distinguishing DSCR stressed floor of $1.25\times$ vs standard $1.50\times$) using task-specific prefixing.
- Seamless Single-Document Re-indexing: Implementing a race-condition-free document replacement pipeline that completely cleans up the vector database and re-embeds new policies on-the-fly without server restarts.
Accomplishments that we're proud of
- Sub-2-Second End-to-End Latency: Achieving real-time semantic retrieval and token streaming.
- 100% Grounded Traceability: Every response includes transparent, verifiable source cards with exact page numbers and chunk snippets.
- Frictionless Document Swapping: Underwriters can drop any new credit policy PDF and immediately begin testing without configuring databases or pipelines.
What we learned
- The critical importance of task-specific prefixing in asymmetric vector embedding models for high-precision retrieval.
- How to structure resilient Server-Sent Events (SSE) streaming with multi-turn memory buffers.
- Practical insights into commercial credit risk standards, including Large Exposure Frameworks, SMA-0/1/2 delinquency classifications, and pre-disbursement compliance workflows.
What's next for CrediSense AI
- Automated Borrower Financial Ingestion: Uploading borrower balance sheets and P&L statements alongside the policy to automatically calculate DSCR/LTV and flag policy breaches.
- Side-by-Side PDF Citation Viewer: Embedding an in-app PDF viewer that highlights the exact cited text directly on the visual page.
- Multi-Policy Circular Comparison: Comparing internal bank credit policies against newly issued central bank/regulatory circulars to detect policy gaps.
Built With
- api
- artificial
- chromadb
- embeddings
- events
- fastapi
- fintech
- groq
- html5
- intelligence
- javascript
- llm
- nomic
- prompt
- pydantic
- pypdf
- python
- rag
- rest
- search
- sentence
- server-sent
- transformers
- uvicorn
- vector
Log in or sign up for Devpost to join the conversation.