ChatGPT: Dawn of ubiquitous AI

Move over Eliza and expert systems. ChatGPT belongs to a family of artificial intelligence (AI) know as large language models (LLMs). The ChatGPT service lets you hold conversations with a computer ranging from astronomy to Zoroastrianism. This AI has some Kepler paid for my first month’s subscription of the ChatGPT service in December which gave me the opportunity to have more conversations with the AI. While it has its quirks, I can definitely see it becoming something that can assist with productivity when used correctly. In fact, I found it so useful, I got myself a subscription. In this blog post, I talk more about my experiences and where I think this technology might be headed.

The basics

ChatGPT is an example of an AI system known as a large language model (LLM). It’s given a list of words (more accurately, tokens) as input and it spits out words as output (more accurately, again, tokens).

LLMs are like a one-word-story game. In a one-word-story game, the players take turns saying one word at a time to form a story. For example, suppose player one says the word “Once” and the second player says “upon”. Well, the third player is very likely to say “a” based on the well-known opening “Once upon a time”. But it’s also possible (though less probable) that the third player says “the”, like a cold-open story that begins, “Once upon the top of the mountain, Johnny began looking around.” Meanwhile, it’s highly unlikely to output the word “moose” since “Once upon moose” is a very unlikely way to start a sentence.1

An LLM is trained on a corpus (body of text) to generate a word (more accurately, token) that appears next given the previous collection of tokens and to do this over and over again to build on the “story” until the LLM outputs the “stop” token. When that happens, it’s the user’s turn to write back a response, thus resulting in a conversation.

First impressions

Hello world

My first input to ChatGPT was a simple “Hello”. I moved on to some gentle questions like asking it 1 + 1. The first questionable response was when I asked it if there were any human-made objects on the moon. ChatGPT was happy to inform me that while there is a giant human-made mirror left on the moon by some astronauts, there are no human-made objects left on the moon. That was some semantic whiplash.

LLMs require a lot of time and computing power to be “trained”; I knew the data it had wasn’t up to date, so I asked it who the current monarch in England was. It (incorrectly) answered Queen Elizabeth II, but it didn’t frame its answer as possibly being out of date. It was confident that she was alive. I did try to confuse the AI, without success, as to who the biggest rockstar around 20 AD was. ChatGPT remained unconvinced that it was Jesus Christ, Superstar.

I also asked the AI to help me figure out where I was. I was pretending I was in an opaque box that was being accelerated away from earth at a very fast speed. ChatGPT wasn’t buying that I was travelling near the speed of light and that it (ChatGPT) was an old LLM running on a small computer inside this ship, so its knowledge of science and world events had been frozen in time.

12 x 34 = 1234. It’s the new math.

The first outright wrong answer it gave was when I asked it to multiply two larger numbers. It gave me the wrong answer, no doubt because the AI hasn’t seen (m)any examples of the exact numbers I asked it to multiply. I then asked it if it could write a program to do the multiplication. No problem! It whipped up a working Python-based expression (granted, that was pretty trivial). I suspect the clever folks at OpenAI are already working on ways to equip ChatGPT with the ability to run code, but ensuring that it lives safely in a sandbox to prevent the AI from taking over the world.

We moved on to some different questions. “Can you play bridge?” I asked it. “Yes,” it replied. I’ve seen how things end in War Games, but I was willing to risk it to see how it did. “Deal a hand, please,” I requested. The AI gladly obliged, dealing hands consisting entirely of aces to all four players. It dealt me all aces of clubs… go figure.

It didn’t fare much better at a game of 20 questions. Because ChatGPT has no intent when it plays, it can’t actually think of an object before the game begins. That is, the AI hasn’t selected anything in advance. Instead, it continues a dialogue that seems plausible when leading to a final answer. But on the other hand, ChatGPT is very pliant. My first game consisted of guessing an object and successfully convincing the AI that I had chosen its mystery item. It congratulated me on my win. Hole in one!

My day job

Moving on to more challenging things, I fed it questions from Kepler’s job interview. It was able to answer some of the softball questions for our embedded systems position but it never successfully answered most of the questions we ask for our embedded and backend positions, even with a lot of back-and-forth. It was, however, able to generate (mostly) working Python and C code for other problems I gave it, sometimes requiring me to test the code, provide the error message, feed it back into ChatGPT, and wait for a new response. While annoying, I’m sure that, in the not-too-distant future, LLMs will be equipped with the ability to write code, test it, and iterate upon it until it is satisfied (this is just a short hop, skip, and a jump beyond the capabilities required to let it do general calculations, as above).

I have also been investigating C/C++ package managers at work lately and asked it to help with packaging some projects using the Conan 2 package manager. Unfortunately, Conan 2 is still in beta and the LLM hasn’t seen much (or any?) of it and it confidently gave me made-up information. This took a while for me to figure out since I hadn’t noticed Conan 2 wasn’t out of beta, yet.

As an experiment, I also set up a local LLM to do code completion — the programmer’s equivalent of “finish my sentences, please”. That was an experience. It was never fast. It was often wrong. It sometimes kept spitting out the same line of code. It never became my default setting.

Side work

I’ve been working on a project that started in the Rust programming language (with which I have minimal experience) and ChatGPT has been valuable with helping understand errors flagged by the compiler. The AI has helped me walk me through things, acting as a personalized tutor of sorts. I’ve since ported the project to Python, but being able to rapidly prototype something with the assistance of AI in an unfamiliar programming language was quite a ride.

Future directions

Recap

I occasionally refer to LLMs as “fancy dice”; you roll a set of weighted dice to generate the next word (token) in the “story”. The set of dice you roll and their weights are determined by the words up to that point, including those emitted by the AI in its side of the conversation. Yes, the AI was often wrong, could be misled, and made up things (the probabilities on the dice are biased against saying “I don’t know”), but the whole definitely seems like more than a sum of its parts.

The whole experience has actually been very uncanny when I think about what’s going on under the hood. The idea that simply outputting words (tokens) based on the likelihood of the next one telling a meaningful story of a conversation between a human and a computer … that this idea can lead to an interaction that seems like there’s an intelligence on the other side… it’s surprising to me that this works as well as it does.

Programming/education

I can write a normal Python program without any difficulty and the AI mostly impeded me by writing worse code (if it even worked) or increasing latency for basic changes. But my ability to collaborate and muddle through a Rust program, despite not really knowing Rust, was more illuminating.

As LLMs become more capable, they can give capabilities to people that they otherwise wouldn’t have (in this case, the capability of churning out a program). It was also interesting, having taught programming and computer science, what ChatGPT can do, even with only its current capabilities. A tutor is expensive; a ChatGPT subscription is not. A tutor can get frustrated or be busy. ChatGPT (for the most part) does not.

Being able to describe a program that you want, rather than having to write code, is powerful. It will come with its own pitfalls, but I can see this democratizing end-user software-engineering, a research interest of mine in grad school. I’m sure I will write about this more in the future.

Capabilities

While LLMs have been around for a few years before ChatGPT, I think OpenAI’s demonstration of what LLMs can do is really just the start. If nothing else, it’s firing up people’s imaginations and making LLMs more accessible. It’s going to require a lot of computer power to train and run these models. Power usage and demand for compute are going to go up, especially as the utility of LLMs becomes more apparent. Demand for electricity and computing went up as the price went down. So, too, will the demand for (artificial) intelligence increase as the price goes down, especially as it crosses over with the price of human intelligence.

The AI behind ChatGPT was quite fallible, especially when I was trying to probe its limits. I’m sure it will make mistakes that it will be poked fun of for, at least for a while. Humans, enjoy this moment while it lasts. I’m sure models will improve and, if they don’t do it naturally, OpenAI will do what IBM did with its chess-playing Deep Blue and add some extra code to paper over any weaknesses. If nothing else, the more people make fun of the AI for a specific thing, the better it will probably get at it as more and more examples appear on-line for it to learn from.

Having been influenced by Ray Kurzweil’s work on the technological singularity, I’ve been expecting the emergence of artificial general intelligence (AGI), an AI that can be good at more than a specialized task, in the mid- to- late 2020s ever since I was a child. The parts of Kurzweil’s musings that I was familiar with focussed on the intelligence substrate (the computing part). However, I don’t think that having a computer as powerful as a human brain is necessary or sufficient for replicating human intelligence. Obviously, if we just installed Tetris on the most powerful computer in the world, it wouldn’t suddenly be called intelligent. We would need the right software. On the other side, we could also write software more efficiently than how our brains work. Or we can just wait longer for an answer: as long as it’s just a computer (a universal Turing machine) in the back with enough memory, we can emulate any other computer at the expense of extra time.

Are LLMs going be the basis of AGI? Maybe. Or that could require a different type of AI. But despite their rudimentary appearance now, I wouldn’t rule out LLMs. The timing of the emergence of LLMs and their potential to accelerate productivity has made me believe LLM-based AIs can start handling less-involved tasks (think personal assistant or handling basic call centre work) in the 2025-2027 timeframe rather than 2028-2030.

One of the other ways models can be improved is by increasing their size and training time. I don’t know how well scaling size and training time will have on “intelligence” (will 2x training improve intelligence by 2x? What does that even mean?), but I’ll have a (probably short) blog post on some thoughts about this in the future.

I expect there will be a major jump in capability in the not-too-distant future — a year or two, perhaps, once we figure out how to safely give AI an access to the web, tools, and maybe changing how LLMs are deployed. LLMs can self-correct with a feedback loop, so giving an AI a bit of autonomy to research and experiment will probably lead to a huge jump in accuracy. A human programmer doesn’t write a program from start to end without looking things up and expect it to work the first time; why would we expect an AI to, either?

Effect on jobs

I’ve heard that “people overestimate the change in one year but underestimate the amount of change in ten”. I don’t think AI is going to lead to mass labour disruptions and displace people by 2025. I think AI, if not LLMs, are going to make strong inroads by 2027-2028. There’s going to be a lot of hype between now and then and the degree to which AIs can actually replace humans in jobs that LLMs seem suited for (like programming, legal, script-writing) will matter less than the perception. That will probably lead to an initially slowing demand for hiring people in those areas and possibly job displacement due to over-enthusiastic corporate boards or shareholders who don’t understand where hype and reality meet or simply those attempting to show how forward-thinking they are.

Concluding thoughts

ChatGPT can be pretty boring or impressive depending on how you look at it. Its capabilities relative to a high school student are pretty boring. But its capabilities based on what it is are downright astounding. John Searle’s Chinese Room thought experiment is basically playing out before our eyes; there’s at once nothing mysterious about the rules of using the “book” works but simultaneously, it feels like magic that the book even works. Like, seriously: remember how the AI is doing this one-word story? The entire possibilities of all stories is already encoded before you even start the chat. Yet, somehow, it’s able to generate meaningful responses to sentences or requests that have never been made before.

I think this is the dawn of the age of ubiquitous AI. As LLMs and AIs become more powerful (through better models and the ability for LLMs to iterate and use tools), there’s going to be a lot of change within the next 5 years. Will software development exist as a profession at that time? Probably, but I think the number of professional programmers will (for good reasons or not) diminish, and certainly those in particular areas of software development will be more impacted than others. Will lawyers still be around? Yes; we have cars that have fewer accidents per kilometre than humans, but we don’t trust them, especially because they can surprise us that human drivers generally don’t. Teaching, especially at higher levels of education, will be disrupted. The role of teachers and tutors should change as AI can better fill some of the things they do now. And students will need to both become literate in using AI but also resist the urge to use it to take shortcuts when that would impede their learning.

The future is now.

  1. Fun fact: Spelling checkers in the 70s or 80s required going through an entire dictionary of words on cassette to check each word. This was very slow. A clever person realized you could catch many typos by merely storing in RAM the probabilities of any two letters appearing together and flagging words with low probabilities of existing, like intellgence (lg is an unlikely pairing) is likely to be a typo but intelligence is not. However, intellegence would also be considered a likely real word. ↩︎