Moving Energy Forward
Case Studies
ChatGPT Glossary
The glossary on Gunvor’s website is driven by artificial intelligence (AI) and serves as an experiment for testing and introducing new ideas and technologies into our work.
We understand that for general audiences commodities trading can be at time difficult to understand—often because of its sometimes esoteric and unusual terminology, which is drawn from finance, chemistry, engineering, and numerous other sources and disciplines. Arbitrage, backwardation, esterification, these are not words used by most people every day.
To help users of this website with these terms, we decided to incorporate a glossary. As a small challenge, we thought it would be most interesting to use AI to pull information from across the internet to dynamically generate these definitions.
Development
We first tried asking ChatGPT for an AI generated definition of some terms. Our initial question was simple: What is the definition of ‘arbitrage’?
The first responses were surprisingly good. But some inconstancies were evident. Most responses were too long for our purposes, and if a definition had several meanings then often the response would be from outside our industry. Clearly, our question/prompt required refinement.
We also faced the challenge of needing to ask the same question multiple times for each of our terms and we hoped to find out if the ChatGPT API would allow us to complete the process automatically, perhaps on a set time interval.
As a testbed, we created a standalone Proof of Concept tool. This used OpenAI’s ChatGPT 3.5 API and allowed us for the first time to see multiple responses at once. It looked like this:
Twelve terms from Gunvor’s website were selected at random, and applied to a basic prompt: What is the definition of {term}? Using this tool, we could change the term list and change the prompt.
The definitions generated were good—one to two sentences accurately describing each term; however, we sought to further refine the prompt to include more precision in the answers and to provide credible sources where additional information could be found for users.
Having successfully accomplished our basic task, we then moved to integrate it into Gunvor’s website.
Making use of ChatGPT’s API commands, we generated a list of glossary terms and the results, renewed on a regular basis, would populate across the website. We currently have more than 80 terms selected from across the Gunvor site.
To head off any issues, we elected to add a suggestion feature for users, as well as include a manual override, in case any results were problematic.
Challenges
The first issue we encountered was uniformity.
The AI delivered different levels of definitions, using a variety of tones and depth of information. If we queried for a single term, it usually provided a lengthy answer, but if we ask the question for multiple terms, it gave short answers.
The URLs chosen by the AI were also inconsistent. Because content on the internet changes, ChatGPT 3.5 still has a tendency to either post old URLs or at random.
Alongside this, our initial prompt didn’t mention the industry, meaning some of the terms were not specific to commodities trading. We updated the prompt and changed the integration to ChatGPT 4, but it’s still not always providing accurate URLs. We’re now looking at how we can use plugins to help with this.
There was also the fact that we had issues with the AI just not functioning at all—at times nothing happened when updating all terms. It took a bit of time to figure out, but it was actually because of our hosting provider was blocking the request assuming it was malicious script. This shows the novelty of implanting such a tool on a corporate website, but it is clear we won’t be the last to encounter this issue.
What’s Ahead
The current version is back to running on 3.5, which is producing the most stable code—something important for its launch. There are several updates we are now working on, including side-by-side testing of versions 3.5 and 4.
All users are welcome to submit suggestions, questions, or corrections in the comment box on definition pages.
We also should note that the sources provided by this tool are for reference and are not intended to be an endorsement of the broader content on those websites.
Updated: 6 November 2023