Inspiration
World Cup predictions are messy. A simple chatbot can guess an answer, but it cannot reliably separate live tournament facts, team news, simulation results, and model assumptions.
I built WorldCup Oracle Agent to answer football questions the way an analyst would: check the current tournament state, read recent team news, run simulations, explain the reasoning, and remember the result.
The goal is not just to predict a winner. The goal is to build a transparent decision agent for the 2026 World Cup.
What it does
WorldCup Oracle Agent answers natural-language World Cup questions such as:
- Who will win the World Cup?
- Can Portugal still win?
- Who will win South Korea vs Czech Republic?
- What is Argentina’s path to the final?
- How do best third-place teams advance?
- Does Brazil have any locker-room or injury news?
The agent supports tournament forecasts, match predictions, rules explanations, team comparisons, team-news analysis, and path-to-final reasoning.
It also shows its work through reasoning steps, probability cards, source labels, and Data Transparency sections.
How we built it
The agent separates facts, news, simulations, reasoning, and memory.
- football-data.org provides live tournament facts, fixtures, results, and elimination state.
- GNews provides contextual team-news signals such as injuries, suspensions, squad updates, and team-context headlines.
- MongoDB Atlas stores prediction sessions, classified news signals, and cached tournament state.
- A deterministic prediction engine runs Elo ratings, Dixon-Coles match modeling, and 10,000-run Monte Carlo simulations.
- Gemini handles complex multi-step reasoning, such as path-to-final analysis and bracket reasoning.
- DeepSeek handles routine narrative generation and localization.
- The app is built with Next.js, TypeScript, Tailwind CSS, MongoDB, and Vercel.
The most important design choice is that the LLM never owns the truth. Probabilities, tournament facts, and rules come from deterministic systems. The LLM explains and localizes the result.
MongoDB Atlas as agent memory
MongoDB is not just storage in this project. It is the agent’s memory and cache layer.
The app stores:
- user prediction sessions
- detected intent types
- match and tournament probabilities
- LLM provider used
- classified GNews signals
- tournament-state snapshots
- cached fixtures and elimination status
This lets the agent persist interactions, show recent sessions in the Memory Center, avoid unnecessary API calls, and explain which data shaped each answer.
The /memory page makes this visible to judges and users.
What makes it an agent
WorldCup Oracle Agent follows a multi-step workflow:
- Understand the user’s question.
- Resolve teams and intent.
- Check tournament state.
- Pull contextual news signals.
- Run deterministic simulations.
- Escalate complex reasoning to Gemini when needed.
- Generate a user-friendly explanation.
- Save the session to MongoDB Atlas.
This makes it more than a prediction dashboard or chatbot. It is a stateful agent that plans, retrieves, reasons, simulates, explains, and remembers.
Trust and transparency
The app is designed to avoid hallucinated football analysis.
If a kickoff time or venue is unknown, the Schedule page shows TBA instead of inventing details.
If a news signal is weak, the agent says so instead of inventing an injury or conflict.
If a team is eliminated, the tournament-state gate can set its title probability to zero.
Each answer includes transparency about what data and model layers were used.
Challenges
The hardest part was making the agent reliable under messy natural-language inputs.
For example, users may ask questions in English, Chinese, or mixed language, such as “who will win Korean vs 捷克?” The resolver needed to map this to South Korea vs Czech Republic without confusing other teams or falling back to a generic champion forecast.
Another challenge was news quality. GNews can return noisy headlines, so I added conservative relevance filters and weak-signal disclosures to avoid overclaiming.
I also had to make sure Gemini and DeepSeek were used safely: they can explain and classify, but they cannot invent probabilities, injuries, official fixtures, or tournament facts.
Accomplishments
I am proud that the final app is deployed, tested, and usable as a real product.
It supports multiple football question types, live tournament-state checks, contextual news analysis, deterministic simulations, Gemini escalation, and MongoDB-backed memory.
The app also includes a Schedule page, Daily News page, Memory Center, Data Transparency cards, and a judge-friendly prompt rail.
What we learned
I learned that building an agent is less about making the LLM sound smart and more about designing the boundaries around it.
The best results came from separating responsibilities:
- deterministic systems own facts and probabilities
- news APIs provide context
- MongoDB stores memory and cached state
- Gemini handles complex reasoning
- the UI explains what happened
That separation made the system more trustworthy.
What’s next
Next, I would like to improve the squad-availability model with richer injury and call-up signals, add more official data sources, and support additional tournaments.
I would also like to expand the follow-up memory system so users can explore full scenario trees, compare alternative bracket paths, and track how live news changes the model over time.
Built With
- deepseek
- football-data.org
- gnews
- google-gemini
- mongodb-atlas
- next.js
- tailwind-css
- typescript
Log in or sign up for Devpost to join the conversation.