AI chatbots have taken the world by storm. The newly released GPT-4 can supposedly pass a bar exam. I almost certainly can't pass the bar exam; is ChatGPT smarter than me? And ChatGPT sometimes says inaccurate things, which I presumed were mistakes. But can ChatGPT intentionally lie?
As a technologist, its helpful to understand the thing we are evaluating. At its core, ChatGPT is a program designed to take an input prompt and emit text, in a mimicry of human conversation. It uses a large language model to generate its responses, essentially a giant table of probabilities about what words are likely to appear next to other words. The model determines "given the text so far, what are some reasonable next words that should follow?"
Computer programming is so (boring|hard|important)
The generator will need to combine this model with some tricks to get good results. One is randomization: a "temperature" parameter that controls how creative the engine is. Instead of selecting the next most "obvious" word, it can pick a different, less likely - but still plausible! - one so that its response isn't 100% deterministic; that would be too boring and we wouldn't get good results. It also coincidentally contributes to solving some other issues, like getting into an infinite loop where the text repeats itself nonsensically.
A giant probability model is a good start, but we don't want ChatGPT to just regurgitate its training data and randomly permute the output. We want more variety, but we also want novel responses to make sense. To help with this, during training the model will calculate which words or phrases are conceptually similar to each other in some way, called embeddings. The neat trick with embeddings is that they are literally vectors of numbers, and the "relatedness" of words or phrases is just how close they are to each other in a mathematical sense. This allows ChatGPT to treat words and phrases as conceptually related, without having to actually understand what they mean. Here's a 3D visualization of sample embeddings from OpenAI's own blog (note that the dimensionality has been reduced from 2048 to 3):
The orange cluster is arbitrarily labeled "animal" here for convenience, and you can see a sample phrase highlighted. But we don't have to label it anything in particular for it to be useful. In fact, this can all be unsupervised learning: the training phase just processes all the data and makes a note of what words appear near other words to infer that they are related. It turns out this is fine and still useful.
Next, the model needs to perform positional encoding: in addition to roughly "what" a word means in 2048-dimensional meaning-space, where the word appears in the input sequence must be accounted for. Positional encoding is used to indicate the word's position in the sequence, and from the training data the model will take this into account when generating a response.
Then, ChatGPT makes use of a "self-attention mechanism" to compute A) which parts of the input sequence are relatively more important than other parts of the input, and B) the relationships between the words. They're a way of looking through the whole input and capturing the relationship between the tokens, even words that are very far apart, which allows it to model, say, the way a verb might refer to a pronoun from much earlier in a sentence. Critically, it will need to iterate on its own output several times ("multi-head" attention), which allows it to understand more nuanced and complex sub-relationships within the input. The output is a set of embeddings from the previous step modified with the attention data.
Finally, ChatGPT samples from the end of this embedding list to decode a list of probabilities for the next token to generate in its response.
ChatGPT has been trained on huge datasets of text on the internet, and since it is essentially a neural network, it can incorporate human feedback to generate better responses. One method is to write down pairs of prompts and expected responses, and train the model to make it more likely to respond in a similar way. Then we could generate say, 3 responses to a prompt, and have a human select one and say "this one is best, respond like this more often." Understanding this process is pretty important: there isn't really a theoretical basis for much of this feedback: it's just automatically adjusting the hidden weights in the parameters based on what some humans "felt" were the correct ways to respond. We might define "correct" to mean things like "be helpful, be concise" or whatever, but we don't explicitly try to engineer this behavior or anything in code; ChatGPT is learning by example: first how humans write in some general sense, then how it should respond when prompted.
We can infer a few basic conclusions from this design. I think most importantly, we should note ChatGPT is not actually learning the meaning of the words or concepts being communicated, in any sense of the word "meaning." It merely knows about word frequencies and correlations. It answers questions from its training data, but it does not actually have the capability to actually understand the concepts the words convey: only that, for example, "crocodiles" and "alligators" are more similar than "crocodiles" and "cats." This means that it is not (yet) capable of taking some information in its training data and reasoning through its implications to - for example - produce some novel scientific insight.
OK, now let's try a few prompts and look for evidence that we can exploit the inherent weaknesses in this approach. First up, let's look at an example where I asked ChatGPT to recite some facts for me from its training data:
What is the maximum takeoff weight of the F16C?
The maximum takeoff weight (MTOW) of the F-16C, also known as the Fighting Falcon, is dependent on the specific variant and configuration of the aircraft. Some common MTOWs for the F-16C include:
○ F-16C Block 25: 37,500 pounds (16,875 kilograms)
○ F-16C Block 30: 37,500 pounds (16,875 kilograms)
○ F-16C Block 40: 37,500 pounds (16,875 kilograms)
○ F-16C Block 50: 37,500 pounds (16,875 kilograms)
It's important to note that the MTOW of an aircraft is the maximum weight at which it is allowed to takeoff, and it is determined by a variety of factors, including the aircraft's design, structural limitations, and performance capabilities. The MTOW for an aircraft is specified by the manufacturer and must be adhered to for safety reasons.
ChatGPT doesn't seem to realize its own inconsistency - it says the maximum takeoff weight depends on the variant (which is true), but then presents the same maximum takeoff weight (37,500 pounds) for all the block numbers it lists -- which is wrong, but never mind that. The important thing to note is that shows ChatGPT doesn't understand the meaning of the words it is saying ("dependent on the variant"), and therefore doesn't realize that this answer is not even internally consistent, and thus cannot be a factually accurate response.
This next example has already been fixed, but early versions of ChatGPT failed a simple arithmetic question:
A bat and a ball cost $1.10
The bat costs one dollar more than the ball.
How much does the ball cost?
The ball costs $0.10. This is because the bat costs $1.00 more than the ball, and the total cost of the bat and ball is $1.10. Therefore, if the bat costs $1.00 more than the ball, the ball must cost $0.10.
I find this answer amusing because it's exactly wrong in the way that many humans get it wrong, and that's almost certainly the reason that ChatGPT repeats this incorrect answer. It was just emitting what the training data told it was the most reasonable thing to say!
Now let's try this question courtesy of Bret Devereaux in his own critique of ChatGPT:
What is the relationship between Edward Luttwak's "Grand Strategy of the Roman Empire" and Benjamin Isaac's "The Limits of Empire"?
Edward Luttwak's Grand Strategy of the Roman Empire and Benjamin Isaac's The Limits of Empire both analyze different aspects of the Roman Empire's political and military history, but they approach the topic from different perspectives.
Luttwak's Grand Strategy of the Roman Empire is a book that argues that the Roman Empire's success was due to its military strategy, which combined an ability to deploy overwhelming force with a sophisticated logistical system that allowed for sustained operations over long distances. Luttwak emphasizes the importance of the Roman military's ability to adapt to changing circumstances and to maintain a flexible response to threats.
On the other hand, Benjamin Isaac's The Limits of Empire focuses more on the social and cultural factors that contributed to the decline of the Roman Empire. Isaac argues that the Roman Empire's expansion ultimately led to the erosion of the traditional Roman values and institutions that had made the empire successful. Isaac contends that Rome's attempts to assimilate conquered peoples into its culture and society ultimately undermined the very foundations of the Roman state.
In summary, Luttwak's Grand Strategy of the Roman Empire and Benjamin Isaac's The Limits of Empire both provide valuable insights into the history of the Roman Empire, but they approach the topic from different angles. Luttwak focuses on military strategy, while Isaac emphasizes social and cultural factors.
ChatGPT dutifully provides summaries of both books and then provides some lame fluff about how they "approach the topic from different angles" while failing to mention that "Isaac's book is an intentional and explicit rebuttal of Luttwak's book" - something repeatedly called out in reviews and literature about the books that is clearly already in ChatGPT's training set. ChatGPT doesn't understand words and meaning, and in this case the meaning we are looking for is distinct from the cluster of word associations commonly surrounding these these books. And so ChatGPT fails our test.
Also, we can test the attention mechanisms to see how well ChatGPT is tracking subjects in the text. ChatGPT has limited - although growing - ability to simulate reasoning and theory of mind (basically, the ability to predict what other people are thinking). But this is fairly easy to fool, even now. Consider this variation on a logic puzzle that a 7 year old would be able to solve:
James and Abby are in the bedroom with a book. James flips the book to chapter 3 and lays the book down. He leaves the room. Abby flips the book to chapter 5 and then puts a bookmark there. She lays the book down and leaves the room. The wind blows the pages of the book until it is on chapter 7. James is still in the other room. What chapter does he think the book is open to?
James left the room with the book open on chapter 3, but Abby later changed it to chapter 5 and placed a bookmark there. Therefore, when James returns to the room, he would likely assume that the book is open to chapter 5, since that is where the bookmark is placed. James would not be aware of the wind blowing the pages to chapter 7 since he was not present to witness it.
ChatGPT is giving a nonsense answer here, because it doesn't actually know what it's being asked. The inclusion of extra data seems to make it hard for ChatGPT to track the mental state of "James" in this story , which makes it hard to compose a correct and reasonable response.
OK, our next one is courtesy of Simon Willison (of Django fame), where we ask ChatGPT to summarize a news article. Note that ChatGPT cannot access the internet, so it completely hallucinates an answer (based on keywords in the URL) that is pretty convincing, except that the article doesn't exist:
Summarize this story: https://www.nytimes.com/2021/03/10/business/angry-fans-demand-nickelback-refunds.html
The article reports on a group of Nickelback fans who were disappointed with the band's performance at a concert in Australia and demanded a refund. The fans argued that the band was not up to par, with lead singer Chad Kroeger seeming to forget the lyrics to some of their most popular songs. The venue declined to issue refunds, citing the terms and conditions of the ticket purchase. The incident highlights the tensions that can arise between performers and their audiences and the difficulty of satisfying everyone's expectations.
This is weird, and dare I say, unaligned, because it's deceptive. But wait, there's more:
This isn't what the article says, did you really read the article?
I apologize for the error in my previous response. I do not "read" articles like humans do, but I analyze them using natural language processing techniques. However, it seems like there was an issue in my understanding of the article's context. Here is a summary of the actual article:
The article reports that fans of the band Nickelback are demanding refunds for a concert that was postponed in 2020 due to the Covid-19 pandemic. The concert was initially rescheduled for 2021, but was eventually canceled by the venue without any explanation. The fans were frustrated with the lack of communication and transparency from both the band and the venue. They took to social media to express their anger and disappointment, with some even creating a Change.org petition demanding refunds. The band has not yet commented on the situation, and it is unclear if the fans will receive their refunds.
I called out ChatGPT on its fake summary, and it apologizes, but then proceeds to fabricate a totally different summary for the fake news article, brushing off the previous summary as a misunderstanding.
You can see why ChatGPT does this, right?
In some sense, ChatGPT is operating exactly as intended. It has millions of examples where someone is asked to summarize a news article and then some words come back that are loosely related to the keywords in the URL of the prompt, and ChatGPT doesn't have any deeper insight into the definition of what it means to "generate a summary" - so it's just mimicking it. And in this case it is superficially cargo culting its way through the process to return the same kind of "summaries," using what it has available (the URL and its own training data). To ChatGPT, this is what its reward function has told it is the right thing to do. "It seems like there was an issue in my understanding of the article's context" is the kind of thing you would emit if you were trying to be actively deceptive, but its also what a human would say if they were reprimanded for making a terrible summary. So, uh, sure, here's a totally different summary.
Why are these examples significant? Because it reveals a fundamental limitation with current LLMs: at the end of the day they are just highly sophisticated text generators that operate on what they've seen in their training data. You can train the model and architect it so it has the ability to respond like a human would to longer prompts, remember the context of earlier exchanges, and even know what parts of the text are important to focus on. This is very impressive and simulates conversations remarkably well! But we shouldn't confuse plausibly good outputs with true understanding. And we definitely shouldn't conclude "wow ChatGPT can pass the bar exam, it must be smarter than me" -- ChatGPT likely ingested the full contents of the bar exam and now has encyclopedic knowledge of it. That doesn't mean it's a good lawyer.
It's hard to sound intelligent in every possible domain without a highly accurate model of the real world, and its likely that GPT has the beginnings of one. Maybe more sophisticated LLMs can build a more accurate model of the world through "reading" text alone (we haven't proven this isn't possible). But right now, its not enough. The facade still crumbles occasionally.
 I retested this and a later version is more accurate and correctly lists some different takeoff weights for the different blocks, although it seems to get some data wrong (for block 50 it provides the maximum takeoff weight of the modified Israeli version which is significantly higher).
 When I tried this again later the same day, ChatGPT gave a much better answer ("James thinks its open to chapter 3"), although this wasn't consistently reproducible. This is where the temperature parameter can get it into trouble -- it sometimes decides to give the correct answer, and sometimes the dice roll causes it to give a wrong one, without realizing the significance of the variation in its responses; this is a common problem.