Share on FacebookShare on TwitterShare on LinkedinShare via emailShare via Facebook Messenger

GPT-4 Basics: How It Works and How to Use It

Updated on April 9, 2024AI

GPT-4 is a versatile generative AI system that can both interpret and produce a wide range of content. Learn what it is, how it works, and how you can use it to create content, analyze data, and much more.

Table of contents

What is GPT-4?

GPT-4 is a highly adaptable generative AI tool that supports multimodal inputs. This means it is capable of interpreting and processing a wide range of content, not just text, but also audio and images. Users can feed it various types of data, and in return, GPT-4 can produce outputs that include detailed written passages, in-depth explanations, computer code, and creative compositions, all in a manner that closely mimics human thought and language patterns.

What makes GPT-4 different from ChatGPT

GPT-4 and ChatGPT are closely related but not the same. ChatGPT is a chatbot with which people can have conversations with the underlying Large Language Model (LLM). Essentially, ChatGPT is the conversational interface to the model. You can enter text prompts in natural language, and ChatGPT will respond with answers to your prompts.

ChatGPT can run on various versions of the GPT model. By default, the free version of ChatGPT gives you access to GPT 3.5. With a paid subscription, you can get access to GPT-4.

GPT-4 vs. GPT-4 Turbo: What’s the difference?

GPT-4 Turbo is a faster and more cost-effective version of GPT-4 that’s suitable for large-scale applications. In fact, the most recent version of GPT-4 Turbo is more affordable and capable than GPT-4. GPT-4 Turbo also has a longer context window, which means you can send up to 300 pages of text in your input prompts.

Overall, the choice between GPT-4 and GPT-4 Turbo depends on an application’s specific requirements, particularly in terms of response complexity, speed, and operational costs.

Who created GPT-4?

OpenAI, an artificial intelligence firm in San Francisco, created GPT-4. OpenAI was founded in 2015 to create artificial intelligence that’s “safe and benefits all humanity.” The company is behind several leading AI platforms, including DALL-E and Codex.

OpenAI released GPT-4 on March 14, 2023.

How does GPT-4 work?

GPT-4 doesn’t pull its responses from a database of knowledge. It generates one word at a time, predicting each word as it goes. Its predictions are based on statistical patterns it identified by analyzing large volumes of data.

The technology that makes this advanced analysis possible is called a Generative Pretrained Transformer (GPT). GPT is the name given to a family of LLMs made by OpenAI. Let’s look at how researchers train GPT models to better understand how they work.

How GPT models are trained

The GPT model training process is broken up into two stages: pre-training and fine-tuning.

During pre-training, the model processes and analyzes large volumes of data from the internet and licensed data from third-party sources. It identifies patterns and correlations between words and images to understand meaning and context. It also learns the structures of sentences, paragraphs, and various types of content, like poetry, academic papers, and code.

GPT models use an advanced neural network architecture called a transformer. The transformer is key to the model’s ability to parse through large volumes of data and learn independently. The transformer allows the model to process and learn patterns from the training data, which enables GPT models like GPT-4 to make predictions on new data inputs.

The next stage of training is fine-tuning. At this stage, the model is refined to perform specific tasks, such as generating conversational responses. The model learns how to provide the answers people want through reinforcement learning from human feedback (RLHF). Humans rate the model’s responses, and the model tries to get more positive feedback with each subsequent response. The fine-tuning stage is also an opportunity to minimize biases and reduce harmful responses.

Previous GPT models

GPT-4 is the fourth iteration of OpenAI’s GPT models. Here’s an overview of how the model family has evolved.

  • GPT-1 was introduced in 2018. It was trained on BookCorpus, which consists of 7,000 unpublished fiction books. This model proved that the GPT framework could achieve a natural language understanding.
  • GPT-2 was introduced in February 2019. It was trained on 8 million webpages. The training goal was to create a model to predict the next word in a text after being given all the previous words. Researchers pushed the model beyond its training by asking it to generate arguments. The result was an essay that a human could have written. Although GPT-2 performed inconsistently, it could answer questions, translate text, and summarize long content.
  • GPT-3 was announced in the summer of 2020. OpenAI referred to it as a general-purpose text generation platform. The dataset that trained GPT-3 contained more than one trillion words. Unlike its predecessors, GPT-3 could generate code. GPT-3 acted as the base for ChatGPT, the AI-powered chatbot.

GPT-4 training and key capabilities

OpenAI began creating the deep learning tools used to build GPT-4 in 2021. It worked with Microsoft Azure to develop a supercomputer capable of handling the computing power and volume of data that advanced LLMs require.

GPT-4 was trained on publicly available data and data from third-party sources. Unlike previous models, OpenAI hasn’t released any information about the size of the training model, the hardware it used, or details on the training methodology.

What we do know is that GPT-4 is more advanced than GPT-3 in several ways:

  • Can accept both images and text-based prompts
  • Was trained on data up to April 2023; GPT-3’s dataset stops at June 2021
  • Performs better at creative tasks than GPT-3
  • Able to handle more complex tasks than its predecessor, such as analyzing graphs
  • Can handle longer prompts up to 25,000 words
  • Is more likely to stay within guardrails for allowed content
  • Generates more accurate responses
  • Is better at adapting to user requests, such as your brand personality or writing style

OpenAI also used several tests to validate GPT-4’s aptitude. It performed well on AP exams, the Uniform Bar Exam, the Olympiad Exam, the LSAT, and the GRE Quantitative exam.

Is GPT-4 free?

You have to pay to use GPT-4 directly from OpenAI. There are two ways to access it.

With a paid subscription to ChatGPT Plus, you get access to GPT-4. You can then converse with ChatGPT on the web or with apps for Android and iOS.

Developers can access GPT-4 through the Developer API. With the API, you pay a set rate for tokens. There’s one rate for prompt tokens—the tokens you use in your “question” to the LLM, and another for completion tokens, the tokens used in the “answer” you receive from the LLM.

Here’s how tokens work:

  • Each input and output is broken down into tokens. Prompt tokens refer to the text and files you provide in your request to GPT-4. Completion tokens refer to the text generated by GPT-4 in its response.
  • Before GPT-4 processes your request, the input is broken down into tokens. These tokens are not the same as syllables, or logical word fragments, they can include spaces or sub-words.
  • There are a few rules of thumb to understand the “exchange rate” between words and tokens. In English, four characters roughly translate to one token, and seventy-five words roughly translate to 100 tokens. In other languages, this ratio does not hold, and each word likely translates to a higher number of tokens.

Another way to access GPT-4 is through Microsoft’s Copilot AI. Copilot is a chatbot that runs on GPT-4. Copilot is available online and through mobile apps.

What you can do with GPT-4

GPT-4’s ability to interpret nuance, process more complex prompts, and accept images means it has a wide range of potential applications. However, like all current AI systems, GPT-4 has limitations that require thoughtful use.

Let’s start with some ways you can use it within the ChatGPT platform.

Analyze images

You can upload an image in GPT-4 and ask to perform tasks based on that image. Here are some of the image analysis tasks you can request GPT-4 to complete:

  • Interpret data in a chart or graph
  • Describe an image, including what the subjects of the image are doing and how many of them there are
  • Read and analyze photos of text, such as historical documents
  • Turn handwritten notes into text
  • Identify what’s funny, sad, or surprising about an image

Generate text

GPT-4 can generate original text content for formal communications, business activities, or personal tasks. Here are a few examples:

  • Write training materials
  • Create procedural documents, handbooks, and policies
  • Translate content in different languages
  • Answer basic research questions, like how many provinces are in Kenya or how air purifiers work

Generative AI is widely used for text creation, but if you need a writing tool that integrates seamlessly with your current workflow, Grammarly might be the better choice. It’s employed by individuals and teams alike for brainstorming, composing, and revising content directly within over 500,000 apps and websites. This eliminates the need to copy and paste your work between platforms.

Work smarter with Grammarly
The AI writing partner for anyone with work to do

Generate creative content

GPT-4 boasts better creative writing capabilities than its predecessor, GPT-3.5. In particular, it’s better at maintaining the cohesiveness and consistency of a narrative.

Here are some ways to use these capabilities:

  • Create fictional creatures with descriptions of how they look, their history, and lore
  • Describe an image with prose written in a particular style
  • Outline a short story
  • Draft blogs, social media captions, and marketing communications content
  • Explain a complex topic, like software development, in the format of a poem

Write code

GPT-4 can write, translate, and optimize code in dozens of programming languages. You can generate and analyze code in several ways:

  • Upload a drawing of a website layout and ask GPT-4 to generate code that matches it
  • Describe what you want the code to do in natural language
  • Paste in existing code and ask GPT-4 to identify errors
  • Get an easy-to-understand description of what a snippet of code does

Summarize and analyze content

GPT-4 can parse through large volumes of data to track data trends, summarize texts, and explain content. You can enter text directly into the application or upload files in every popular format.

GPT-4 can read and analyze content for a variety of applications:

  • Identify sales trends in an Excel document
  • Write a 250-word summary of a long, complex text, like an academic article
  • Find similarities between two articles
  • Explain the plot of a short story, with details about the writing style and themes
  • Review texts and provide suggestions for improvement

GPT-4 API use cases

Developers use the GPT-4 API to create new applications and add features to existing ones. Here are some of the more common categories these applications fall into.

Content generation

Although ChatGPT can generate content with GPT-4, developers can create custom content generation tools with interfaces and additional features tailored to specific users. For example, GPT-4 can be fine-tuned with information like advertisements, website copy, direct mail, and email campaigns to create an app for writing marketing content. The app interface may allow you to enter keywords, brand voice and tone, and audience segments and automatically incorporate that information into your prompts.

Chatbots

GPT-4 can serve as the basis for conversational AI platforms. Developers can create custom chatbots for specific functions, like customer service, embodying a character or historical figure, or answering homework questions.

Custom assistants

GPT-4 can power AI assistants tailored to specific industries, professions, or interests. For example, you can create an assistant for legal professionals or for brainstorming creative ideas.

Sentiment analysis

GPT-4 can serve as the basis for sentiment analysis apps, which scan reviews and social media to find common themes in customer feedback and public opinion.

Assistive technology

GPT-4 opens up new possibilities for making the world more accessible. For example, it can provide text descriptions of images for visually impaired people.

Advantages of GPT-4

GPT-4 offers many features and functionalities. Here are a few examples of GPT-4’s capabilities.

It’s multimodal

GPT-4’s ability to accept images, files, and text enables it to perform complex tasks. These multimodal capabilities expand the potential of nearly every GPT-4-based application.

Here’s how you can benefit from GPT-4’s multimodality:

  • Add greater context and depth to prompts using multiple sources. For example, a restaurant chain can use GPT-4 to scan photos and captions from social media to assess customer sentiment. This allows them to do more than capture positive and negative words in social posts. They can also see which photos of food items tend to have positive captions and which ones tend to have negative captions.
  • Save time. Since you can add attachments directly to the platform, you don’t have to write your own summary of the file or image related to your prompt. GPT-4 can also automate tasks like product descriptions and reports. Simply upload an image or raw data and prompt GPT-4 to generate a response that fits within your guidelines.
  • Create multi-step prompts. GPT-4 can take information from an image and perform complex tasks with it. For instance, you can upload a photo of a rehearsal schedule for a play and ask GPT-4 which days and times the lead characters are scheduled to rehearse.

It’s better at understanding nuance

GPT-4 is especially good at detecting nuances like emotion, dialects, and colloquialisms in written text. It can also infer meaning without you having to say things directly.

The ability to understand nuance makes GPT-4’s output even more human-like:

  • Generate authentic-sounding dialogue between characters from different places
  • Assess the emotions of people in an image and write content targeted to those emotions
  • Allow humans to write natural-sounding prompts and respond with contextually accurate content

It’s flexible

Although chatbots are some of the most popular applications created with GPT-4, the model can power many generative AI applications. This is because you can fine-tune GPT-4 on your own dataset. Then, you can integrate it with existing applications or create new ones that look and feel like your brand. Because of that flexibility, developers in every field, from medicine to consumer goods, can innovate with GPT-4.

Here are some of the ways you can use GPT-4’s flexibility:

  • Offer customers self-service tools
  • Enable non-technical people to do technical tasks, like coding
  • Create custom recommendations for music, books, podcasts, etc.
  • Automate manual tasks, like medical documentation

Disadvantages of GPT-4

GPT-4 is an advanced generative AI platform, but it has drawbacks. Here’s what to be on the lookout for when you use it.

It can produce inaccurate answers

All generative AI platforms are prone to producing inaccurate information. AI researchers refer to these inaccuracies as hallucinations. Although GPT-4 is more accurate than its predecessors, it doesn’t verify information and it doesn’t know when it’s wrong. Its creators mention that it can be confidently wrong. Because of these inaccuracies, developers should be thoughtful when considering whether to integrate GPT-4 into their applications. If the application has limited error tolerance, then it might be worth verifying or cross-checking the information produced by GPT-4.

It has a limited information base

GPT-4’s training dataset only goes up to April 2023, which means that it doesn’t include the latest news and trends in its responses. If you use GPT-4 for research, it won’t have up-to-the-minute insights. It may be out-of-date on topics like technology, where information changes quickly.

Developers can work around this limitation by fine-tuning the model with more up-to-date data or creating applications that add online search capabilities to the model.

It can be costly to access

The only way to access GPT-4 for free is through Microsoft’s Copilot AI. If you prefer to use it through ChatGPT, it costs at least $20 per month. Depending on your needs and your budget, that may be prohibitive.

Furthermore, developers might find the API access to GPT-4 to be expensive, especially if they are running a popular application that uses a lot of tokens.

GPT-4 and the generative AI landscape

GPT-4 is one of the leading generative AI platforms because of its advanced processing abilities, multimodal capabilities, and flexibility. Everyday users can create original content with GPT-4 through a premium subscription to ChatGPT. Developers can use the API to build new applications and improve existing ones.

Though GPT-4 has many applications, its inaccuracies and costs may be prohibitive for some users. However, it’s just one of many generative AI platforms. Keep your ear to the ground to stay updated on the latest AI tools and what you can do with them.

Your writing, at its best.
Works on all your favorite websites
iPhone and iPad KeyboardAndroid KeyboardChrome BrowserSafari BrowserFirefox BrowserEdge BrowserWindows OSMicrosoft Office
Related Articles
Writing, grammar, and communication tips for your inbox.