F1GPT - Formula One AI Chatbot
F1GPT is a Retrieval-Augmented Generation chatbot that lets Formula One fans, journalists, and teams ask natural language questions and get accurate, context-rich answers powered by GPT-5.
Core trick
Puppeteer scrapes F1 sources, LangChain chunks and embeds them into Astra DB, and GPT-5 answers from retrieved chunks.
Tags
Description
$25
huzaifa620/rag-f1gpt-chatbot-nextjs★ 00 forksTypeScriptMITCreated Aug 17, 2025 · last push Jun 20, 2026
README excerpt
 ## F1GPT — RAG Chatbot for Formula One (Next.js) F1GPT is a Retrieval-Augmented Generation (RAG) chatbot built with Next.js 15 and the Vercel AI SDK. It scrapes and indexes popular Formula One sources into a vector database (DataStax Astra DB), retrieves the most relevant chunks for a user’s question, and streams answers from GPT-5 via an OpenAI-compatible AI/ML API—styled with an F1-themed UI. Built for Co-Creating with GPT-5 using AI/ML API. ### Highlights - Modern Next.js App Router with streaming chat UI - RAG pipeline: Puppeteer scraping → chunking (LangChain) → embeddings (AI/ML API) → Astra DB vector search - GPT-5 reasoning with streamed responses via AI/ML API - Serverless API route with token-safe server-side access - Tailwind CSS v4 styling - Dockerfile included for containerized dev runs ## Tech Stack - Next.js 15, React 19 - Vercel AI SDK (`ai`) for streaming responses - OpenAI-compatible AI/ML API (chat + `text-embedding-3-small` embeddings) - DataStax Astra DB Vector for storage and similarity search - LangChain text splitters, Puppeteer for web scraping - TypeScript, ESLint, Tailwind CSS v4 ## How it works 1. Seeding: `scripts/loadDB.ts` scrapes a curated list of F1 URLs with Puppeteer, removes HTML, splits text into overlapping chunks, generates embeddings via the AI/ML API, and writes documents into an Astra DB collection with a 1536-dimension vector. 2. Querying: `app/api/chat/route