We are living in exciting times! OpenAI has announced the release of their upgraded models, GPT-3.5-turbo and GPT-4. These versions bring with them some powerful upgrades that are game-changers in the field of generative AI.
Breaking down: GPT-3.5-turbo vs GPT-4
OpenAI has restructured their pricing with these new models. While the expanded GPT-3.5-turbo with a context length of 16,000 tokens does come at a higher price ($0.003 per 1,000 input tokens and $0.004 per 1,000 output tokens), the original GPT-3.5-turbo has become more affordable with a 25% price cut. This means developers can use it at $0.0015 per 1,000 input tokens and $0.002 per 1,000 output tokens, which breaks down to about 700 pages of text for a dollar.
- A YouTuber, Omari Harebin, shows here how both versions differ when it comes to results:
What is function calling?
Now, let’s dive a little deeper into one of the key updates – function calling. This is a feature that lets developers instruct the models to carry out specific programming functions. Think of it as a bridge that links natural language instructions to the execution of actual code.
In practical terms, function calling allows us to create sophisticated chatbots, process natural language into database queries, or even extract structured data from text. The GPT models have been specially fine-tuned to understand when to call a function and also to return data that aligns with the function’s signature, ensuring a more reliable and structured data output.
What is extended context window?
The next major update is the expansion of the context window in GPT-3.5-turbo. To give you a sense of what this means, a context window refers to the amount of text an AI model takes into account before it generates additional text. This “memory” of prior text is crucial for coherence and relevance in AI responses. The newly beefed-up GPT-3.5-turbo version has quadrupled its context length to a whopping 16,000 tokens, giving it a greater capacity to recall and reference previous parts of the conversation. This lessens the chances of our AI pals wandering off-topic, making our interactions with them more meaningful and focused.
How to optimize usage of the models considering the new pricing?
We always need to keep a keen eye on the balance between performance and cost. Given the new pricing structure, it becomes crucial to optimize usage based on the project’s demands and budget. In scenarios where the extended context is not required, the original GPT-3.5-turbo becomes a cost-effective choice. Let’s dive deeper into both models’ advantages and disadvantages.
- Lower cost: If you are working on a tight budget, GPT-3.5-turbo is the better choice as it comes at a reduced price.
- Sufficient for most general applications: For many applications, such as creating simple chatbots or converting natural language into database queries, GPT-3.5-turbo offers adequate performance.
- Lower resource requirements: GPT-3.5-turbo can operate effectively with less computational power and memory, which can be a significant advantage in resource-constrained environments.
- Limited context window: If your application requires a more extensive context, the regular GPT-3.5-turbo may fall short as it has a relatively smaller context window.
- Less powerful function calling: While GPT-3.5-turbo can perform function calling, it’s not as advanced as GPT-4 in this regard.
- Enhanced function calling: If your application involves complex function calling, such as creating advanced chatbots, GPT-4 is a better choice due to its improved capability.
- Larger context window: GPT-4 is capable of processing a significantly larger context, which is beneficial if your application requires retaining extensive past information.
- Higher cost: GPT-4 comes at a higher price point compared to GPT-3.5-turbo, so it might not be the best choice if budget is a concern.
- Greater resource requirements: The larger context window and enhanced capabilities of GPT-4 come with increased computational resource needs. If your infrastructure is not equipped to handle this, it might be a disadvantage.
For projects needing advanced capabilities, the enhanced GPT-3.5-turbo and GPT-4 provide remarkable value despite their higher price tags. By choosing the right model for our needs, we can maximize the benefits while staying within budget.
- If you are working on a budget or with limited resources, GPT-3.5-turbo is a suitable choice.
- If your application doesn’t require extensive context memory or complex function calling, GPT-3.5-turbo will serve you well.
- If you need advanced function calling capabilities or require your AI to have a large context window, GPT-4 is the way to go.
- If budget and resources are not a constraint and you want the most advanced model, GPT-4 should be your pick.
Featured image credit: Kerem Gülen/Midjourney