Part 2 – Many tasks are simpler than we used to think (Data Scientist)

Explanation for Data Scientist

This explanation is for data scientists. For others, use these links:

Non-Technical | Technical

Tasks that were considered hard for computers

In Part 1 – All ChatGPT does is complete sentences, I explained how ChatGPT just finds the next word to complete a sentence.

This sounds like a really simple task. Then how come ChatGPT can accomplish complex tasks like:

  1. Answer questions
  2. Write essays
  3. Respond with empathy
  4. Translate text from one language to another
  5. And many, many more.

The answer is that we realized, almost accidentally, that these complex tasks can be reduced to the simpler task of completing a sentence!

1- Answering Questions

questions answers signage
Photo by Pixabay on Pexels.com

The problem of answering questions is that given a set of knowledge, the system has to find the relevant information and then rephrase it in the form of an answer posed by the user.

Let’s take a question like:

“Who is the best quarterback in the history of football?”

This question can be replaced by a “complete-the-sentence” problem:

“The best quarterback in the history of football is ___”

Now ChatGPT can just complete the sentence based on all the 120 billion sentences it has scanned from the internet. You can refer to Part 1 – All ChatGPT does is complete sentences if you’re curious about how ChatGPT can complete the sentence.

2- Writing an Essay

person holding blue ballpoint pen writing in notebook
Photo by picjumbo.com on Pexels.com

Let’s say the user now asked “Write me an essay about Tom Brady”.

This problem can be replaced by a “complete-the-sentence” problem:

“Tom Brady is ___”

Now let’s say we complete the next word with “best”

“Tom Brady is the best ___”

Then we complete with “quarterback”.

“Tom Brady is the best quarterback. ___”

“Tom Brady is the best quarterback. He has ___”

“Tom Brady is the best quarterback. He has seven ___”

“Tom Brady is the best quarterback. He has seven championships. ___”

If we keep repeatedly choosing the next best word we end up with a whole essay.

3- Respond with Empathy

ethnic psychologist touching black depressed clients shoulder
Photo by Alex Green on Pexels.com

This is a more surprising capability of ChatGPT. We used to think empathy was something uniquely human.

However this problem can also be reduced to a “complete-the-sentence” problem.

Let’s say someone said “I’m feeling sad and frustrated”.

This can be replaced by “I’m feeling sad and frustrated. ____”.

By scanning the 250 billion sentences on the internet and digitized books, ChatGPT can choose what most authors have said after that sentence to fill in the blank.

In most text written by humans, the follow up to the statement “I’m feeling sad and frustrated” would be an empathetic sentence. For example, “I’m feeling sad and frustrated. My friend gave me a hug and told me to hang in there and things will get better.”

Thus ChatGPT automatically has empathetic responses because it is just choosing the next word from the sentences found on the internet, written by humans who have an empathetic response.

4- Translate text from one language to another

close up photo of baggage sign
Photo by Esther on Pexels.com

Let’s say we asked ChatGPT to translate “I’m feeling sad and frustrated” to Spanish.

The traditional approach in NLP (Natural Language Processing) was to teach the AI model about grammar rules for English and Spanish, and then ask it to use those rules to translate.

This was the technique used in language translation until a few years ago. We all remember how bad the translations were.

How Children Learn to Speak

woman reading book to toddler
Photo by Lina Kivaka on Pexels.com

We know that children start speaking by listening to the language around them and not by learning grammar rules. In fact, they learn the grammar rules much later in their life.

So how do children learn to speak without any knowledge of grammar rules?

They listen to the sentences spoken around them and form relationships between words. Then they try to speak and some adult corrects their attempt at speaking. This reinforces their use of words in certain combinations.

So in fact they are implicitly discovering the grammar rules by listening and getting feedback.

How ChatGPT learns to speak

black and gray computer motherboard
Photo by Valentine Tanasovich on Pexels.com

ChatGPT does this task in very much the same way a child does this.

ChatGPT, by reading sentences on the internet and in digitized books, forms relationships between words. Which words happen to come together often in sentences? Which words are never in the same sentence?

Following this process, ChatGPT implicitly learns the grammar rules without being explicitly told about them.

As anyone who has learned a new language by starting with the grammar rules can attest, the language does not always follow the grammar rules. As a result, any attempt to translate from one language to another using grammar rules falls short. And native speakers can easily tell.

Using the technique of implicitly learning all the grammar rules by reading lots of sentences has turned out to be much more effective.

The role of feedback

man reviewing woman s resume
Photo by Tima Miroshnichenko on Pexels.com

We talked about how children learn to speak by getting feedback from those around them. “No Timmy, that’s a table not a chair”.

This feedback plays an important role is the children’s language skills.

ChatGPT operates the same way through something called RLHF (Reinforcement learning using human feedback).

ChatGPT is shown many examples of “correct” text and it can adjust its algorithm so the text it writes matches these examples of correct text.

For example, let’s say ChatGPT generated “I is”. It can now compare that to the billions of sentences. What it will find is that there are very few (if any) sentences that start with “I is”. Hence it can learn that “I is” is not correct but “I am” is correct since that appears in many sentences.

In this instance, ChatGPT learned about a grammar rule just by using feedback.

What does this mean about the human brain

photo of head bust print artwork
Photo by meo on Pexels.com

One of the most shocking ability of ChatGPT and LLMs was to solve complex language tasks like answering questions, writing essays, expressing empathy and translating one language to another.

The reason is NOT that we’ve been able to invent a super smart technology.

The real reason is that many problems we used to think were very complex turned out to be much easier than we thought when we reduced them into the simpler problem of completing a sentence.

Just like a complex mathematical equation can be reduced to a much simpler equation by applying a few simple mathematical rules.

Or how evolution is able to construct very complex organisms by using very simple tools like mutation and natural selection.

This has forced us to realize that our human brain is not as special as we thought. Many of these highly cognitive functions are actually possible to mimic using much simpler cognitive functions.

What does that mean for other highly cognitive functions? Will we find simple building blocks that can mimic them in the future?


Popular Blog Posts