An AI-powered Formula 1 chatbot for trivia, statistics, and historical race data.
Halos AI combines Retrieval-Augmented Generation (RAG) and Text-to-SQL pipelines to answer two distinct categories of F1 questions: open-ended knowledge/trivia queries and structured statistical queries. A query classifier routes each request to the appropriate pipeline, and LLM generates the final natural language response.
- Dual pipeline (RAG for trivia + Text-to-SQL for stats)
- Automatic query classification
- Hybrid search (BM25 + pgvector)
- Query rewriting with conversation context
- Input sanitization and prompt-injection detection
- Rate limiting (per-IP sliding window)
- Modern chat interface with backend status monitoring
flowchart TB
subgraph INGESTION["Ingestion Pipeline"]
A["<b>Wikipedia Pages</b><br/>64 URLs"] --> B["<b>Playwright Scraper</b>"]
B --> C["<b>Chunk Documents</b><br/>1469 Chunks"]
C --> D["<b>NVIDIA NV-Embed-v1</b>"]
D --> E["<b>Neon + pgvector</b>"]
end
subgraph QUERY["Query Pipeline"]
F["<b>User Question</b>"] --> G["<b>FastAPI Backend</b>"]
G --> H["<b>Query Classifier</b>"]
H --> I["<b>NVIDIA NV-Embed-v1</b>"]
I --> E
E --> J["<b>Retrieve Chunks</b>"]
J --> K["<b>LLM</b><br/>via NVIDIA Nemotron"]
K --> L["<b>Final Answer</b>"]
end
style A fill:#7c3aed,stroke:#a78bfa,stroke-width:2px,color:#fff
style B fill:#6366f1,stroke:#818cf8,stroke-width:2px,color:#fff
style C fill:#0ea5e9,stroke:#38bdf8,stroke-width:2px,color:#fff
style D fill:#f59e0b,stroke:#fbbf24,stroke-width:2px,color:#fff
style E fill:#10b981,stroke:#34d399,stroke-width:2px,color:#fff
style F fill:#ec4899,stroke:#f472b6,stroke-width:2px,color:#fff
style G fill:#6366f1,stroke:#818cf8,stroke-width:2px,color:#fff
style H fill:#ef4444,stroke:#f87171,stroke-width:2px,color:#fff
style I fill:#f59e0b,stroke:#fbbf24,stroke-width:2px,color:#fff
style J fill:#0ea5e9,stroke:#38bdf8,stroke-width:2px,color:#fff
style K fill:#7c3aed,stroke:#a78bfa,stroke-width:2px,color:#fff
style L fill:#10b981,stroke:#34d399,stroke-width:2px,color:#fff
style INGESTION fill:#1e1e2e,stroke:#6b7280,stroke-width:1px,color:#d1d5db
style QUERY fill:#1e1e2e,stroke:#6b7280,stroke-width:1px,color:#d1d5db
- React
- TypeScript
- Vite
- Tailwind CSS
- Python
- FastAPI
- Uvicorn
- LLM (NVIDIA Nemotron)
- NVIDIA NV-Embed-v1
- PostgreSQL (Neon)
- pgvector
- FastF1
- Playwright
- Vercel (frontend)
- Render (backend)
- 64 Wikipedia pages
- 1,469 vector chunks
- Seasons: 2021–2026
- 136 races
- 2,476 race results
- 2,477 qualifying results
| Component | URL |
|---|---|
| Frontend | https://halos-ai.vercel.app |
- Who won the 2025 Monaco Grand Prix?
- How many wins does Max Verstappen have since 2021?
- Which constructor scored the most points in 2024?
- Tell me about Ayrton Senna.
- Why is Monaco considered a special race?
- Explain Ferrari's history in Formula 1.
Vinesh
Built with ❤️