f1verse
f1verse · Python

How do I generate F1 race summaries without hallucinated numbers?

Build the text from f1verse.race_facts(race) and check the output with f1verse.verify(text, facts), which rejects any number or driver code the data does not support.

>>> facts = f1verse.race_facts(race)
>>> f1verse.brief(race)            # templates only, no model, no cost
'Dutch Grand Prix, 72 laps at Zandvoort. Lando Norris (McLaren) won. ...'
>>> f1verse.verify(draft, facts)
{'ok': False, 'unsupported_numbers': [1.4], 'unsupported_codes': ['VER']}

Models never calculate race facts here. Narration receives preformatted structured facts, and a generated draft only survives if every number and driver code in it appears in those facts.

brief() is also the fallback when generation fails verification. A plain sentence is always better than a wrong one.

Related