Skip to content

ShowcasedPath oneLearning & education

Pit Wall

An F1 quiz for newcomers where every answer comes from a GROQ query over real race results.

by Hem Bahadur Pun

Questions answered correctly when graded by the agent's GROQ query
30/30
Correct for the same model with no data access; random guessing gets 7 or 8
16/30
Hard questions the same model answered correctly without data
3/10

What it does

Pick a Grand Prix and a tyre, then answer one question per lap.

Players choose a 2026 race and a tyre that sets the difficulty, from single race facts to season-long trends. Five questions follow, each with a card explaining the F1 term it used.

A drawer shows the exact query that graded each answer. Players can also ask a race engineer agent follow-up questions; it lists the queries and rules entries it used and says when the data cannot answer.

The problem

Language models answer F1 stats questions confidently and often get them wrong.

Newcomers do not know terms like pole, DNF or undercut, and a quiz that teaches them has to grade correctly. Given 30 of the app's questions without data access, the same model got 16 right, and only 3 of 10 hard ones. The race data has traps too: sprint points sit in standings, and grid position misleads after penalties.

What they built

F1 results since 2014, one document per driver per race.

6,254 documents from F1DB covering 2014 to round 15 of 2026; 15 Knowledge Base entries from 9 Wikipedia articles; 222 banked questions.

  • raceResult

    One driver's finish in one race, referencing the race, driver and team.

  • race

    One Grand Prix that race results reference.

  • driver

    One driver, referenced by race results.

  • team

    One team, referenced by race results.

  • driverStanding

    Driver championship standings, the only place sprint points are recorded.

  • teamStanding

    Team championship standings, including sprint points.

  • quizQuestion

    One verified question, saved so it can be served again without calling the agent.

  • quizRun

    One player's finished race and its score.

The stack

Two Context endpoints: one for data, one for rules.

  • Sanity Context MCP
  • Knowledge Base
  • Content Lake
  • GROQ
  • Sanity Studio
  • Vercel AI SDK
  • gpt-5.4-mini
  • OpenAI
  • F1DB
  • Python
  • Vercel

The hard part

The agent writes each question and a query; the query decides the answer.

The agent never grades. With each question it submits a GROQ query, the server runs it against the race data, and the single value returned becomes the answer. A malformed result gets one retry.

The answer is encrypted into the question so the browser cannot read it, and the server keeps no per-player state. Data and rules sit on separate endpoints because one combined endpoint silently ignored the Knowledge Base.

More from path one

See the full showcase