Here we will introduce the concept of building a GPT, particularly for sports betting, using OpenAI’s GPT builder and custom knowledge bases. We’ll outline steps to create a GPT, highlight potential challenges such as hallucinations and overfitting, recommend relevant data sources for the UK and USA, and show you prompts for analysing team or player-based data.
Introduction
Building your own GPT has become a hot topic, especially one with practical applications like sports betting. Our guide will walk you through the steps of how to start building a GPT and the data needed to make it accurate.
What is a GPT?
According to OpenAI, GPT’s are:
GPTs are custom versions of ChatGPT that users can tailor for specific tasks or topics by combining instructions, knowledge, and capabilities.
Open AI
In simple terms, this means that GPT’s are custom AI tools that are configurable to your own preferences, where you use your own knowledge base, in the form of documents, Excel spread sheets etc., in order to output a better answer using your data.
How Do I Build a GPT?
According to OpenAI, you will need to follow these steps:
- Subscribe to the Premium version of ChatGPT (currently $20 USD).
- Go to the GPT Builder and select ‘Create a GPT’.
- In the ‘Create’ tab, speak to GPT and tell it what you want it to build for you. e.g.) Build me a custom sports betting bot, giving me the predicted winner, potential scores, and potential goal scorers in the Liverpool vs Manchester United match based on the the knowledge base provided.
- The GPT will then suggest a name for your GPT and give it an image.
- Upload your knowledge base and ask it questions
- If you want to monetise your GPT, you will need to publish the link to ‘Everyone’ when you save.
What is a Sports Betting GPT?
A sports betting GPT is a custom betting bot that is built using Open AI’s GPT AI tool that can take custom data and provide a probability-based outcome using a sports knowledge base.
In simple terms, this means: you give bot data, bot gives you prediction. However, as with anything probability-based, this is not a 100% certainty that the outcome provided will come true, or even that it has fully understood the data, and so checks are needed alongside a good bit of human intuition and interpretation.
What Are Some Potential Challenges?
Hallucinations
You may have heard of hallucinations. This is when a Large Language Model (LM), like ChatGPT essentially invents the answer because it doesn’t;t want to look stupid. For example, you ask it, “Who is Mo Salah” and it give you an answer like “Mo Salah was one of the greatest leaders of the 21st Century, leading the country of Live Pool into battle with the country of Wessex” – complete nonsense but said its utter and complete conviction. Think of your best friend when blagging at the pub, this is a hallucination.
Overfitting
Another risk is overfitting of data. Feeding your data to ChatGPT sounds simple enough, but your data may contain a few issues with it that might have been overlooked, for example it might not contain information that a player was recently injured, the weather conditions that the teams are playing in has historically favoured Liverpool, that home vs away game records indicate Arsenal being the favourites. All of the respective data that you add to the knowledge base will ultimately have an influence on the model prediction.
So how do I avoid making these mistakes?
- Only feed the model the most recent and relevant data – Injuries, weather, player stats – consider their inclusion and relevance.
- Ensure the data is complete and weighted correctly – if you put one players data, ensure you put all of the team’s data and have the same columns for each stat -don’t just include one player’s corner kicking stats f this is not relevant or not covered for each player.
- Check the answer GPT gives you – do not follow the answer blindly, if the answer seems improbable or counter-factual or contains elements that you know are hallucinated, then you may need to look at the data again and ensure that you are not missing anything.
OK, so with that out of the way, let’s get into building a GPT.
How do I Build a Sports Betting-Specific GPT
To build a sports betting GPT, you will need to:
- Sign-up to the Pro version of version of ChatGPT (USD $20),
- Develop your own custom knowledge base or Excel document (see below), containing player & team statistics, weather information, Home vs Away win rates and any other relevant information.
- Input the knowledge base into the ‘Configure’ tab
- Prompt GPT to analyse the data and product the outcome, scoring potential of individual players, or any other sports betting related questions.
After you have followed the steps above, you will need to address the two most important parts:
- Building a detailed knowledge base
- Asking the right prompts
How Do I Build a Sports Betting Knowledge Base?
This is where the fun begins. Firstly, we don’t recommend trying to compile all of the data yourself. This will take way too long and is completely inefficient, there are several services out there that will get you the data for relatively little money.
Get US Sports Data
We recommend a few providers for ALL US sports data.
- My Sports Feeds: prices range from $35 (CAD) a month to well over $1000, for your purposes, you may only need the lowest package they offer – this is one of the best we found, offering a wide variety of sports data.
- Sports Reference: This provides Baseball, Basketball, and even college sports. Prices start from only $8 a month.
- Sports Radar API: Only for the developers out there who want a real-time API for usage in GPT-4 API deployment locally to build their own betting bot, this is a cost-effective solution at scale.
Get UK Sports Data
We recommend a few sites for UK based sports data.
Football
- Footy Stats: Premier League, EFL & more for only £19.99 a month sounds like a great deal to me – it also offers it downloadable as a CSV file, perfect to build your GPT.
Cricket
- ESPN Cric Info: Daily terrible name but given its completely free I have no complaints here but it definitely takes more getting used to – you will have to ‘Print’ the page to get the data you want in the format to input into GPT – but it might be more difficult to read that Footy Stats.
Horse Racing
- BHA: British Horse Racing Authority provides month-over-month sports data in nice packages, again, completely free, although some of theta is irrelevant to the betting probabilities, it’s still nothing to shake a stick at given the level of detail!
Those are some of favourite sources in 2024, and should get you started. This list may be updated in future and we are happy to speak to you if you have additional sources, so fee free to suggest some more and we be sure to check them out. Now that, you have the data, let’s move onto the next step.
How Do I Prompt My Sports Betting GPT?
This one is fairly simple, once you have the data, and have uploaded it to your custom sports betting GPT, all you need to do is prompt it to give you the right answers.
Depending on your data this might come in several forms.
- Team-Based Data: If your information is based on individual team based data like those provided by Footy Stats, you will need to keep your prompts team based. Here is a stats page for Liverpool. Once you download this as a CSV, download the competitors CSV file and upload both to your GPT. You will only want to ask about the team in a ‘vs’ style prompt. See example below.
Team ‘Vs‘ Prompt.
Based on the knowledge base provided, give me a prediction on the outcome of a [home/away] match of [Liverpool[ vs [Man City[. Be specific and give all possible outcomes of the match giving the likelihood of win for each team based on the past data.
2. Player-based Data: If you want specific player information, you will need to get the specific data, here is one for Erling Haarland. This will give you the stats of goals per 90 minutes, assists, yellow cards etc. all of this data will help you in assessing the probability of certain events happening. See example below.
Player ‘Outcome‘ Prompt
Based on the knowledge base provided, give me a prediction of [player name] [getting a yellow card / scoring a goal etc.] in the next game given the historical data. Be specific providing a rationale and all other possible outcomes that are likely given these statistics.
Evaluating Your Sports Betting GPT
Now that you have all the pieces of the puzzle, hopefully this gives you an insight into how you can build your own sports betting GPT.
However, as we mentioned at the beginning of this article, you must assess the output of GPT vs a common sense check, before wagering any real money. Please practice responsible gaming and always check, review and take any result with a large pinch of salt. GPT, like any human, does not know the outcome of a future event or scenario and can only make predictions based on the data you give it. It is also prone to hallucinations and other issues.
Conclusion
Building a Sports Betting GPT is a fun, novel and exciting process, that can be accomplished by using OpenAI’s GPT builder, access to a database / source of information and a bit of time and perseverance. Treat any output from the model as an addition to your existing knowledge or hypothesis, do not rely solely on this data as the main justification for a bet, and always practice responsible gaming.
Happy betting!
Author Profile
James is the founder and CEO of Free Bet and a former FTSE100 AI Director. He has years of experience in building and deploying complex AI models for products like the advanced AI sports betting algorithm used in Free Bet and is an experienced bettor since 2008.