An intelligent consultation system for FIA Formula 1 Regulations, leveraging Retrieval-Augmented Generation (RAG) and an Agentic Reflection workflow. This project provides authoritative officiating advice by citing official FIA documents.
Important
Regulation Version: This project is currently configured with the 2025 FIA Formula 1 Regulations.
If you wish to utilize regulations from a different year (e.g., 2024 or 2026), you must replace the PDF files in the data/ directory and re-run the ingestion script to build a new vector database.
- Cross-Lingual Retrieval: Optimizes search accuracy by translating Chinese queries into English technical keywords before querying the vector database.
- Reflection Mechanism: Implements a "Chief Steward" persona that drafts, reviews, and finalizes judgments to ensure strict adherence to regulatory articles.
- High-Performance Vector Store: Utilizes Gemma-300m Embeddings and FAISS for millisecond-latency semantic search across 1,500+ regulation snippets.
- F1-Themed UI: A modern web interface built with Gradio, featuring custom racing-inspired aesthetics.
- LLM Inference: Groq (Llama-3.3-70b-versatile)
- Embeddings: Google Gemma-300m (via Hugging Face)
- Orchestration: LangChain & LangChain-Community
- Vector Database: FAISS (Facebook AI Similarity Search)
- Interface: Gradio 6.0
- Language: Python 3.13
This project is for educational and portfolio purposes. All judgments generated by the AI are based on retrieved documents and should not be considered official FIA rulings.
f1-rag-assistant/
├── app/
│ └── main.py # Gradio Web Interface & RAG Logic
├── ingestion/
│ └── build_vector_db.py # PDF Parsing & Vectorization Script
├── data/ # Storage for 2025 FIA PDF regulations (Update here for other years)
├── faiss_db/ # Local FAISS vector index storage
├── .env # API keys (Groq & HuggingFace)
└── requirements.txt # Project dependencies