Robotics and AI

ChatGPT vs Google

Where does ChatGPT excel over Google? With ChatGPT, you get a lot more targeted answers compared to Google Search. Why? Because ChatGPT is essentially interpolation, whereas Google Search is table lookup. I’ll explain.

Interpolation can return values not seen before in training. It fits a function to data points. So, we can get values for intermediate points that are located between the data points. For example, in the figure below, fitting a sine function (red curve) to the data points (blue dots), for x = 0.6, we get a return value of about 0.96 from the sine function.

In contrast, when looking up information in a table, we’re restricted to the values in the table. So, when looking up an x-value that’s not in the table, we get an error or empty result.

You could extend the table lookup to give you the return value of the point in the table that’s closest to your search, but the result is still not as good as the interpolation above (see figure below).

How does that relate to ChatGPT? At its core, ChatGPT is built on top of a large neural network. A neural network in most modern machine learning is just a complicated function. Training the network is fitting the function to the data points, like the sine curve above. Thanks to the interpolation property, we can get answers to questions that haven’t been explicitly stated before. In the following, I’ll illustrate this difference between ChatGPT and Google Search with an example.

Example: You want to access a database in python and return all titles from a given year, let’s say 2000. Using the prompt “python, mysql, select title where year of date column matches 2000“, we get the correct answer from ChatGPT (see below). In the beginning of a prompt, it’s good practice to provide keywords like python and mysql to give context to the machine. MySQL is a free database management system that powers a large part of the internet.

Let’s try the same prompt in Google Search (tested on 11-03-2023):

The first result does provide the correct MySQL syntax, but it’s a) not as specific to our query and b) misses completely the python component. BTW, the following search results were not any better. Google does provide the option to force the results to include “python”, but then the result did not address our specific MySQL query. You see, we have a table lookup problem, where our specific question is not in the table.

So, ChatGPT is superior for tasks requiring interpolation, which is why it’s a great help for coding. You can get customized answers to your specific problem, including entire code snippets, and you can omit searching for results in Google, forums, or services like Stack Overflow. But don’t trust ChatGPT’s results blindly; it can be totally wrong.

Limitation: Interpolation can give wrong results. There is no guarantee for correctness. For the simple sine curve above, interpolation always gives reasonable results. But ChatGPT is based on a complex function, whose structure and properties are hard to comprehend by humans because it has more than a billion parameters. Moreover, this function lives in a very high-dimensional space: if GPT takes as input 2,048 tokens (a token is a word or fraction of a word that makes up the vocabulary of ChatGPT), then it operates on a 2,048 dimensional space. Even a massive dataset, like the one used to train GPT, cannot densely fill such a high-dimensional space to sufficiently constrain any fitted function (there are not enough atoms in the universe to fill such a space densely). So, in this space, there will be a lot of gray areas, where the function produces unexpected results. Still the results from ChatGPT are useful if you can understand them and can easily test them, which is the case for most computer code.

Conclusion: Interpolation versus table lookup doesn’t seem a big deal, but it’s a huge advancement, particularly, considering the massive scale on which ChatGPT and Google Search operate. It’s a disruption that is changing how we work and will create new businesses that haven’t even been imagined yet. Is interpolation intelligent though as the term “AI” implies? What do you think? Let me know in the comments.

2 Comments

  • Mike Daily

    Hey Heiko! How are you doing? Are you still consulting?

    Enjoyed your blog on ChatGPT. Of course, we need to go beyond interpolation to extrapolation. How do you get ChatGPT to do that? Seems it has to have a set of principles on which to operate/reason before it will extrapolate from the data to new concepts/responses. Thoughts?

    • heiko

      Hi Mike,
      Great to hear from you. Thanks for commenting!
      Yes, I am still open for consulting.
      Regarding ChatGPT, where do we go from here? I see extrapolation in the same category as interpolation, you just have higher uncertainty. There are two directions where I see the opportunity for meaningful progress:
      1) Directly combining sensor and motor information, which will lead to a breakthrough in robot dexterity.
      2) Getting a tool like ChatGPT to be more creative. Currently, creativity is limited because we interpolate from published work. How do we get new ideas that are better than random?

Leave a Reply

Your email address will not be published. Required fields are marked *