This project is an AI-powered platform designed to deliver highly personalized financial advice using Retrieval-Augmented Generation (RAG). It integrates a Next.js client with a Python FastAPI server, leveraging Pinecone for vector search and a Neo4j knowledge graph. The system utilizes large language models, such as Google Gemini, to provide users with tailored and factual financial guidance based on their individual profiles and uploaded documents.
Core Capabilities
- Hybrid Retrieval: Employs vector similarity search via Pinecone on chunked financial documents and structured fact lookup through a Neo4j knowledge graph.
- Personalized Responses: Tailors advice based on user profiles including risk tolerance, goals, and preferences, using LLM prompting.
- Document Ingestion: Supports PDF, CSV, and JSON file uploads, with automated chunking, embedding, and upserting to Pinecone.
- Knowledge Graph Visualization: Renders financial data relationships using NetworkX and Matplotlib.
- Comprehensive Evaluation: Utilizes DeepEval metrics for faithfulness, hallucination, and relevancy, with safeguards against API rate limits and duplicate vectors.
Client (Next.js) Features
- User authentication is handled via Clerk.
- Users can upload financial documents and generate reports.
- Interactive charts and download options are available.
- Includes documentation and best practices pages.
Server (Flask) Features
- Provides a /advice endpoint for on-demand personalized advice.
- Offers APIs for document processing (/process-document), user report generation (/generate-user-report), and organization report generation (/generate-organization-report).
- Includes ingestion and evaluation scripts.