Skip to content
absoyakPublic

About

AI agent for motorsport timing data natural language queries, race prediction, and performance analytics. Built on real F1H2O Championship infrastructure.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🏁 Lapdata.ai

Motorsport Intelligence Platform — powered by LangChain, FastAPI, and local LLM

Lapdata is an AI agent that understands motorsport timing data. Ask natural language questions about race results, lap times, penalties, and driver performance — and get answers backed by real event data.

Built on real-world timing systems used in F1H2O and UIM Aquabike World Championships.


What You Can Ask

"Who had the fastest lap in Sharjah 2024 Race 1?"
"Compare Torrente's qualifier vs race performance this season."
"Which circuit has the highest DNF rate?"
"Who is most likely to win the next race at this venue, based on history?"
"Which drivers received penalties in the last three events?"

Architecture

SQL Server (timing data)
        ↓
  Python ingestion layer
        ↓
  FastAPI backend
        ↓
  LangChain Agent
    ├── SQL Tool        → lap times, results, entries
    ├── RAG Tool        → race bulletins, regulations, penalties
    └── Predict Tool    → race outcome prediction (XGBoost)
        ↓
  Local LLM (Ollama)
        ↓
  Streamlit Chat UI

Tech Stack

Layer Technology
Agent framework LangChain
API FastAPI
LLM Ollama (local, no API cost)
Vector store ChromaDB
ML prediction XGBoost
Data SQL Server / SQLAlchemy
Container Docker + Docker Compose
Future: wave data Sofar Ocean Spotter buoy API

Data Model

Events
  └── Sessions  (Qualifying 1/2/3, Race, Free Practice)
        └── Entries  (driver × session)
              └── Ticks  (finish line crossings → lap times)

Penalties  (linked to entry + session)
WaveConditions  (Sofar Ocean — schema ready, data coming 2026)

Lap times are derived from ordered tick deltas. The ingestion layer pre-computes these into a clean analytics layer so the agent works with fast, reliable data.


Roadmap

  • Data model + SQL ingestion layer
  • FastAPI skeleton + Ollama connection
  • SQL Tool — natural language → race queries
  • RAG Tool — penalty decisions, race bulletins
  • Race outcome prediction (XGBoost)
  • Streamlit chat UI
  • Docker Compose — single command setup
  • Sofar Ocean wave condition integration
  • AWS deployment

Running Locally

# Clone
git clone https://github.com/absoyak/lapdata.git
cd lapdata

# Configure
cp .env.example .env
# Edit .env with your SQL Server connection string

# Start
docker-compose up

# Open
http://localhost:8501

Requirements: Docker, Ollama installed locally with a model pulled (e.g. ollama pull llama3)


Background

Lapdata.ai is built on timing infrastructure developed for the F1H2O and UIM Aquabike World Championships — real systems operated live at international events since 2019. The data behind this agent is not synthetic; it reflects actual race conditions, timing decisions, and on-water incidents across multiple seasons.

The wave condition integration (Sofar Ocean Spotter buoy) will add environmental context to performance analysis — correlating race outcomes with sea state, wind, and visibility data.


Author

Burak Soyak github.com/absoyak · linkedin.com/in/absoyak

Chief Timing Officer, F1H2O & UIM Aquabike World Championships Imperial College London — ML/AI Professional Certificate (2025–2026)


Lapdata is designed to extend across motorsport disciplines. If you are working in F1, MotoGP, rallying, or any data-rich racing series and want to talk — reach out.

About

AI agent for motorsport timing data natural language queries, race prediction, and performance analytics. Built on real F1H2O Championship infrastructure.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages