Inspiration

Motorsport is drowning in data. Modern GT cars generate gigabytes of telemetry, but for amateur drivers (Bronze category) or teams without a dedicated data engineer, this data is often overwhelming. We realized that looking at complex line graphs doesn't tell the story quickly enough. Drivers don't want to calculate standard deviations in their heads; they want to know "Why was I slow?" and "How do I fix it?".

Inspired by the role of a Race Engineer who talks to the pilot over the radio, we wanted to bridge the gap between raw CSV data and human conversation. We asked ourselves: What if your data could talk back to you?

What it does

The GR Race Strategist is an AI-powered racing assistant that ingests Toyota GR Time Cards and turns them into instant, actionable coaching.

Instead of static charts, the application offers:

  1. Automated Context: It instantly calculates key metrics like Theoretical Best Lap, Delta vs. Optimal, and a "Consistency Score" based on lap time standard deviation.
  2. Conversational Analysis: The core feature is a Chatbot Interface. A driver can ask questions in natural language, such as "Am I consistent enough?" or "Where am I losing time compared to my best lap?".
  3. Sector-Specific Coaching: The AI analyzes specific sectors (S1, S2, S3) to pinpoint exactly where the performance drop-off occurs, rather than just looking at the total lap time.

How we built it

We built the project using a clean, modular Python architecture:

  • Data Processing (Pandas): We created a custom RaceDataLoader to parse the specific formatting of Toyota's Time Cards (handling mm:ss.ms formats) and clean the dataset.
  • Logic Engine: We implemented statistical algorithms to calculate the Theoretical Best Lap (sum of best sectors) and consistency metrics.
  • The "Brain" (OpenAI GPT-4o): We engineered a specific system prompt that feeds the calculated stats into the LLM, giving it the persona of a professional, direct, and technical Toyota Race Engineer.
  • Frontend (Streamlit): We used Streamlit for the user interface to ensure rapid prototyping and a clean, data-centric dashboard that is easy to visualize on a tablet or laptop.

Challenges we ran into

Our biggest challenge was the nature of the dataset. We initially planned to analyze driving inputs (throttle/brake traces), but the available dataset was "Time Cards" (sector times and top speeds) rather than granular telemetry.

This forced us to pivot our strategy. Instead of analyzing driving inputs (e.g., "you braked too late"), we pivoted to analyzing strategy and consistency (e.g., "you are losing 0.5s in Sector 2 every other lap"). We had to rewrite our logic to extract maximum value from sector times and consistency variance, which ultimately resulted in a more strategic, high-level tool.

Accomplishments that we're proud of

  • The "AI Persona": We managed to fine-tune the prompt so the AI doesn't sound like a generic bot. It uses racing terminology ("Purple sectors", "Delta", "Consistency") and gives brief, radio-style feedback.
  • Rapid Pivot: Successfully adapting the entire project scope to the available data format without losing momentum.
  • Clean Architecture: The code is structured professionally (separation of concerns between Loader, AI, and UI), making it scalable for future features.

What we learned

  • Data Context is King: Giving raw data to an LLM isn't enough. Pre-calculating insights (like the difference between an actual lap and a theoretical optimal lap) before sending the prompt drastically improves the AI's reasoning.
  • Motorsport Metrics: We learned a lot about how consistency is just as valuable as raw speed in endurance racing context (GT4/GT America).
  • Streamlit capabilities: We pushed the limits of Streamlit's chat interface to create a seamless "Race Engineer" experience.

What's next for your racing analyst

  • Granular Telemetry: Incorporating brake pressure and throttle position datasets for more detailed corner-by-corner analysis.
  • Multi-Car Comparison: Allowing the AI to compare the driver's data against a teammate's reference lap to find differences in racing lines.
  • Real-Time Voice Mode: Implementing speech-to-text so the driver can talk to the app immediately after a session without typing.

Built With

Share this project:

Updates