A First Look At OpenAI GPT-4

Like so many others, I received access to OpenAI GPT-4 during the past week. Here is what to expect…

Cobus Greyling
6 min readMar 20, 2023

--

To some degree playing around with GPT-4 could be slightly underwhelming, for the following reasons…

For basic use-cases and most general use, the difference between GPT-4 and GPT3.5 models is not noticeable. Users will have to enter into more complex implementations regarding reasoning, to notice the unique capabilities of GPT-4.

In a casual conversation, the distinction between GPT-3.5 and GPT-4 can be subtle. The difference comes out when the complexity of the task reaches a sufficient threshold.
~ OpenAI

Currently GPT-4 cannot be used with images as demonstrated during the launch. …according to OpenAI, the service is not offered at the moment, but should this change, an announcement will be made to the community.

GPT-4 has been presented as a multi-modal LLM which can receive text and image input with text output.

OpenAI also states that GPT-4 is optimised for chat but is also suited for traditional completion tasks.

Significant focus has been placed on safety, and reducing the surface area of adversarial prompting and exploits. The image below lists the 12 risks identified and explored by OpenAI.

Read more about the risks OpenAI explored here.

Considering safety, the purpose of ChatML is to make explicit to the model the source of each portion of text. Drawing a distinction between human and AI text input.

In the words of OpenAI, “This gives an opportunity to mitigate and eventually solve injections, as the model can tell which instructions come from the developer, the user, or its own input.”

Here you see a list of available GPT-4 models, all available in limited beta.

OpenAI has expanded their approach of modes and specific models for each mode usage to the GPT-4 deployment.

Source

One feature which poses a threat to current LLM search and summarise applications is the introduction of a larger context window for GPT-4.

GPT-4 is able to receive more than 25,000 words in text. This is extremely helpful for:

  • Long form content creation
  • Extended conversations
  • Document search.

As seen below, via the playground making use of gpt-4–0214 a system description can be given on the top left. The user input contains an URL with an instructuion. The assistant generates a description based on the URL content and the single line request.

Finally, the same playground example, but this time in Python code, which you can copy and run in a Notebook…

pip install openai

import os
import openai
openai.api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

completion = openai.ChatCompletion.create(
model="gpt-4-0314",
messages = [{"role": "system", "content" : "You are a chatbot which can search text and provide a summarised answer."},
{"role": "user", "content" : "How are you?"},
{"role": "assistant", "content" : "I am doing well"},
{"role": "user", "content" : "[Text from:https://en.wikipedia.org/wiki/World_War_I] Describe what was the July crisis."}
]
)
print(completion)

And below the response from GPT-4:

{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The July Crisis was a series of diplomatic events and tensions during July 1914, which ultimately led to the outbreak of World War I. The crisis began on June 28, 1914, with the assassination of Archduke Franz Ferdinand of Austria by a Serbian nationalist. This event set off a complex web of political and military alliances, as major powers like Austria-Hungary, Germany, Russia, France, and Britain sought to protect their interests and avoid war. Despite diplomatic efforts, the crisis escalated over a month, resulting in Austria-Hungary declaring war on Serbia on July 28, 1914. Other declarations of war followed, and within weeks most of Europe was embroiled in World War I.",
"role": "assistant"
}
}
],
"created": 1679299003,
"id": "chatcmpl-6w4fjVPruipQKa2ih8ScaBc0u3Myy",
"model": "gpt-4-0314",
"object": "chat.completion",
"usage": {
"completion_tokens": 147,
"prompt_tokens": 66,
"total_tokens": 213
}
}

⭐️ Please follow me on LinkedIn for updates on Conversational AI ⭐️

I’m currently the Chief Evangelist @ HumanFirst. I explore and write about all things at the intersection of AI and language; ranging from LLMs, Chatbots, Voicebots, Development Frameworks, Data-Centric latent spaces and more.

https://www.linkedin.com/in/cobusgreyling
https://www.linkedin.com/in/cobusgreyling

GPT-4 System Card

--

--

Cobus Greyling

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com