ChatGPT: A Game-Changer in the World of AI?

ChatGPT, a chatbot capable of conducting conversations in a human-like manner, has made headlines both in specialized technology publications and mainstream news. Some experts predict that this marks the beginning of a new era in AI. The president and co-founder of OpenAI, Greg Brockman, expressed his excitement about the release of ChatGPT by tweeting: “Prediction: 2023 will make 2022 look like a sleepy year for AI advancement & adoption.”

Some experts call the bot “the killer of Google” due to its potential to revolutionize internet search. With ChatGPT, instead of sifting through a vast array of pages to find the information you need, you can receive a clear and concise answer in mere seconds.

Is ChatGPT really that powerful? If so, what kind of impact could it have on technology and society as a whole? In this blog post, we have compiled all that is currently known about the bot, as well as the results of our own experiments with it.

What is ChatGPT?

ChatGPT is a chatbot developed by OpenAI, capable of performing text generation and language translation tasks. Its key feature is the ability to produce text resembling human writing in response to given prompts. Moreover, it is able to recall and reference previous statements and questions in a conversation. The applications of ChatGPT include a wide range of tasks, from answering questions to generating creative writing (yes, it can write poems and film scripts!) and even playing the role of a Linux system. As it is trained on vast amounts of data, it can be very accurate in the information it provides.

What makes it so attractive for business is that it can also be fine-tuned for specific use cases: running chatbot customer service, answering questions on online platforms, personalizing content for social media, and many others. ChatGPT utilizes the advanced GPT-3.5 architecture, which is currently one of the comprehensive language models available. This makes it a powerful tool for natural language processing and opens up broad opportunities for big data analysis.

How to use the new chatbot developed by OpenAI

To start using the bot, you have to follow just a few basic steps:

  1. Go to chat.openai.com and sign up for an account.
  2. Locate ChatGPT on the bottom left of the page.
  3. Click on “Try it now.”
  4. Type the question you wish to ask into the box at the bottom.

I would recommend being creative when posing questions: tricky queries, sometimes containing contradictions, is a good way to test ChatGPT’s full potential.

What is ChatGPT capable of?

The bot can provide intelligent replies to virtually any question and fulfill tasks from writing a blockbuster movie script or a college essay to generating code for an app. The results, especially after several iterations, are impressive. Below are a few examples from the massive body of ChatGPT-generated content internet users have been discussing on various platforms.

It can provide you with some business ideas:

What is ChatGPT capable of

It can draft quiz questions:

Quizz questions by ChatGPT

It can generate code:

AI-generated code

With the help of the ChatGPT, you can also develop simple games like Pong or a custom calculator even if you don’t have programming skills. This means that an experienced programmer can use it to carry out some simple tasks and speed up prototyping.

Game development with the chatbot

It should be noted that the chatbot can imitate statistical patterns in the text but cannot reason. So it can contradict itself, lie convincingly, and make logical and mathematical mistakes:

Logical mistake

A few more experience reports:

Artificial language

Some users have tried to compose music with the bot, even though it is not designed to produce music scores. One example of the process is explained in this video:

My personal experience with the chatbot

Having read and seen so many exciting reviews about ChatGPT, I also felt the urge to give it a shot and see its potential. After signing up, I found myself on the home page, which is available in the light and dark modes and looks like this:

Light mode
Dark mode

I appreciated the simple and straightforward design without any unnecessary details.

I first tested ChatGPT by asking it the questions provided in the examples. The responses were satisfactory, so I let my creativity flow.

Here are a few examples of the results.

Question:

What are the features of the generations that are alive today?

Answer:

Each generation has its own unique characteristics, shaped by the historical events, social trends, and cultural norms of the time period in which they were born. Here is a summary of some of the key features of each of the seven generations listed above:

  1. The Greatest Generation (also known as the G.I. Generation): This generation lived through the Great Depression and World War II. They are known for their strong work ethic, sense of duty, and loyalty.
  2. The Silent Generation: This generation was shaped by the post-World War II economic boom and the emergence of the Cold War. They are known for their practicality, discretion, and respect for authority.
  3. Baby Boomers: This generation was born during a time of great social change and political activism. They are known for their optimism, individualism, and desire for personal fulfillment.
  4. Generation X: This generation came of age in the midst of social and economic changes, including the rise of technology and the decline of traditional institutions. They are known for their skepticism, self-reliance, and adaptability.
  5. Millennials (also known as Generation Y): This generation has grown up with technology and social media, and they are known for their familiarity with digital tools and their desire for work-life balance.
  6. Generation Z (also known as Gen Z): This generation is marked by the widespread use of smartphones and social media, and they are known for their connectivity and reliance on technology.
  7. Generation Alpha: This is the current youngest generation, and they are known for their digital native status and their reliance on technology from a very young age.

Again, these are broad generalizations and there is a lot of diversity within each generation. It’s important to remember that individuals are more than just their generation, and that people of all ages can have a wide range of characteristics and experiences.

The format of the above response is typical for queries that require factual information. ChatGPT begins with a generic introduction, then offers several facts, and ends with a suggestion to consider additional information for a more comprehensive understanding. For instance, when asked about the top yoga apps available, the bot provided the following response:

“There are many great yoga apps available, and the best one for you will depend on your specific needs and preferences. Here are a few highly rated yoga apps that you may want to consider… It’s a good idea to try out a few different apps to see which one works best for you. Many apps offer free trials or have a limited number of free classes available, so you can try them out before committing to a subscription.”

When I asked “What new professions will emerge within the next five years?”, the bot provided a list of five fields with brief descriptions, including areas such as artificial intelligence and machine learning, virtual and augmented reality, cybersecurity, sustainability, environmental protection, and health and wellness. The conclusion read, “It is important to note that these are just a few examples and that new professions may emerge in other areas as well. It is always a good idea to stay informed about developments in your field and to be open to learning new skills and adapting to new technologies.”

I attempted various types of tasks such as creating a business plan for an IT startup, writing a script for a Tim Burton film, and conducting a semantic analysis of Chapter 1 of “Jane Eyre” by Charlotte Bronte. The results were promising, and although they lacked some specifics, they could certainly serve as a foundation or template for further work.

After that, I decided to test the bot’s self-awareness by asking it questions about its capabilities. This is what I discovered.

How can ChatGPT be improved
Can the chatbot become better than humans

The following day, I continued my exploration of the power of AI but was notified of possible disruptions as the website was experiencing “exceptionally high demand.” I was still able to use the API for several hours, after which it was no longer available.

At capacity right now

The issue was eventually resolved, and taking inspiration from the poem example above, I generated a limerick about Swedish weather:

Limerick about the Swedish weather

Overall, my experience with ChatGPT was up to the mark. The bot was able to generate well-written texts in various styles. The grammar was correct, but the texts sometimes lacked depth, which is a limitation of the current technology. Despite this, it can be a useful tool for writers, but the texts generated by the bot should be fact-checked and expanded upon for certain subjects.

Tutorial: creating a ChatGPT app with OpenAI API

We’ll now test the capabilities of the ChatGPT infrastructure by creating a simple web application called Phone Finder. This application will allow users to search for an appropriate smartphone by listing their desired technical specifications, price range, and other preferences such as color, brand, or manufacturer. The application will provide recommendations in just seconds.

As a baseline, we’ll use the application available in OpenAI Python quickstart repository as a skeleton. The application is implemented using the Python programming language and Flask.

Setup

To start working with the application, clone it from the GitHub repository.

$ git clone https://github.com/openai/openai-quickstart-python

First, we’ll create a virtual environment to operate in.

$ python -m venv venv
$ . venv/bin/activate

Then we need to add two more libraries to the applications requirements in the requirements.txt file. Open the file and paste the following lines at the bottom of the file. These libraries will be used to find an image to represent the smartphone.

bs4
lxml

Now, we can install all requirements by running the following command:

$ pip install -r requirements.txt

To use the app, you also need an OpenAI API key. To get it, you need to sign up or log in your OpenAI account, go to the API keys section, and create a new secret key.

New OpenAI accounts get $18 of credit that expires in 3 months from account creation, if you want to use GPT more, you’ll need to sign up for a paid plan.

Once you have created a secret key, add it as an environment variable with the name OPENAI_API_KEY – the app will need it. You can do that by using the export command.

export OPENAI_API_KEY=replace_with_your_secret_key

Frontend

To implement the app, we need to edit two files in the example application.

The first file is index.html in the templates folder. This file is the backbone of the front page we want to create. You can customize the layout, text, font, and images displayed.

Here’s a simple snippet of code to invite the user to enter their desired phone specifications and a button to generate recommendations:

<!DOCTYPE html>

<head>
  <title>Phone Finder</title>
  <link rel="shortcut icon" href="{{ url_for('static', filename='phone.png') }}" />
  <link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}" />
</head>

<body>
  <h3>Phone Finder</h3>
  <form action="/" method="post">
    <input type="text" name="specs" placeholder="Enter the desired specs" required />
    <input type="submit" value="Generate recommendations" />
  </form>
  {% if result %}
  <div class="result" style="max-width: 800px; margin-bottom: 30px;">{{ result }}</div>
  <img src="{{url_for('static', filename='tmp.png')}}">
  {% endif %}
</body>

This is how it will look on the browser. (You need to serve the app using the flask run command in the terminal to open it. It will be served on http://127.0.0.1:5000/.)

Example GPT app

The last few lines with the if-endif structure in the index.html file are important to notice. The site is structured as a single page that functions in two modes: if no requests have been made, it shows a blank field, as in the picture above. But if a recommendation request is recorded, it will also show the result generated by ChatGPT and the relevant picture of the phone. To implement this, we need to edit another file: app.py.

Backend

app.py is responsible for handling requests that the page receives.

import os

import requests
import urllib.request
import openai
from urllib.parse import unquote
from bs4 import BeautifulSoup
from flask import Flask, redirect, render_template, request, url_for


app = Flask(__name__)
openai.api_key = os.getenv("OPENAI_API_KEY")


@app.route("/", methods=("GET", "POST"))
def index():
    if request.method == "POST":
        specs = request.form["specs"]
        response = openai.Completion.create(
            model="text-davinci-003",
            prompt=generate_prompt(specs),
            temperature=0.4,
            max_tokens=1000
        )
        return redirect(url_for("index", result=response.choices[0].text))

    result = request.args.get("result")

    if result is not None:
        search_query = result[:50]
        url = 'https://www.google.com/search?q={0}&tbm=isch'.format(
            search_query)
        content = requests.get(url).content
        soup = BeautifulSoup(content, 'lxml')
        image = soup.findAll('img')[1].get('src')
        src, headers = urllib.request.urlretrieve(image, 'static/tmp.png')
    else:
        src = ''

    return render_template("index.html", result=result)


def generate_prompt(specs):
    return """Make suggestion of a smartphone based on this specs: {}""".format(
        specs.capitalize()
    )

As mentioned above, the app can perform two main tasks: generate a recommendation text from ChatGPT based on the request and find a relevant image of the desired phone from a Google search.

All of this is done in the index() function, which serves as the entry point of the Flask app. It works as follows: if the app registers a POST-type request (generated by the button on the page), we ask OpenAI to generate text based on the formatted query. This query is formed in the generate_prompt() function and looks like this: “Make a suggestion for a smartphone based on these specs: YOUR WISHES FROM THE FORM.”

After getting a result, we send it to the HTML form that was present in the last lines of the index file. After that, if a result is generated, we request a Google image search with the help of the requests and BeautifulSoup packages, download the most relevant image, and save it to the static directory so we can display it in the form. And that’s it!

Once we understand how the app operates, we can conduct a test. For example, if I am looking for an affordable Android smartphone with 64 GB of storage and a long-lasting battery, I would input those specifications into the form: Android, 64 GB of storage, long-lasting battery, affordable. Now click the button to see the results!

Example GPT app - result

What technology does ChatGPT use?

ChatGPT is based on the GPT-3 language model that uses the transformer architecture, first introduced in 2017 in the Google Brain report titled Attention is All You Need. ChatGPT is a specialized, smaller-size variant of GPT-3 intended specifically to produce natural language text for chatbot discussions.

The GPT-3 architecture is a neural network that comprises multiple layers of interconnected nodes. Each node is set to handle a certain aspect of the given text, such as its meaning, syntax, or context. As the text moves through the network, the nodes collectively generate a grammatically correct and sensible response.

To enable ChatGPT to comprehend and generate human-like responses in dialogues, GPT-3 was trained on vast amounts of code-related information and data from the internet, including extensive sources of conversational data such as Reddit. Additionally, the model was refined using a technique called Reinforcement Learning with Human Feedback (RLHF), which helps it understand the expectations of humans when asking a question. This is a significant advance compared to simply teaching the model to predict the next word.

The initial version of GPT, called GPT-1, was released by OpenAI in 2018. The following year, GPT-2 was gradually rolled out, with the first version (GPT-2 117M) being made publicly available in early March 2019. Subsequent versions of GPT-2, including the 345M and 774M models, were released in June and November of that year.

GPT-1 vs GPT-2 vs GPT-3

While GPT-1 had 117 million parameters, their number increased significantly in GPT-2, starting with 124 million and reaching 1.5 billion. The figures soared in GPT-3, which boasts an impressive 175 billion parameters. GPT-3 is 1,000 times larger than GPT-1 and 100 times larger than GPT-2. As a result, the performance of GPT-3 has seen significant improvements, enabling it to excellently carry out language-related tasks such as problem-solving, translation, creative writing, and basic web coding based on given input.

What are ChatGPT’s limitations?

The limitations are cited on ChatGPT homepage and include occasionally generating incorrect information and producing harmful instructions or biased content. Besides, it’s trained on data that only goes until 2021, and it may sometimes claim that it is not able to answer a specific question and instead provide some generic information on the same subject. For example, below is the result I obtained when I asked the bot about its biases. The bot provided non-specific information that is true for training any AI model.

Chatbot's limitations

Additionally, the bot uses the same structure and format, due to which its texts lack personality.

The major drawback though is that the program has a limited ability to draw the line between true and false information. For this reason, the question and answer website Stack Overflow banned ChatGPT’s generated content on the platform. Therefore, it is important to carefully verify any information ChatGPT provides.

To sum it up, the limitations of the ChatGPT model include the following:

  • Incorrect and biased information: Some of the model’s answers may be inaccurate or nonsensical, so it is important to verify any facts it provides. In addition, one of the most criticized issues has been the chatbot’s tendency to reproduce biases supporting discrimination based on race and country of origin.
  • Lack of up-to-date training data: The model is based on information that is current as of 2021, so it cannot provide information about more recent events.
  • Lack of personalization: The bot’s writing style is neutral and does not take into account the individual features and emotions of the author.
  • Stability and availability of service: There have been some issues with the model’s performance during the initial period, so it is uncertain how well it will perform with increased usage.
  • Sustainability: The tool is very costly to support. WIth the query price of 1 cent for 30 words, OpenAI is reportedly spending at least $100K a day ($3 million a month) on running costs.

It should be noted that there are lots of tools like this one that can easily recognize language structure and format patterns of a generated text. This means that the hopes of SEO specialists to improve search rankings of specific domains with AI-written articles is premature. At this point, professional writers are not yet at risk of losing their jobs.

Controversy around ChatGPT

Controversies around the chatbot

The release of ChatGPT has sparked concerns among educators and scholars over cheating and plagiarism. New York City’s Department of Education banned the bot on all public school devices. At the same time, Australian universities intend to return to “pen and paper” exams and strengthen measures to detect cheating.

In response to an influx of student essays that were created with the assistance of the chatbot, academics worldwide have recommended implementing new forms of evaluation that prioritize assignments that necessitate critical thinking and analytical abilities.

In another development, the International Conference on Machine Learning (ICML), one of the most respected ML forums in the world, has prohibited the use of AI tools such as ChatGPT for writing scientific papers by participating authors.

On the other hand, developers are working to alleviate these concerns by creating tools that can identify text created by AI. One example is a computer science student from Princeton University, who claims he has developed a software called GPTZero that can differentiate between human writing and texts generated by AI. At the same time, Turnitin, a US-based company that developed software for detecting plagiarism in student work, says it is designing a tool to guide educators in assessing work with “traces” of AI-assisted writing.

Another concern about ChatGPT is that it can potentially write phishing emails and malware.

Economist Tyler Cowen has mentioned the possible negative impact of auto-generated texts on democracy, specifically noting the potential for automated comments to influence the decision-making process for new regulations.

Looking towards the future

ChatGPT developers continue improving the bot and getting rid of the current limitations, with GPT-4 reportedly planned for release in the spring of 2023.

While ChatGPT is currently free, the head of OpenAI Sam Altman admitted to Elon Musk that each query costs a few cents. Therefore, we can expect the service being monetized soon. OpenAI has published a waitlist for “ChatGPT Professional,” a prototype premium version of ChatGPT. It is supposed to be always available and fast and provide twice as many answers as the free version.

In the meantime, OpenAI is reportedly engaged in negotiations to sell shares through a tender offer, which would value the company at approximately $29 billion. The recent tender price would double the company’s valuation from a previous deal completed in 2021, which valued it at approximately $14 billion.

As ChatGPT gains traction, it may encounter competition from those who follow in its footsteps. One such competitor is Anthropic, a startup founded by a former OpenAI executive, which has raised over $700 million to develop an advanced version of ChatGPT called Claude. According to TechCrunch, Claude is currently in closed beta testing. Anthropic claims that Claude is superior in handling challenging questions, but some users who have had access to the test version do not see significant differences in quality between the two.

Deep learning language models have also been developed by Microsoft (Megatron-Turing Natural Language Generation) and Google (FLAN).

Although there is speculation that artificial intelligence chatbots could eventually replace traditional search engines, experts say that the technology is not yet advanced enough to do so. There are still some challenges, such as chatbots’ bias and tendency to make information up.

Besides, Google invests heavily in AI and will certainly compete with OpenAI’s chatbot on the market. One example is Dramatron, a new app developed by the Google-owned AI research lab DeepMind that generates film scripts.

Coming back to Greg Brockman’s prediction for 2023, let’s see what breakthroughs this year will bring us.

Banner that links to Serokell Shop. You can buy stylish FP T-shirts there!
More from Serokell
generative ai thumbnailgenerative ai thumbnail
prompt engineering thumbnailprompt engineering thumbnail
Haskell in Production: NoRedInkHaskell in Production: NoRedInk