End-to-end project that integrates a professional MLOps + LLMOps stack to solve real investment problems from a single web application.
🇪🇸 Documentación en español: README.es.md · docs/
FinSight AI is an investment intelligence platform that combines 4 classic Machine Learning modules (MLOps) with an LLM-powered conversational assistant (LLMOps) that explains and unifies the predictions of every module — using real market data.
The UI is bilingual (English / Spanish) and supports dark & light themes, both switchable from the header and persisted per user.
Live AAPL data from Yahoo Finance, a GradientBoosting price forecast, NLP sentiment over
real Finnhub headlines, and the AI Assistant (Groq · llama-3.3-70b, traced in Langfuse)
explaining all module outputs in natural language — it answers in the language you ask in.
SMA/RSI/MACD/Bollinger/Stochastic indicators, an aggregated 0–100 score with a buy/sell recommendation, and a heuristic Elliott-wave reading over real price pivots.
Build your asset universe with the symbol search and compare Max Sharpe (Markowitz), Min Volatility, Risk Parity, Equal Weight and Mean-Variance side by side.
RandomForest classifier (AUC 0.857) served from the MLflow Model Registry
(@champion alias) estimating default probability and risk band.
An investor (or financial advisor) needs to make informed decisions. FinSight AI offers, from a single web interface:
| Module | ML type | Question it answers |
|---|---|---|
| Portfolio Optimizer | Optimization + ML | How do I split my capital across assets to maximize risk-adjusted return? |
| Price Forecaster | Time series | What is the price projection for an asset over the next days? |
| Credit Risk Scorer | Classification | What is the default risk of a borrower / counterparty? |
| Market Sentiment Analyzer | NLP / classification | What is the market sentiment about an asset according to the news? |
| AI Assistant 🤖 | LLM (Groq/vLLM + Langfuse) | "Explain in plain language what these results mean and what I should consider" |
The AI Assistant is the piece that ties everything together: it receives the context from the 4 modules and generates explanations, summaries and answers in natural language, with full observability via Langfuse.
| Layer | Technology | Role in the project |
|---|---|---|
| Experiment tracking & registry | MLflow | Track experiments, metrics, artifacts and version production models (champion/challenger aliases) |
| Data versioning | DVC | Version datasets and pipelines reproducibly (S3 backend) |
| Orchestration | Apache Airflow | Schedule and orchestrate training/retraining pipelines |
| Infrastructure as Code | Terraform | Provision AWS infrastructure (EKS, S3, ECR, RDS, IAM) |
| Containers | Docker | Package every service reproducibly |
| Container orchestration | Kubernetes | Deploy and scale services in production (EKS) |
| LLM serving | Groq / vLLM / OpenAI | Pluggable LLM provider (OpenAI-compatible API) |
| LLM observability | Langfuse | Traces, costs, evaluation and debugging of the LLM |
| API / Backend | FastAPI | Serve ML models and the LLM assistant via REST |
| Frontend | React + Vite + Tailwind | Professional web interface |
| Monitoring | Evidently | Data drift detection |
Real data sources: Yahoo Finance (prices, chart API v8), Finnhub (news + symbol search), OpenML (Give Me Some Credit, Twitter Financial Sentiment).
┌─────────────────────────┐
│ Frontend (React) │
│ Investment dashboard │
└───────────┬──────────────┘
│ HTTP/REST
┌───────────▼──────────────┐
│ FastAPI (Backend) │
│ /portfolio /forecast │
│ /credit /sentiment /chat │
└───┬───────────────┬───────┘
┌───────────────────────┘ └────────────────────┐
│ loads models context + │ prompt
▼ ▼
┌────────────────────────┐ ┌────────────────────────┐
│ ML models (MLflow │ │ LLM Service │
│ Model Registry) │ │ Groq / vLLM (OpenAI │
│ - portfolio │ │ API) + Langfuse │
│ - forecasting │ └────────────────────────┘
│ - credit_risk │
│ - sentiment │
└───────────┬─────────────┘
│ trained by
▼
┌────────────────────────┐ ┌──────────────┐ ┌────────────────────┐
│ Airflow DAGs │─────▶│ MLflow │ │ DVC (data + │
│ (ML pipelines) │ │ Tracking+Reg. │ │ pipelines, S3) │
└────────────────────────┘ └──────────────┘ └────────────────────┘
Infrastructure: Docker → docker-compose (local) | Terraform + Kubernetes (AWS / EKS)
📖 Full details in
docs/01-arquitectura.md(Spanish).
finsight-ai/
├── README.md # This file
├── docs/ # 📚 Complete educational documentation (Spanish)
│ ├── 01-arquitectura.md
│ ├── 02-mlops.md # MLflow + DVC + Airflow explained
│ ├── 03-llmops.md # vLLM + Langfuse explained
│ ├── 04-infraestructura.md # Docker + K8s + Terraform explained
│ ├── 05-guia-local.md # How to run everything locally (Windows)
│ ├── 06-guia-aws.md # How to deploy to AWS
│ ├── 07-glosario.md # MLOps/LLMOps glossary
│ ├── 08-monitoreo-y-evaluacion.md # Data drift (Evidently) + LLM-as-judge (Langfuse)
│ ├── 09-datos-reales-finnhub.md # Real market data (Yahoo chart API + Finnhub)
│ └── screenshots/ # App screenshots used in this README
├── ml/ # 🧠 Machine Learning code (MLOps)
│ ├── common/ # Shared utilities (config, MLflow, data)
│ ├── monitoring/ # Data drift (Evidently)
│ ├── portfolio/ # Module 1: portfolio optimization
│ ├── forecasting/ # Module 2: price forecasting
│ ├── credit_risk/ # Module 3: credit risk scoring
│ └── sentiment/ # Module 4: sentiment analysis
├── airflow/ # 🔁 Orchestration
│ └── dags/ # Training DAGs per module
├── services/ # 🚀 Deployable services
│ ├── api/ # FastAPI backend
│ └── llm/ # LLM gateway (Groq/vLLM/OpenAI) + Langfuse
├── frontend/ # 💻 React web app
├── infra/ # 🏗️ Infrastructure
│ ├── terraform/ # IaC for AWS
│ └── kubernetes/ # Kubernetes manifests (Kustomize)
├── data/ # Data (versioned with DVC, not in git)
├── docker-compose.yml # Full local stack
├── dvc.yaml # DVC pipeline definitions
├── params.yaml # Centralized hyperparameters
├── Makefile # Command shortcuts
└── .env.example # Example environment variables
Requirements: Docker Desktop, ~8 GB of free RAM. (Details in
docs/05-guia-local.md)
# 1. Copy the environment variables
cp .env.example .env
# Optional: set FINNHUB_API_KEY (real news) and LLM_API_KEY (real LLM answers)
# 2. Bring up the whole stack (MLflow, Airflow, Langfuse, API, frontend, Postgres)
docker compose up -d
# 3. Train the initial models (registers them in MLflow)
make train-all
# 4. Open the app
# Frontend: http://localhost:5173
# API docs: http://localhost:8000/docs
# MLflow: http://localhost:5000
# Airflow: http://localhost:8080 (admin / admin)
# Langfuse: http://localhost:3000
⚠️ About the LLM provider: the assistant is pluggable viaLLM_PROVIDER(groq,vllm,openaiormock). Without a GPU,groq(free tier) ormockare the recommended options. Seedocs/03-llmops.md.
If your goal is to learn the stack, this is the recommended path (docs in Spanish):
docs/01-arquitectura.md— how all the pieces fit together.docs/02-mlops.md— MLflow, DVC and Airflow with project examples.docs/03-llmops.md— how the LLM is served and observed.docs/04-infraestructura.md— Docker, Kubernetes and Terraform.docs/05-guia-local.mdanddocs/06-guia-aws.md— hands on.
This is an educational project. It uses real market data for teaching purposes and does not constitute financial advice. Do not use it to make real investment decisions.



