top of page
  • Writer's pictureRakesh Budarapu

How ChatGPT works?

San Francisco-based OpenAI craeted the ChatGPT chatbot, available for free public testing on Nov 30, 2022 . A chatbot is a software application designed to mimic human-like conversation based on user prompts.

Within a week of ChatGPT being unveiled, over a million users had tried to make the tool talk, according to Sam Altman, co-founder and CEO of OpenAI.

Who built ChatGPT?

ChatGPT is the brainchild of OpenAI, an artificial intelligence research company. Its mission is to develop a "safe and beneficial" artificial general intelligence system or to help others do so.

It's made splashes before, first with GPT-3, which can generate text that can sound like a human wrote it, and then DALL-E, which creates what's now called "generative art" based on text prompts you type in.

GPT-3, and the GPT 3.5 update on which ChatGPT is based, are examples of AI technology called large language models. They're trained to create text based on what they've seen, and they can be trained automatically -- typically with huge quantities of computer power over a period of weeks. For example, the training process can find a random paragraph of text, delete a few words, ask the AI to fill in the blanks, compare the result to the original and then reward the AI system for coming as close as possible. Repeating over and over can lead to a sophisticated ability to generate text.

GPT-4 is the fouth iteration of the GPT (Generative Pre-training Transformer) language model, developed by OpenAI, which shows a massive leap in the field of natural language processing (NLP).

This model with its ability to understand and generate human-like text, has the potential to revolutionize the way we interact with machines and automate various language-based tasks.

GPT-4 model can solve difficult problems with greater accuracy, thanks to its broader general knowledge and problem solving abilities.

How OpenAI's ChatGPT Works?

According to OpenAI their ChatGPT model, trained using a machine learning technique called Reinforcement Learning from Human Feedback also called as (RLHF), it can imitate dialogue, and give answers to follow-up questions, and accepts mistakes, challenge incorrect statement and reject inappropriate questions and bad language.

Initial development involved human AI trainers providing the model with conversations and played sides – the human user and an artificial intelligence assistant. The version of the bot available for public testing attempts to understand questions posed by users and responds with in-depth answers resembling human-written text in a conversational format.

For example, you can ask it encyclopedia questions like, "Thermodynamics Law." You can tell it, "Tell me funny joke," and when it does, say, "Now make it funnier." You ask it to write a computer program that'll show you all the different ways you can arrange the letters of a word.

We must understand one rule, ChatGPT doesn't have any knowledge on topic been discussed. It's an AI that's trained to recognize patterns in vast swaths of text harvested from the internet, then further trained with human assistance to deliver more useful, better dialog. The answers you get may sound plausible and even authoritative, but they might well be entirely wrong.

Is ChatGPT free?

Yes, for now. OpenAI CEO Sam Altman warned on Sunday, "We will have to monetize it somehow at some point; the compute costs are eye-watering." OpenAI charges for DALL-E art once you exceed a basic free level of usage.

But OpenAI seems to have found some customers, likely for its GPT tools. It's told potential investors OpenAI expects $200 million in revenue in 2023 and $1 billion in 2024, according to Reuters.

Follow the given steps to understand API model of ChatGPT

Go to website

Navigate to "API Reference" as shown below

Create a account for yourself

Under "Authentication" understand the concept of credentials

The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you'll use in your requests.

Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.

In "Playground" section of page you can try the api with your subscription

You can generate a API key for your testing as shown below.

Once you have your key generated you can test you api in postman as shown below.

Method : POST

Parameter : (None)


Authorization : Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body :

{ "model": "text-davinci-003", "prompt": "newtom image", "temperature": 0.7, "max_tokens": 3000, "top_p": 1, "frequency_penalty": 0, "presence_penalty": 0 }


To understand more about chatbot kindly refer to my other blogs


bottom of page