FinSight-AI is an AI-powered equity research agent designed to generate financial reports with evidence tracing and RAG evaluation. It leverages a robust architecture including Redis for caching, pgvector for RAG, RabbitMQ for workflow, and Spring Boot for the application backend. The project demonstrates advanced AI agent capabilities for financial analysis.
A starter prompt for Claude Code, what you'll need, and how to reach them.
You are an expert full-stack developer. I need to build a stripped-down, but robust, version of an AI equity research agent named 'FinSight-AI'. Focus on the core functionality of generating a short financial research report for a given stock symbol, tracing back evidence from retrieved documents, and presenting it through a basic web UI. Do NOT implement RabbitMQ, Redis Lua single-flight, or full RAG evaluation initially; prioritize a functional MVP. I will use Next.js 16 App Router (React 19, Tailwind v4) for the frontend and a Python FastAPI backend for AI logic and data handling, backed by Neon Postgres with pgvector. The AI SDK v6 will be used with Gemini for the LLM interactions.
Here's the plan:
1. **Backend (Python FastAPI):** Create endpoints for `POST /research` (takes `symbol: str`, `report_type: str` - e.g., 'overview', 'sentiment') and `GET /report/{report_id}`. Implement a simple in-memory document store (for MVP) or load from a pre-indexed `pgvector` store if time allows. For document ingestion, use a placeholder function to 'simulate' fetching data for a stock symbol (e.g., fetch a Wikipedia page or a mock news article). The core AI logic should call Gemini via the AI SDK to synthesize a report based on the 'retrieved' context. Ensure evidence tracing by embedding source snippets directly into the generated report.
2. **Database (Neon Postgres + pgvector):** Define a `documents` table with `id`, `content`, `embedding`, `source_url`, `stock_symbol`, `timestamp` columns. Define a `reports` table with `id`, `stock_symbol`, `report_type`, `generated_content`, `generation_timestamp`.
3. **Frontend (Next.js App Router):** Build a single page with a form to input a stock symbol and report type. Display a loading state while the report is generated. Once complete, render the report, clearly showing the AI-generated text and its traced evidence (e.g., footnotes linking to source text within the report). Allow basic viewing of a previously generated report by ID.
4. **Integration:** Connect the Next.js frontend to the FastAPI backend. Ensure proper error handling and display.
5. **Build/Verify Gate:** A user can input a stock symbol (e.g., 'AAPL'), select 'overview' report type, submit, and see a basic AI-generated report displayed on the page, with at least two traced 'evidence' snippets linked back to simulated source content.AI equity research agent with resilient workflows, Redis Lua single-flight, pgvector RAG, versioned reports, evidence tracing, and RAG evaluation. Topics: ai-agent, financial-research, llm-evaluation, pgvector, postgresql, rabbitmq, rag, redis, spring-boot, workflow-orchestration.
Open an issue on their GitHub repository or find contact information in their profile to initiate a conversation.
“I've built a functional MVP of your FinSight-AI agent, focusing on core report generation with evidence tracing using Next.js, FastAPI, and pgvector. Here's a demo link; I can help mature this into a production-ready system, addressing the full scope of your project.”
Open the original ↗