Racecraft AI
An Agentic AI Engine for Formula 1
The problem Racecraft AI solves
Formula 1 data is scattered across race results, standings, historical records, and circuit statistics. While fans can access raw information, extracting meaningful insights often requires manually analyzing multiple sources and comparing large amounts of data.
Racecraft AI solves this by combining historical race intelligence, championship data, circuit-specific performance metrics, and AI-powered reasoning into a single platform.
Instead of simply displaying statistics, the system uses an agentic AI architecture where specialized agents retrieve, analyze, compare, and predict outcomes before generating natural-language explanations.
Users can:
- Compare drivers, constructors, and seasons
- Analyze performance at specific circuits
- Explore historical Formula 1 data
- Generate race predictions using historical and current season trends
- Ask follow-up questions through a conversational AI interface
- Retrieve context-aware insights instantly
The platform transforms complex motorsport datasets into actionable intelligence, making Formula 1 analysis accessible to both casual fans and data-driven enthusiasts.
Challenges I ran into
Building Racecraft AI required solving several challenges beyond simply connecting an LLM to Formula 1 data.
1. Hallucinated Analysis
Early versions allowed the language model to perform calculations and rankings directly. This frequently produced confident but incorrect conclusions, especially for comparisons and race predictions.
Solution:
I moved all statistical computation into dedicated analysis agents and restricted the LLM to explanation and reasoning. The model now explains results instead of generating raw calculations.
2. Historical Data Integration
Formula 1 data spans decades and comes from multiple sources with different structures and naming conventions.
Solution:
I created a preprocessing pipeline that normalizes drivers, constructors, circuits, race results, and standings into a unified format that can be queried consistently.
3. Context-Aware Conversations
Follow-up questions often depended on previous queries, requiring the system to remember entities, circuits, and comparisons.
Solution:
Implemented a memory layer that stores conversation context and passes relevant information to the orchestrator agent for subsequent queries.
4. Race Prediction Reliability
Naive prediction models simply favored championship leaders regardless of track characteristics.
Solution:
Built a dedicated prediction engine that incorporates recent form, track history, constructor strength, podium frequency, average finishing position, and circuit-specific performance.
5. Performance Optimization
Real-time analysis across large historical datasets created noticeable latency.
Solution:
Precomputed driver intelligence, constructor intelligence, and circuit intelligence datasets that can be retrieved instantly by agents during execution.
Technologies used
