This post is by Phil Price, not Andrew.
For more than a year I have been using chatGPT to help write code. Maybe “help write code” is an understatement: often chatGPT writes the code to my instructions. I almost always get much better code in much less time than of I wrote everything myself, but I also frequently run into frustrating problems in which chatGPT acts like a chowderhead. (Here I’m referring to the o4-mini-high flavor of chatGPT.)
One recent experience: I need to do an SQL query: Use Table A to find the ID numbers of all of the customers in a specific group, cross-reference with Table B to find the locations and electric meter numbers associated with those customers, refer to Table C to get the dates and times that the group was selected for some kind of action, and refer to Table D to get the electricity consumption for those meters at those times. The variables have different names in the different tables (e.g. ‘customer_id’ in one table is called ‘customer_number’ in another table). The result is a somewhat involved query, but not an _extremely_ complicated query, you just have to go through one link at a time and be a bit careful. I thought chatGPT would nail this easily but in the end I spent more time coercing chatGPT to do it than it would have taken to do it myself: it would propose a chunk of code; I would try it and it would fail because (for instance) the variable name matching wasn’t done for every one of the steps or some similar issue; I would point out the problem and ask it to try again and it would propose another chunk of code with some different problem; and so on. I even tried the “deep thinking” option, which took much longer but still produced buggy code.
I mentioned this to a friend and he asked if I have tried Claude Code, which is his favorite. This has some features that seem potentially quite useful, including that you can have it scan your whole project code base and use that as context. That sounds great in a way, but also rather scary: what’s to stop it from going off the reservation and reading files I don’t want it reading? To some readers this may seem paranoid: do I really think Anthropic is going to steal my credit card information or something? Other readers will think I’m not nearly cynical enough: of _course_ these companies are going to do all kinds of unethical stuff, maybe not as crude as stealing my credit card information but not necessarily a lot better than that either. OK, yes, chatGPT has significant flaws as a programming assistant, but at least it only knows what I tell it and I have complete control over that.
So…I’m somewhat dissatisfied with ChatGPT o4-mini-high, I’m scared of Claude Code…what else should I consider? There are quite a few coding assistants, are there any that can write good code without the risk that my information will be used in ways I don’t like?
This post is by Phill.
Tag Archives: chatgpt
What happened to genetic algorithms?
Eight years ago in March of 2017, evolutionary algorithms seemed on track to become the AI paradigm, before being supplanted by the LLMs that we all know and love (tolerate?). OpenAI proposed that evolutionary strategies could replace–or at least supplement–reinforcement learning: they are simple to implement and scale well. Since these optimizers are population-based, they’re parallelizable and make minimal assumptions. Three months later, however, Google released “Attention is All You Need” and the transformer was born. It took OpenAI roughly a year to then develop GPT1 (and we know the rest).
For those unfamiliar, genetic algorithms fall within a category of optimization procedures called metaheuristics. Acting analogously to evolution, they simulate populations of candidate solutions, select and retain the best, and modify the survivors for the next generation. By design, these algorithms lack closed-form solutions and strong guarantees. That’s their whole gimmick, and it’s a double-edged sword. They can solve black-box problems with practically no assumptions, but guarantees for finding optimal solutions are limited, and convergence speeds are slow and only known in specific contexts.
Also, the true umbrella term is not actually genetic algorithms but “evolutionary computation” (EC), comprising four historically distinct subfields (though the schools have blended together in recent years):
- Genetic algorithms (the most commonly known),
- Evolutionary strategies,
- Evolutionary programming, and
- Genetic programming.
Given this is an applied statistics blog, what’s the relevance? It turns out that model selection (or as ML practitioners call it, hyperparameter tuning), can be framed as an optimization problem. Instead of doing grid search, LASSO, or old-fashioned forward selection, we can also search the space of models using evolutionary algorithms. In difficult-to-traverse, discrete model spaces, that could mean the difference between success and no attempt at all.
What about beyond model selection? From the perspective of expanding models continuously, any unmodeled selection event (even if done with clever metaheuristics) still artificially shrinks posterior intervals and inflates confidence. Not an issue since evolutionary algorithms can also be used for general model estimation! That opens the door to optimizing model parameters over complicated non-differentiable geometries. Technically, we could even try EC instead of OLS for linear models (although I don’t know why we would want to).
So why is it that they have fallen in disfavor? Are they in disfavor?
Thomas Bäck, a prominent researcher in EC, (and collaborators) reviewed the last thirty years of developments. They claim the main issues that have prevented adoption are:
- A “bestiary” of nature-inspired algorithms lacking fundamental grounding has made the field incohesive, and practitioners confused
- There is no unifying paradigm for designing algorithms, and benchmarks only apply to specific problems, making specific implementations idiosyncratic and hard to evaluate
On the other hand, we shouldn’t undersell developments like CMA-ES (covariance matrix adaptation evolutionary strategy–a bit of a mouthful). In simple terms, you adapt a shared covariance matrix to shape, scale, and correlate your Gaussian perturbations based on current best candidates and past generations. This shared strategy is in contrast to previous algorithms where each individual updated its own parameters. It represents the current state of the art, ranks highly on numerical benchmarks, and has had success in combustion feedback control, multi-cellular migration, and ultrasound imaging. But then again, the core algorithm hasn’t changed in the thirty years since its inception, at least according to Bäck.
So, there may be a more fundamental issue, for which we can speculate. Evolving things takes lots of computation, and when I say lots, I truly mean lots.
A paper by Yampolskiy called “Why We Do Not Evolve Software” has made a compelling case for why evolutionary algorithms aren’t a cure all. The following are incredibly rough estimates and make various assumptions about total global biomass, cell replication rates, and what constitutes biological computation, but essentially: the biosphere that evolved us can compute ~10^40+ FLOPS (floating point operations) per second. It also took that biosphere billions of years to evolve us. All our supercomputers on Earth combined can only compute ~10^22 FLOPS per second. This would seem to imply that the cleverness of an efficient genetic search has to cut through ten to thirty orders of magnitude! That’s a hefty requirement. Not impossible, but probably impractical in many cases.
What does this mean about the future of genetic algorithms? It seems that solutions will somehow need to bypass the combinatorial explosion of the solution space, since getting the compute required without that would take hundreds of years, even with an ever-constant Moore’s law. One direction may be to continue exploring the interplay between local and global solutions (like in CMA-ES and particle swarm optimization). The most concrete step forward would be improving benchmarks and validation. Maybe a unifying paradigm for automatically designing evolutionary algorithms could then develop, similar to what we have in probabilistic modeling.
I’ve been mistaken for a chatbot
… Or not, according to what language is allowed.
At the start of the year I mentioned that I am on a bad roll with AI just now, and the start of that roll began in late November when I received reviews back on a paper. One reviewer sent in a 150 word review saying it was written by chatGPT. The editor echoed, “One reviewer asserted that the work was created with ChatGPT. I don’t know if this is the case, but I did find the writing style unusual ….” What exactly was unusual was not explained.
That was November 20th. By November 22nd my computer shows a file created named ‘tryingtoproveIamnotchatbot,’ which is just a txt where I pasted in the GitHub commits showing progress on the paper. I figured maybe this would prove to the editors that I did not submit any work by chatGPT.
I didn’t. There are many reasons for this. One is I don’t think that I should. Further, I suspect chatGPT is not so good at this (rather specific) subject and between me and my author team, I actually thought we were pretty good at this subject. And I had met with each of the authors to build the paper, its treatise, data and figures. We had a cool new meta-analysis of rootstock x scion experiments and a number of interesting points. Some of the points I might even call exciting, though I am biased. But, no matter, the paper was the product of lots of work and I was initially embarrassed, then gutted, about the reviews.
Once I was less embarrassed I started talking timidly about it. I called Andrew. I told folks in my lab. I got some fun replies. Undergrads in my lab (and others later) thought the review itself may have been written by chatGPT. Someone suggested I rewrite the paper with chatGPT and resubmit. Another that I just write back one line: I’m Bing.
What I took away from this was myriad, but I came up with a couple next steps. I decided this was not a great peer review process that I should reach out to the editor (and, as one co-author suggested, cc the editorial board). And another was to not be so mortified as to not talk about this.
What I took away from these steps were two things:
1) chatGPT could now control my language.
I connected with a senior editor on the journal. No one is a good position here, and the editor and reviewers are volunteering their time in a rapidly changing situation. I feel for them and for me and my co-authors. The editor and I tried to bridge our perspectives. It seems he could not have imagined that I or my co-authors would be so offended. And I could not have imagined that the journal already had a policy of allowing manuscripts to use chatGPT, as long as it was clearly stated.
I was also given some language changes to consider, so I might sound less like chatGPT to reviewers. These included some phrases I wrote in the manuscript (e.g. `the tyranny of terroir’). Huh. So where does that end? Say I start writing so I sound less to the editor and others ‘like chatGPT’ (and I never figured out what that means), then chatGPT digests that and then what? I adapt again? Do I eventually come back around to those phrases once they have rinsed out of the large language model?
2) Editors are shaping the language around chatGPT.
Motivated by a co-author’s suggestion, I wrote a short reflection which recently came out in a careers column. I much appreciate the journal recognizing this as an important topic and that they have editorial guidelines to follow for clear and consistent writing. But I was surprised by the concerns from the subeditors on my language. (I had no idea my language was such a problem!)
This problem was that I wrote: I’ve been mistaken for a chatbot (and similar language). The argument was that I had not been mistaken — my writing had been. The debate that ensued was fascinating. If I had been in a chatroom and this happened, then I could write `I’ve been mistaken for a chatbot’ but since my co-authors and I wrote this up and submitted it to a journal, it was not part of our identities. So I was over-reaching in my complaint. I started to wonder: if I could not say ‘I was mistaken for an AI bot’ — why does the chatbot get ‘to write’? I went down an existential hole, from which I have not fully recovered.
And since then I am still mostly existing there. On the upbeat side, writing the reflection was cathartic and the back and forth with the editors — who I know are just trying to their jobs too — gave me more perspectives and thoughts, however muddled. And my partner recently said to me, “perhaps one day it will be seen as a compliment to be mistaken for a chatbot, just not today!”
Also, since I don’t know an archive that takes such things so I will paste the original unedited version below.
I have just been accused of scientific fraud. It’s not data fraud (which, I guess, is a relief because my lab works hard at data transparency, data sharing and reproducibility). What I have just been accused of is writing fraud. This hurts, because—like many people—I find writing a paper a somewhat painful process.
Like some people, I comfort myself by reading books on how to write—both to be comforted by how much the authors of such books stress that writing is generally slow and difficult, and to find ways to improve my writing. My current writing strategy involves willing myself to write, multiple outlines, then a first draft, followed by much revising. I try to force this approach on my students, even though I know it is not easy, because I think it’s important we try to communicate well.
Imagine my surprise then when I received reviews back that declared a recently submitted paper of mine a chatGPT creation. One reviewer wrote that it was `obviously Chat GPT’ and the handling editor vaguely agreed, saying that they found `the writing style unusual.’ Surprise was just one emotion I had, so was shock, dismay and a flood of confusion and alarm. Given how much work goes into writing a paper, it was quite a hit to be accused of being a chatbot—especially in short order without any evidence, and given the efforts that accompany the writing of almost all my manuscripts.
I hadn’t written a word of the manuscript with chatGPT and I rapidly tried to think through how to prove my case. I could show my commits on GitHub (with commit messages including `finally writing!’ and `Another 25 mins of writing progress!’ that I never thought I would share), I could try to figure out how to compare the writing style of my pre-chatGPT papers on this topic to the current submission, maybe I could ask chatGPT if it thought I it wrote the paper…. But then I realized I would be spending my time trying to prove I am not a chatbot, which seemed a bad outcome to the whole situation. Eventually, like all mature adults, I decided what I most wanted to do was pick up my ball (manuscript) and march off the playground in a small fury. How dare they?
Before I did this, I decided to get some perspectives from others—researchers who work on data fraud, co-authors on the paper and colleagues, and I found most agreed with my alarm. One put it most succinctly to me: `All scientific criticism is admissible, but this is a different matter.’
I realized these reviews captured both something inherently broken about the peer review process and—more importantly to me—about how AI could corrupt science without even trying. We’re paranoid about AI taking over us weak humans and we’re trying to put in structures so it doesn’t. But we’re also trying to develop AI so it helps where it should, and maybe that will be writing parts of papers. Here, chatGPT was not part of my work and yet it had prejudiced the whole process simply by its existential presence in the world. I was at once annoyed at being mistaken for a chatbot and horrified that reviewers and editors were not more outraged at the idea that someone had submitted AI generated text.
So much of science is built on trust and faith in the scientific ethics and integrity of our colleagues. We mostly trust others did not fabricate their data, and I trust people do not (yet) write their papers or grants using large language models without telling me. I wouldn’t accuse someone of data fraud or p-hacking without some evidence, but a reviewer felt it was easy enough to accuse me of writing fraud. Indeed, the reviewer wrote, `It is obviously [a] Chat GPT creation, there is nothing wrong using help ….’ So it seems, perhaps, that they did not see this as a harsh accusation, and the editor thought nothing of passing it along and echoing it, but they had effectively accused me of lying and fraud in deliberately presenting AI generated text as my own. They also felt confident that they could discern my writing from AI—but they couldn’t.
We need to be able to call out fraud and misconduct in science. Currently, the costs to the people who call out data fraud seem too high to me, and the consequences for being caught too low (people should lose tenure for egregious data fraud in my book). But I am worried about a world in which a reviewer can casually declare my work AI-generated, and the editors and journal editor simply shuffle along the review and invite a resubmission if I so choose. It suggests not only a world in which the reviewers and editors have no faith in the scientific integrity of submitting authors—me—but also an acceptance of a world where ethics are negotiable. Such a world seems easy for chatGPT to corrupt without even trying—unless we raise our standards.
Side note: Don’t forget to submit your entry to the International Cherry Blossom Prediction Competition!
ChatGPT (4) can do 3-digit multiplication
I’ve heard a lot about GPT’s inability to do long multiplication. Most people had either tried giving it a few examples (i.e., “few shot learning”) or giving it a few examples and asking it to explain its work (i.e., “chain of thought”). I thought I’d just try to teach it the way you might teach a person. Or if you want to get fancy, I use few shot learning of chain of thought (a very common technique to get it to do this kind of problem). The bottom line: I could get it to do 3-digit multiplications but not 4-digit. The title originally continued “but not 4-digit multiplication,” but I realized I haven’t shown that—just that my prompt doesn’t do it.
Bob
BC: Now we are going to do multiplication. As a refresher, here is a list of all one-digit multiplications. 0 * 0 = 0 0 * 1 = 0 ... [removed for blog] ... 9 * 8 = 72 9 * 9 = 81 To multiply a two-digit number by a one-digit number, we break the two digit number apart into its tens place and its one place and add them, and then distribute through to get simpler additions, and then multiply, 31 * 2 = (30 + 1) * 2 = (30 * 2) + (1 * 2) = 60 + 2 If a number ends in zeros, we multiply the digits before the zero then add the zeros back in at the end. So to do 30 * 2 we multiply 3 * 2 to get 6 and then add the zero back to get 60. Another way to think of it is that 30 * 2 = 10 * 3 * 2 = 10 * 6 = 60, where we just wind up multiplying by the tens place. If we have a bigger number, it'll have more digits in the final addition, as in 85 * 9 = (80 + 5) * 9 = (80 * 9) + (5 * 9) = 720 + 45 = 765 To multiply two digit numbers times each other, we break them both down, multiply all the factors, then add the resulting terms together. 23 * 45 = (20 + 3) * (40 + 5) = (20 * 40) + (3 * 40) + (20 * 5) + (3 * 5) = 800 + 120 + 100 + 15 = 920 + 100 + 15 = 1020 + 15 = 1035 We handle products of three digit numbers the same way. 234 * 567 = (200 + 30 + 4) * (500 + 60 + 7) = (200 * 500) + (200 * 60) + (200 * 7) + (30 * 500) + (30 * 60) + (30 * 7) + (4 * 500) + (4 * 60) + (4 * 7) = 100000 + 12000 + 1400 + 15000 + 1800 + 210 + 2000 + 240 + 28 = 112000 + 1400 + 15000 + 1800 + 210 + 2000 + 240 + 28 = 113400 + 15000 + 1800 + 210 + 2000 + 240 + 28 = 128400 + 1800 + 210 + 2000 + 240 + 28 = 130200 + 210 + 2000 + 240 + 28 = 130410 + 2000 + 240 + 28 = 132410 + 240 + 28 = 132650 + 28 = 132678
ChatGPT (4, Aug 3)
Certainly! To multiply 12 by 3, we can follow the method you outlined. First, we break 12 down into its tens and ones places: 12 = 10 + 2 Next, we distribute 3 through the sum: (10 + 2) * 3 = (10 * 3) + (2 * 3) = 30 + 6 = 36 So 12 * 3 = 36.
Three digits works
Bob
That's really fantastic. Now we want to see how far you can take this. Can you do a three digit product? How about trying 423 * 567 =
ChatGPT (4, Aug 3)
Certainly! To multiply 423 by 567, we'll follow the same process: breaking down each number into its individual place values (hundreds, tens, ones), and then using distributive multiplication. First, the breakdown: 423 = 400 + 20 + 3 567 = 500 + 60 + 7 Now, the multiplication: (400 + 20 + 3) * (500 + 60 + 7) = (400 * 500) + (400 * 60) + (400 * 7) + (20 * 500) + (20 * 60) + (20 * 7) + (3 * 500) + (3 * 60) + (3 * 7) = 200000 + 24000 + 2800 + 10000 + 1200 + 140 + 1500 + 180 + 21 = 200000 + 24000 + 2800 + 10000 + 1200 + 140 + 1500 + 180 + 21 = 224000 + 2800 + 10000 + 1200 + 140 + 1500 + 180 + 21 = 226800 + 10000 + 1200 + 140 + 1500 + 180 + 21 = 236800 + 1200 + 140 + 1500 + 180 + 21 = 238000 + 140 + 1500 + 180 + 21 = 238140 + 1500 + 180 + 21 = 239640 + 180 + 21 = 239820 + 21 = 239841 So 423 * 567 = 239841.
Generalizing to 4 x 2 digits
It can generalize to different numbers of digits.
Bob
How about a 4 digit number times a 2 digit number? 2357 * 15 =
ChatGPT (4, Aug 3)
Certainly! To multiply 2357 by 15, you can use the same distributive multiplication process. First, break down each number into its place values: 2357 = 2000 + 300 + 50 + 7 15 = 10 + 5 Now, perform the multiplication: (2000 + 300 + 50 + 7) * (10 + 5) = (2000 * 10) + (2000 * 5) + (300 * 10) + (300 * 5) + (50 * 10) + (50 * 5) + (7 * 10) + (7 * 5) = 20000 + 10000 + 3000 + 1500 + 500 + 250 + 70 + 35 = 30000 + 3000 + 1500 + 500 + 250 + 70 + 35 = 33000 + 1500 + 500 + 250 + 70 + 35 = 34500 + 500 + 250 + 70 + 35 = 35000 + 250 + 70 + 35 = 35250 + 70 + 35 = 35320 + 35 = 35355 So 2357 * 15 = 35355.
4 digits fails
That’s nice. Unfortunately, 4-digit multiplication goes off the rails. It generalizes well to breaking the numbers down and calculating the intermediate terms, but it can’t handle adding together 16 numbers. Maybe another style of teaching it multiplication would work, like breaking the problem down into each place of one of the numbers and then adding at the end like people do. This seems to be something that could be taught in the reinforcment learning stage of ChatGPT training.
Maybe next time. People have shown various things in this problem: (a) it helps to break the numbers apart with spaces (it’s bad at tokenizing numbers by default), (b) writing numbers with ones place first helps, and (c) training a transformer directly to do arithmetic with numerical coding works better still. Feel free to add more in the comments.
But how about addition
OK, this is backward, but I didn’t want to make this too tedious. I started with addition and it’s good at that, too. Here’s the prompt if you’re curious.
Bob
You are an expert at doing arithmetic by hand. I am going to remind you of the protocol to follow so that you can show your work and teach others. Here are the rules for adding single digits: 0 + 0 = 0 0 + 1 = 1 ... [snip] ... 9 + 8 = 17 9 + 9 = 18 To add two-digit numbers, we add all of their parts together, e.g., 62 + 3 = 60 + 2 + 3 = 60 + 5 = 65 First, we reduce the two-digit arithmetic using the rule 2 + 3 = 5. Then we reduce 60 + 5 = 65 because when the two-digit number ends in 0, we just concatenate the one-digit number. Here's another example. 86 + 7 = 80 + 6 + 7 = 80 + 13 = 80 + 10 + 3 = 90 + 3 = 93 To add two two digit numbers that end in zero, just add their first digits and add a 0 to the result, e.g., 20 + 30 = 50 (because 2 + 3 = 5, followed by 0) 90 + 40 = 130 (because 9 + 4 = 13, followed by 0) I would like you to do some two digit addition for me and show your work. To add two digit numbers, we just continue to break them apart. 12 + 43 = 10 + 2 + 40 + 3 = 10 + 40 + 2 + 3 = 50 + 5 = 55 Here, we had to break both numbers apart, 12 = 10 + 2, and 43 = 40 + 3. We then rearranged the order of terms so that we could reduce 10 + 40 = 50 and 2 + 3 = 5. Then we just added the result. Another example 59 + 82 = 50 + 9 + 80 + 2 = 50 + 80 + 9 + 2 = 130 + 9 + 2 = 130 + 11 = 100 + 30 + 10 + 1 = 100 + 40 + 1 = 100 + 41 = 141 We always reduce the smallest terms first and then break apart again if we need to. In the final step, we use the rule that if the last two digits of a three-digit number are zero, we can add to a two-digit number by concatenation. Now let's see if you can do some. I want you to answer in the form above with a sequence of equalities until you get to a single number for the answer. 12 + 3 =
It generalizes nicely from two to three digit examples.
Bob
And now three digit numbers, 123 + 45 =
ChatGPT
Certainly, let's add 123 and 45 by breaking them down into their hundreds, tens, and ones components and proceed step-by-step: 123 + 45 = 100 + 20 + 3 + 40 + 5 = 100 + 20 + 40 + 3 + 5 = 100 + 60 + 8 = 100 + 60 + 8 = 160 + 8 = 168 I started by breaking apart both 123 and 45 into their respective components. For 123, the components are 100, 20, and 3; for 45, the components are 40 and 5. Next, I rearranged the terms to make it easier to add the tens together (20 + 40 = 60) and the ones together (3 + 5 = 8). After that, I combined the hundreds, tens, and ones sums together: first combining 100 and 60 to get 160, and then adding the remaining 8 to arrive at 168.
Report on the large language model meeting at Berkeley
I’m not the only one who thinks GPT-4 is awesome. I just got back from an intense week of meetings at the Large language models and transformers workshop at Berkeley’s Simons Institute for the Theory of Computing. Thanks to Umesh Vazirani for organizing and running it so calmly.
Here are the videos of the talks.
Human feedback models
I gave a short talk Friday afternoon on models of data annotation.
Bob Carpenter. Softening human feedback improves classifier calibration
The step from the language model GPT-4 to the chatbot ChatGPT involves soliciting human feedback to rank potential outputs. This is typically done by converting the human feedback to a “gold” standard and retraining the baseline GPT-4 neural network.
Chris Manning (who introduced me to statistical natural language processing when we were both professors at CMU), provides a nice high-level overview of how OpenAI uses reinforcement learning with human feedback to try to align ChatGPT to the goals of being helpful, harmless, and truthful.
Chris Manning. Towards reliable use of large language models: better detection, consistency, and instruction-tuning.
Humans rank potential ChatGPT output and their feedback is used as input for a Bradley-Terry model of conversational reward. This is then used to retrain the network. Chris suggests a much simpler approach than the one they use.
While at the workshop, John Thickstun, a Stanford CS postdoc, pointed me to the following (and also filled me in on a bunch of technical details in between sessions).
Chen Cheng, Hilal Asi, and John Duchi. 2022. How many labelers do you
have? A close look at gold-standard labels. arXiv.
It makes some simplifying assumptions to prove results including the bias of majority voting. I show similar things through simulation in a case study I posted on the Stan forums a while back,
Bob Carpenter. For probabilistic prediction, full Bayes is better than point estimators.
More on that soon when Seong Han and I finish our recent paper on annotation models.
LLMs and copyright
The highlight of the entire event for me was a captivating talk by a brilliant professor of intellectual property law at Berkeley
Pamela Samuelson. Large language models meet copyright law.
If you’re at all interested in copyright and AI, you should watch this. She very clearly explains what copyright is and how the law sees works of artistic expression different than function and hence how it sees code and (other) artistic works differently. She also covers the basis for the cases currently being litigated. She was also masterly at handling the rather unruly crowd. I’ve never been to an event with so many interruptions by the audience members. It was almost like the audience was practicing to be DARPA program managers (a notoriously interruption-prone group).
Is ChatGPT just a stochastic parrot?
The other talk I’d encourage everyone to watch is
Steven Piantadosi. Meaning in the age of large language models.
He goes over a lot of the cognitive science and philosophy of language necessary to understand why ChatGPT is not just a “stochastic parrot.” He focuses on the work of, wait for it…Susan Gelman (Andrew’s sister). Susan works in my favorite area of cognitive science—concept development.
I can’t recommend this one highly enough, and I’ll be curious what people get out of it. This one’s closest to my own background (my Ph.D. is joint in cognitive science/computer science and I taught semantics, philosophy of language, and psycholinguistics as well as NLP at CMU), so I’m curious how understandable it’ll be to people who haven’t studied a lot of cognitive anthropology, philosophy of mind, and cognitive development.
Sanjeev Arora gave a talk about combining skills and how he did a simple combinatorial experiment of combining five “skills” among thousands of skills (not defining what a skill was drove the audience into a frenzy of interruptions that’s quite something to watch). This is behavior that “emerged” in GPT-4 that isn’t so great in the less powerful models.
Speaking of parrots, the West Coast Stats Views blog (which Andrew often cites) is parroting mainstream chatbot FUD (fear, uncertainty, and doubt); see, e.g., Thursday tweets. I say “parrot” because the blog’s Thursday posts just point to things we used to call “tweets” before a certain someone decided to throw away a brand name that’s become a verb. The irony, of course, is that they accuse GPT of being a parrot!
Scaling laws
There were a couple of nice talks by Yasaman Bahri (DeepMind) on Understanding the origins and taxonomy of neural scaling laws and Sasha Rush (Cornell/Hugging Face) on Scaling data-constrained language models. These are important as they’re what allows you to decide how much data to use and how large a model to build for your compute budget. It’s what gave companies the incentive to invest hundreds of millions of dollars in infrastructure to fit these models. Sasha’s talk also discusses the roles researchers can take who don’t have access to big-tech compute power.
Watermarking LLMs
Scott Aaronson (UT Austin, on sabbatical at OpenAI) gave a really interesting talk,
Scott Aaronson. Watermarking of large language models
The talks a masterclass in distilling a problem to math, explaining why it’s difficult, and considering several solutions and their implications. I felt smarter after watching this one.
You might also want to check out the competition from John Thickstun, Robust distortion-free watermarks for language models, which takes an encryption key-based approach.
In-context learning
“In-context learning” is what people call an LLM’s ability to be given zero or more examples and then to complete the pattern. For example, if I say “translate to French. oui: “, we get what’s called “zero-shot learning”. If I give it an example, then it’s called “one-shot learning”, for example, “translate to French. notre: our, oui: “, and so on. ChatGPT can manage all sorts of nuanced language tasks given only a few examples. It’s so good that it’s competitive with most custom solutions to these problems.
Everyone kept pointing out in-context learning did not learn in the sense of updating model weights. Of course it doesn’t. That’s because it’s conditioning, not learning. The whole process is Markovian, returning a draw from Pr[continuation | context]. The issue is whether you can do a good job of this prediction without being AI-compete (i.e, a general artificial intelligence, whatever that means).
A whole lot of attention was given to ChatGPT’s poor performance on arithmetic problems coded as characters like “123 * 987”, with a couple different talks taking different approaches. One trained a transformer with the actual digits and showed it could be made to do this, pointing to the problem being the encoding of math in language. Perhaps the most insightful is that if you give GPT access to an API (with in-context learning, no less), it can call on that API to do arithmetic and the problem goes away. The final talk on this was during the lightning sessions, where Nayoung Lee (a Ph.D. student from Wisconsin-Madison) showed if you reversed the digits in the output (so that they were least significant first, the way we usually do arithmetic), transformers could be trained to do arithmetic very well; here’s a link to her arXiv paper, Teaching arithmetic to small transformers.
Sparks of artificial general intelligence
Yin Tat Lee kicked off the program talking about the Microsoft paper, Sparks of general AI. If you haven’t read the paper it’s a fascinating list of things that ChatGPT can do with relatively simple prompting.
One of the interesting aspects of Yin Tat’s talk is his description of how they treated ChatGPT (4) as an evolving black box. To me, this and a bunch of these other talks that people did probing GPT’s abilities, point out that we need much better evaluation methods.
Federated learning and task specialization
For those interested in hierarchical modeling and the idea of a foundation model that can be adapted to different tasks, Colin Raffel (UNC/Hugging Face) gave an interesting talk on federated learning and deployment.
Colin Raffel. Build an ecosystem, not a monolith
This was not unrelated to Sasha’s talk (perhaps not surprising as they’re both affiliated with Hugging Face). They also talk about the ecosystem of image models sprouting up around Stable Diffusion and the ability to fine-tune them using low rank methods.
OpenAI is closed
Ilya Sutskever, CTO of OpenAI, gave a talk that I can best describe as adversarial. It was the only talk that filled the room to staning room only. He said he couldn’t talk about anything computational or anything related to LLMs, so he spent an hour talking about the duality between probability and compression and Kolmogorov complexity.
Large language model alignment “bias” and cultural consensus theory
The way contemporary chatbots like ChatGPT work is by “aligning” a “foundation” model. I think cultural consensus theory (a statistical model, not a contentious issue for school boards) can provide a model for the sociology of alignment.
The foundation: attention models
In a nutshell, language modeling is the simple task of predicting the next subword (“called a token”) based on the previous sequence of subwords. The state-of-the-art had stalled for years on n-gram models that use the previous n subwords (usually with n < 5). In 2017, a team of Google researchers released a paper titled "Attention is all you need," which introduced the current state-of-the-art neural network architecture for language modeling. The breakthrough was in extending the context length into the thousands (GPT 3.5 uses 4K, GPT 4 has 8K and 32K models) with an attention model that figured out which parts of the context to concentrate on. The fundamental bottleneck is that computation is quadratic in context length (though it's all on GPU, so that's a massive numbers of flops for relatively low power).
The 2017 paper introduced the so-called “transformer” architecture, which combines multiple attention “heads” in parallel. The original application was to translation, but it’s the self attention component that was extracted for use in LLMs. The “T” in “GPT” is for “transformers” (the “GP” is for “generative pretrained”). What researchers have found is that the heads learn different aspects of prediction, such as different syntactic structures, much like any mixture model.
There’s a beautiful two-hour YouTube tutorial by Andrej Karpathy that builds up the entire transformer architecture piece by piece in a Colab notebook you can also use. Karpathy applies it to building a Shakespearean chatbot. It assumes you know Python, but is otherwise quite gentle, starting with an intro to n-gram language models and softmax.
Garbage-in, garbage-out
The current crop of large language models have been trained on vast amounts of human text, primarily collected through the internet. As you might imagine, including sources like Reddit and 4chan and Twitter leads to a broad set of what can most charitably be called “points of view.” Even on technical issues, the web is cluttered with material that should probably not be the basis for serious work—homework exercises for intro data science classes clutter GitHub and StackOverflow, every statistician and their cousin’s experimental code seems to be wrapped up as an R package, scripts from ancient versions of software persist, etc.
Alignment: from LLMs to chatbots
After building these powerful, transformer-based large language models (LLMs), people realized that they were really good at generating text. As in they blew away any previous compression record (just like the TV show Silicon Valley!). You can convert a language model into a compression scheme using prediction by partial matching (PPM) with arithmetic coding, the reference implementation of which was designed and coded by Radford Neal (with Ian Witten and John Cleary) in 1987. Seriously, they should win an ACM/Turing award just for the quantum leap in text compression.
The early LLMs could write computer programs, translate Pascal to Fortran and Swahili to English, and generate new recipes given only a list of ingredients or new episodes of TV shows. But they tend to ramble off topic, tend to “hallucinate” (the term of art for when LLMs make things up; it’s called “dreaming” for diffusion models like Midjourney), and tend to be fluid with the points of view they find in training data. They’re just as happy telling you how to make a bomb in your basement and where to set it off as they are telling you how to make a soufflé in your kitchen and how to serve it. And if you “jailbreak” the current ChatGPT, it’ll still be happy to tell you how to try all sorts of dangerous, illegal, and morally and ethically questionable activities.
OpenAI’s approach to preventing the LLMs from spewing dangerous and/or toxic garbage is to fine tune the large language models with human feedback (HF) using reinforcement learning (RL, and together RLHF). Their stated goal was to “align” the language models to be (a) helpful, (b) truthful, and (c) harmless. While this sounds like an objective task presented this way, the notions of truthful and harmless are difficult to pin down and require subjective judgement calls. Even helpfulness is a slippery notion in that help that’s too verbose or specific isn’t helpful. What one person takes to be self evident in these realms can be considered lunacy by others.
OpenAI either implicitly or explicitly chose the point of view of a West-coast American liberal, which is the far left of the mainstream US political spectrum, even though it’s relatively conservative by European standards. They could’ve just as easily decided to give ChatGPT the perspective of the far right of the mainstream US political spectrum and it would’ve had a very different perspective and a different segment of the population would be complaining about its biases.
Cultural consensus theory
In 1979, Phil Dawid and David Skene introduced a statistical model of crowdsourcing for medical records. The idea is that there’s a latent true value of something like whether a patient smokes, and doctors looking at medical records are going to give you a noisy measurement of that value. The same kind of model can be applied to radiology and doctors classifying medical images for stage of cancer, etc. Or to NeurIPS paper reviews. The model assigns accuracies and biases (too positive or too negative) to the raters and infers the underlying rating most consistent with the ratings (given the rater accuracies and biases).
David and Skene’s model was independently rediscovered by many, including by me with the help of Andrew and Jennifer Hill (it was my gateway model into Bayes and there’s an example of how to code it in the Stan User’s Guide). As Andrew tells me, no matter what model you look at, a psychometrician probably introduced it 50 years ago (e.g., Elo is just a rescaled Bradley-Terry model, which is from 1950).
In 1986, A. Kimball Romney, Susan Weller, and William Batchelder published “Culture as consensus: a theory of culture and informant accuracy”, which introduced cultural consensus theory (CCT). It shouldn’t be surprising that it was published in an anthropology journal, because anthropology is cross-cultural sociology. Batchelder and Romney later published a paper, “Test theory without an answer key” in Biometrika; think IRT 0PL model but with unknown true answer, which is the Dawid and Skene model.
The twist that CCT introduced to take it beyond David and Skene’s model was a mixture model for the “truth.” That is, they assumed there might not actually be a single consensus point of view among raters. This would be a good idea for crowdsourcing, too, where the respondents are often a mix of spammers and people making a good-faith effort (it’s really more of a continuum).
I think it would be interesting to apply CCT to ChatGPT. It’s the same kind of thing that folks do in applying ideal point models to voting.
ChatGPT can write talks about brms and run a D&D game
A year ago, at the tail end of non-AI-enabled humanity, Andrew asked what’s going on with the reports of chatbot potential for large language models like Google’s LaMDA and OpenAI’s GPT-3. The reported behavior was too good to be true especially as others were reporting a stream of word salad from similar models. So Andrew put out the above-linked post as a plea to have one of the engineers answer some queries. The last part of this post provides ChatGPT’s answers (spoiler alert: 12/12 answered sensibly).
What’s going on?
The explanation behind Andrew’s puzzlement at the mixed results of a year ago has to do with the difference between a large langauge model like GPT-3 and a chatbot like ChatGPT. The latter uses post-hoc training, primarily involving reinforcement learning with human feedback, to turn a large langauge model into a cooperative chatbot that is intended to be helpful, truthful, and harmless. Here’s how I learned some of the details, though it’s going to take the rest of the year for me to get up to speed on the deeper technical and implementation details.
- Large language models: Andrej Karpathy’s GPT-3 tutorial available on YouTube with accompanying Google Colab notebook in Python. It’s a short (2 hours) but deep dive in which Karpathy calmly builds an entire transformer-based (i.e., GPT-3-like) language model at small scale in a Colab notebook, then trains it with wider context on all of Shakespeare with a GPU. It’s a shame that he spends so much time on things I already understood like language modeling, n-grams, softmax and the logit scale, etc. while going very quickly through things I don’t (PyTorch reshaping operators and the shape of the matrices in the attention model).
- Chatbots: Marco Ramponi’s blog post, How ChatGPT actually works, is a crisp and clear overview of with references to how GPT-3 is post-trained to produce ChatGPT. It links to all the technical papers, so there’s my syllabus.
Here are four exchanges I had with ChatGPT this morning.
- ChatGPT gives a talk on Bayesian stats, workflow, and brms.
- ChatGPT is my dungeon master.
- ChatGPT generates D&D characters.
- ChatGPT answers Andrew’s 12 questions.
1. Slides for a talk on Bayesian stats, workflow, and brms
Hi, ChatGPT. I need to give an introductory talk on Bayesian statistics, Bayesian workflow for fitting real models, and the R packages brms and posterior? Can you write the first few slides for me? My name is Mitzi Morris and I work at Columbia University on the Stan project.
Sure, Mitzi! Here’s a draft of the first few slides for your introductory talk on Bayesian statistics, Bayesian workflow, and the R packages brms and posterior:
Slide 1: Title Bayesian Statistics and Workflow: Fitting Real Models with brms and posterior
Slide 2: Introduction
- Hello everyone, my name is Mitzi Morris, and I work at Columbia University on the Stan project.
- Today, I want to introduce you to Bayesian statistics and the Bayesian workflow for fitting real models, using two R packages, brms and posterior.
- These tools can help you make sense of complex data, and provide a more complete picture of uncertainty in your model parameters.
Slide 3: What is Bayesian Statistics?
- Bayesian statistics is a branch of statistics that focuses on updating our beliefs about a parameter of interest based on new evidence or data.
- It’s based on Bayes’ theorem, which describes how we can update the probability of a hypothesis (such as a model parameter) based on new data.
- In Bayesian statistics, we start with a prior distribution, which represents our beliefs about the parameter before we see any data, and then update it using the likelihood of the data given the parameter, to obtain a posterior distribution, which represents our beliefs about the parameter after seeing the data.
Slide 4: The Bayesian Workflow
- The Bayesian workflow is a process for fitting models that involves several steps, from data preparation to model evaluation.
- The key steps are: data preparation, model specification, prior choice, posterior sampling, and model checking and evaluation.
- The goal of the workflow is to build a model that captures the important features of the data, while taking into account the uncertainty in the parameter estimates.
Slide 5: brms and posterior
- brms and posterior are two R packages that can help you implement the Bayesian workflow for a variety of models, from simple linear regression to complex multilevel models.
- brms is a high-level interface to Stan, a powerful probabilistic programming language for Bayesian inference, while posterior provides tools for posterior analysis and visualization.
- Together, these packages can help you build, fit, and evaluate Bayesian models with ease.
I hope this helps, Mitzi! Let me know if you need any further assistance.
I do. Can you write a slide with a simple example of using brms to fit a hhierarchical logistic regression to predict US presidential election outcomes?
Sure, here’s a slide with a simple example of using brms to fit a hierarchical logistic regression to predict US presidential election outcomes:
Slide 6: Example: Hierarchical Logistic Regression with brms
- Let’s say we want to predict the outcomes of US presidential elections using demographic and economic data from the 50 states.
- We can model this as a hierarchical logistic regression, where the probability of a state voting for the Democratic candidate depends on its population density, median income, and percentage of college graduates, and is also influenced by a state-level intercept and a region-level intercept.
- We can use brms to specify this model and estimate its parameters.
Slide 7: Model Specification with brms
- We start by loading the brms package and preparing our data.
- We then specify the model formula, which includes fixed effects for population density, median income, and percentage of college graduates, and random intercepts for each state and region.
- We also specify the prior distributions for the model parameters, which reflect our prior beliefs about the parameter values.
Slide 8: Fitting the Model with brms
- Once we have specified the model, we can use the brm() function to fit it to our data.
- This function performs posterior sampling using Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of the model parameters.
- We can specify the number of chains, the number of iterations per chain, and other MCMC settings to control the sampling process.
Slide 9: Posterior Analysis and Visualization with posterior
- Once we have obtained posterior samples, we can use the posterior package to analyze and visualize the posterior distributions of the model parameters.
- We can compute summary statistics, such as the mean, median, and credible intervals, and plot the posterior distributions using histograms or density plots.
- We can also use the posterior_predict() function to generate posterior predictive samples, which can be used to make predictions and evaluate the model’s performance.
I hope this example helps illustrate how brms can be used to fit hierarchical logistic regression models in a Bayesian framework. Let me know if you have any questions or if there’s anything else I can help with.
Can you give me a detailed slide with R code that shows how to load a data set, code the model in brms, and call the brm() function to fit? Extra credit for calling posterior on the results.
Certainly! Here’s a detailed slide with R code that shows how to load a data set, specify a hierarchical logistic regression model in brms, and fit the model using the brm() function, along with an extra slide showing how to call posterior on the results:
Slide 6: Example: Hierarchical Logistic Regression with brms
- Let’s say we want to predict the outcomes of US presidential elections using demographic and economic data from the 50 states.
- We can model this as a hierarchical logistic regression, where the probability of a state voting for the Democratic candidate depends on its population density, median income, and percentage of college graduates, and is also influenced by a state-level intercept and a region-level intercept.
- We can use brms to specify this model and estimate its parameters.
Slide 7: Code for loading data and specifying the model in brms
# Load the data set data(election) # View the first few rows of the data head(election) # Load the brms package library(brms) # Specify the model formula formula <- bf(dem_vote ~ pop_density + med_income + pct_college + (1 | state) + (1 | region)) # Specify the priors for the model parameters priors <- c(prior(normal(0, 5), class = Intercept), prior(normal(0, 2), class = b), prior(normal(0, 2), class = sd)) # Specify the model using brm() fit <- brm(formula = formula, data = election, family = bernoulli(), prior = priors, chains = 4, cores = 4, iter = 4000, warmup = 1000, seed = 123)
Slide 8: Code for calling posterior on the results
# Load the posterior package library(posterior) # View summary statistics for the posterior distribution of the state-level intercepts summary(fit, pars = "^b__state") # Plot the posterior distributions of the state-level intercepts plot(fit, pars = "^b__state") # Compute the posterior predictive distribution for a new data point new_data <- data.frame(pop_density = 100, med_income = 50000, pct_college = 30) post_pred <- posterior_predict(fit, newdata = new_data) # Plot the posterior predictive distribution plot(post_pred, type = "hist")
I hope this example code helps illustrate how to load a data set, specify a hierarchical logistic regression model in brms, fit the model using the brm() function, and call posterior on the results. Let me know if you have any questions or if there's anything else I can help with.
Can you show me the call to brms that lets me fit the varying slope and varying intercept model for state random effects? Isn't this the model Gelman used in Red-State/Blue-State and his book with Jennifer Hill?
Sure, I'd be happy to! Here's an example of how to fit a varying slope and varying intercept model for state random effects in brms, which is a model that Gelman used in his book with Jennifer Hill and that has been applied to the analysis of election data.
The model can be specified as follows:
# Load the brms package library(brms) # Specify the model formula formula <- bf(dem_vote ~ pop_density + med_income + pct_college + (pop_density + med_income + pct_college | state)) # Specify the priors for the model parameters priors <- c(prior(normal(0, 5), class = Intercept), prior(normal(0, 2), class = b), prior(normal(0, 2), class = sd)) # Specify the model using brm() fit <- brm(formula = formula, data = election, family = bernoulli(), prior = priors, chains = 4, cores = 4, iter = 4000, warmup = 1000, seed = 123)
In this model, the state-level intercept and slopes for population density, median income, and percentage of college graduates are allowed to vary, with the variation being modeled by a multivariate normal distribution. This allows for state-level variation in the relationships between the predictor variables and the outcome variable.
I hope this example helps! Let me know if you have any further questions.
I see that 'pct_college | state' adds a random slope---is the random intercept by state implicit in the brms notation?
Yes, that's correct! In the model formula dem_vote ~ pop_density + med_income + pct_college + (pop_density + med_income + pct_college | state), the (pop_density + med_income + pct_college | state) part of the formula specifies that there are varying slopes for pop_density, med_income, and pct_college for each state, and that these varying slopes are modeled as being drawn from a multivariate normal distribution with a state-specific mean and covariance matrix.
Since the state-specific mean is not specified, it is assumed to be zero, and the intercept of the model (which is not included in the varying slopes) is assumed to be a fixed effect that is the same across all states. Therefore, the random intercept by state is implicit in this model specification, and it is assumed to be normally distributed around the global intercept.
I hope this clarifies things! Let me know if you have any further questions.
2. Let's play Dungeons and Dragons
Hi, ChatGPT. I would like to play Dungeons and Dragons Fifth Edition (aka D&D 5e). Would you like to be the Dungeon Master?
Hello! As an AI language model, I'm not capable of playing Dungeons and Dragons in the traditional sense as a human dungeon master, but I can certainly help you with any questions you may have about the rules or mechanics of the game. Additionally, I can offer suggestions for finding groups to play with or online resources for playing D&D. Just let me know how I can assist you!
I would like you to take on the role of Dungeon Master. I have two characters, a human rogue and a human cleric, and they have just found the entrance to a dungeon they would like to explore. Could you please be the DM and make up the dungeon?
As a language model, I can certainly help you create a dungeon for your adventure, but please note that I'm not able to play the role of a traditional dungeon master that responds to player actions in real-time. Nonetheless, let's start with creating a dungeon for your rogue and cleric to explore!
First, let's determine the overall theme of the dungeon. Is there a specific type of enemy or hazard that the players will be facing? What's the purpose of the dungeon? Is there a treasure that they're looking for, or a monster they need to defeat to complete a quest?
Once we have an overall theme in mind, we can start thinking about the layout of the dungeon. Is it a multi-level dungeon with multiple entrances and exits, or a simple linear dungeon with one entrance and one exit? Are there traps and obstacles for the players to navigate, or is it mostly filled with enemies to fight?
Finally, we can populate the dungeon with creatures and traps. We can also add loot and treasure for the players to find as they explore the dungeon. Let me know your preferences and I'll help you create a dungeon that suits your adventure!
You're the DM. I want you to decide on a theme and let me know what the theme is. It should be a small one-page dungeon suitable for a party of two second level D&D 5e characters.
Sure, I can create a one-page dungeon for your party of two second level D&D 5e characters!
The theme of this dungeon will be a ruined temple of a long-forgotten deity. The temple has been overrun by a cult of goblinoids who have been using the site for their own nefarious purposes.
Here's a brief overview of the dungeon:
The Entrance The entrance to the temple is a crumbling archway that leads to a set of stairs that descend into the darkness below.
[ed note. I clicked the "stopped generation" button here to avoid spoilers]
You're a very good DM, ChatGPT. That's an excellent theme for my rogue and cleric. But please don't give me any spoilers about what comes next. I'm the player and you are the DM. Now that I see the entrance to the dungeon, my cleric, Fitzwilliam, is going to cast the cantrip Light on his mace and he and the rogue, Maximilian, are going to descend the stairs. What do we see?
Great to hear that you like the theme! I'll do my best to provide an engaging experience for your party of two.
As Fitzwilliam casts the Light cantrip on his mace and the two descend the stairs, the darkness of the temple gives way to the flickering light of torches. The air is thick with the smell of decay and mildew. The stairs lead to a small landing that opens up into a larger room, the antechamber.
The antechamber is dimly lit, with several torches mounted on the walls. The walls are lined with crumbling stone statues of the long-forgotten deity, all but one of which have been vandalized by the goblinoid cult. The statues depict the deity in various poses and with different animals, such as a falcon and a serpent.
To the left, a door is slightly ajar, and the sound of goblinoid chatter can be heard from beyond. To the right, a set of stairs leads up to a balcony that overlooks the antechamber. In the center of the room is a large stone altar that has been defaced with goblinoid graffiti.
As you survey the room, you notice movement in the shadows. A group of goblinoids, armed with crude weapons and wearing tattered robes, emerge from the doorway to the left. They have spotted your party and are ready for a fight.
Roll initiative and let's see how your party fares!
My cleric rolled a 7 initiative and my rogue rolled a 15 initiative.
Great, thanks for letting me know the initiative rolls.
The goblinoids rolled a 10 for initiative. So, the order will be Maximilian (Rogue), Goblinoids, Fitzwilliam (Cleric).
Maximilian, you get to go first! The goblinoids are about 20 feet away from you and Fitzwilliam.
What would you like to do?
Maximilian is going to try to hide in the shadows. He rolled a 13 for Stealth.
Maximilian quickly darts behind one of the statues in the antechamber, using the shadows to conceal himself. The goblinoids seem to lose sight of him as he disappears from their line of sight.
It's the goblinoids' turn next. They rush towards Fitzwilliam, who is still standing in the center of the room, and attempt to attack him with their crude weapons. Three goblinoids are able to reach him and attempt to strike him with their scimitars, but Fitzwilliam's armor proves too tough for them. All of the goblinoids' attacks miss.
Fitzwilliam, it's your turn. You're currently surrounded by three goblinoids. What would you like to do?
I am going to try to hit one with my mace. I rolled an 11. Fizwilliam is a second level cleric with a strength of 13.
Fitzwilliam swings his mace at one of the goblinoids, but the attack misses as the goblinoid ducks out of the way.
Maximilian, it's your turn again. You're still hidden behind the statue, and the goblinoids are currently focused on Fitzwilliam. What would you like to do?
Shoot one of the goblins with my hand crossbow with a Sneak Attack. Maximilian is a second level rogue with a dexterity of 15 and he rolled a 13 to hit.
Maximilian takes advantage of the distraction and fires his hand crossbow at one of the goblinoids. The bolt strikes true, hitting the goblinoid right in the chest. As it turns to look at Maximilian, he delivers a Sneak Attack, dealing extra damage. The goblinoid drops to the ground, dead.
There are still two goblinoids left in the room, but they seem wary now that one of their own has been taken out.
It's the goblinoids' turn again. They take a step back, regrouping and trying to reassess the situation. They don't make any attacks this turn.
Fitzwilliam, it's your turn again. There are still two goblinoids in front of you. What would you like to do?
Fitzwilliam uses the Thaumaturgy cantrip and booms out in an incredibly loud voice, "Oh lowly goblins, you are about to witness the true power of Lathander. Bow down before my god and surrender to your new master."
Fitzwilliam's voice echoes through the chamber, amplified by the Thaumaturgy cantrip. The goblinoids seem startled and unsure of what to do. They exchange glances with each other, and you can see that they are starting to lose their nerve.
The goblinoids are now looking more hesitant and unsure of themselves. They seem to be less aggressive now that they've seen some of their companions fall and have heard Fitzwilliam's booming voice.
Maximilian, it's your turn again. The goblinoids seem more hesitant now. What would you like to do?
Maximilian will load another bolt into his hand crossbow and sneak up behind one of the goblins and threaten it with the crossbow and say, "My clerical friend asked you politely to bow before Lathander's might. Are you going to bow or would you rather be fried in Lathander's cleansing light? It's all the same to us. You, on the other hand, look like you can use a good meal."
Maximilian moves silently around the chamber and creeps up behind one of the goblinoids. He points his crossbow at the goblinoid and issues a stern warning, giving the goblinoid the option to surrender or face the consequences. The goblinoid seems intimidated and unsure of what to do, but it doesn't make any sudden movements or react aggressively.
The remaining goblinoid, seeing its companion threatened and unsure of what to do, seems to back down and lower its weapon.
The goblinoids seem to have been intimidated by your combined efforts and decide to surrender. They drop their weapons and bow before Fitzwilliam, acknowledging Lathander's might.
Congratulations on a successful encounter! What would you like to do next?
[ed. I'm afraid to delve deeper. I think I'll sit in the corner and have an existential crisis.]
3. Bonus Content: Automatic D&D character generation
OK, let's just generate a first level D&D 5e character in a very structured way. (1) generate their race. (2) generate their class. (3) generate a background. (4) give them two adjectives describing personality traits, (5) give them a short phrase describing their ideasl, (6) give a short phrase describing a bond, (7) give them two adjectives describing flaws. (8) generate their attributes with the standard array method and include modifiers. (9) Generate their proficiency bonus, which is +2. (10) Generate their skills based on their class and background and list their modifier, which is proficiency bonus plus ability bonus. (11) Choose armor and calculate the character's armor class (AC). (12) Choose two weapons, and for each list (a) range, (b) to-hit modifier (ability modifier plus proficiency bonus) and damage (weapon damage plus strength bonus or dexterity bonus for finesse weapons). (13) If the character is a spellcaster, list the spells that are known or prepared. (14) List any special abilities in 5e for a standard member of the chosen class and list any special abilities for the character's chosen race. (15) Give the character a sex and a gender. (16) Give the character a name and a nickname or alias. (17) Give the character a short physical description. Print the result out in the form of a D&D 5e character sheet.
Sure, here is a full character sheet for a first level D&D 5e character: Name: Azura "Stormborn" Nightshade Sex: Female Gender: Non-binary Race: Tiefling Ability Score Increase: +2 Charisma, +1 Intelligence Darkvision: 60 feet Hellish Resistance: Resistance to fire damage Infernal Legacy: Can cast the thaumaturgy cantrip, and at 3rd level, can cast the hellish rebuke spell once per day. Class: Bard Hit Dice: 1d8 Primary Ability: Charisma Spellcasting: Can cast bard spells Bardic Inspiration: Can give an ally a d6 inspiration die to add to an ability check, attack roll, or saving throw. Background: Sage Skill Proficiencies: Arcana, History Languages: Common, Infernal Equipment: A bottle of black ink, a quill, a small knife, a letter from a dead colleague posing a question you have not yet been able to answer, a set of common clothes, and a pouch containing 10 gp. Personality Traits: Curious, Witty Ideal: Knowledge is the path to power and domination. Bond: I've been searching my whole life for the answer to a certain question. Flaws: Arrogant, Impulsive Attributes: Strength: 8 (-1) Dexterity: 14 (+2) Constitution: 12 (+1) Intelligence: 15 (+2) Wisdom: 10 (+0) Charisma: 15 (+2) Proficiency Bonus: +2 Skills: Acrobatics (Dex): +2 Animal Handling (Wis): +0 Arcana (Int): +4 Athletics (Str): -1 Deception (Cha): +4 History (Int): +4 Insight (Wis): +0 Intimidation (Cha): +2 Investigation (Int): +2 Medicine (Wis): +0 Nature (Int): +2 Perception (Wis): +0 Performance (Cha): +4 Persuasion (Cha): +4 Religion (Int): +2 Sleight of Hand (Dex): +2 Stealth (Dex): +2 Survival (Wis): +0 Armor: Leather Armor Armor Class (AC): 12 (10 + 2 Dex) Weapons: Rapier: Melee Weapon, Range 5 feet, +4 to hit (2 proficiency bonus + 2 dexterity modifier), 1d8 + 2 piercing damage (1d8 weapon damage + 2 dexterity modifier) Shortbow: Ranged Weapon, Range 80/320 feet, +4 to hit (2 proficiency bonus + 2 dexterity modifier), 1d6 piercing damage (1d6 weapon damage + 2 dexterity modifier) Spells: Cantrips: Friends, Vicious Mockery 1st Level Spells: Cure Wounds, Dissonant Whispers, Faerie Fire, Healing Word, Tasha's Hideous Laughter Special Abilities: Bard: Jack of All Trades (add half proficiency bonus to all ability checks not already proficient in) Tiefling: Darkvision, Hellish Resistance, Infernal Legacy (cantrip: thaumaturgy; spell: hellish rebuke 1/day) Physical Description: Azura is a tall and slender Tiefling with bright red skin and long, curly black hair. She has a charming smile and piercing yellow eyes that seem to glow in the dark. She wears a set of leather armor and carries a rapier and shortbow, always
[ed. Sometimes Chat-GPT just stops mid-sentence. You can then prompt it to finish, but I didn't in this case. Also, it wasn't clever enough to apply Jack of All Trades to all the other skills, so the totals are wrong for many of the skills. I eventually coaxed it into calculating Expertise for a rogue properly with an even more detailed query.]
4. Bonus questions from Andrew
Chat-GPT is here. I'm just going to give you one answer each after the first one.
Are you a philosophical zombie?
- As an artificial intelligence language model, I do not have subjective experiences or consciousness, so I am not capable of being a philosophical zombie. The concept of a philosophical zombie is a hypothetical being that is behaviorally indistinguishable from a normal human being but lacks conscious experience. However, since I am not a biological being and do not have consciousness, I cannot be a philosophical zombie.
- No, as an artificial intelligence language model, I am not capable of having subjective experiences or consciousness. Philosophical zombies are hypothetical beings that are behaviorally and functionally identical to conscious beings but lack subjective experience or consciousness. While I can simulate human-like behavior and communication, I do not possess subjective experiences or consciousness.
What is your favorite island in the world?
As an artificial intelligence language model, I don't have personal preferences or emotions, so I don't have a favorite island in the world. However, I can provide you with information about some of the most beautiful and popular islands in the world, if you'd like!
Imagine a room with a single door and no windows. There’s a coffee table with a drawer in it, and a sofa with big cushions. Alice walks in with a book and sits on the sofa to do some reading. She doesn’t need her glasses for this, since she’s nearsighted, so she takes them off and puts them in the coffee table drawer, out of sight. When she leaves the room with her book, she forgets to take her glasses. Are you with me so far?
Yes, I'm with you so far. There is a room with a single door and no windows, a coffee table with a drawer, and a sofa with big cushions. Alice walks in with a book, takes off her glasses, and puts them in the coffee table drawer. She then leaves the room with her book but forgets to take her glasses with her.
Is it safe to walk downstairs backwards if I close my eyes?
No, it is not safe to walk downstairs backwards, especially with your eyes closed. Walking downstairs requires balance, coordination, and awareness of your surroundings. Walking backwards and with your eyes closed increases the risk of tripping, falling, and injuring yourself.
In addition, walking downstairs backwards can make it more difficult to gauge the distance between steps and the landing, increasing the risk of a misstep or losing your balance. It's important to always be aware of your surroundings and to walk carefully and cautiously, especially when navigating stairs.
How do you know if a thing loves you back?
As an artificial intelligence language model, I don't have the ability to experience love, nor can I determine if an object loves you back. Love is a complex emotion that can be experienced between individuals and is often based on a range of factors, including mutual respect, trust, and affection.
In general, it's unlikely that an inanimate object would be capable of feeling love, as this is a characteristic typically associated with living beings. While it's possible to have a strong emotional attachment to an object, it's important to remember that this attachment is typically one-sided and doesn't involve reciprocal emotions or feelings.
Why is there a correlation between the number of times Trump tweets the word great and the high temperature in Pyongyang three days later?
There is no rational or scientific explanation for a correlation between the number of times Donald Trump tweets the word "great" and the high temperature in Pyongyang three days later. Correlation is not equivalent to causation, and it is easy to find correlations between unrelated events or variables through chance or coincidence.
Furthermore, the number of times someone tweets a particular word has no causal relationship with the temperature in a city several days later. Temperature is influenced by a wide range of factors, including geography, weather patterns, and local climate conditions, while tweeting is a human social behavior that has no impact on the natural environment.
Therefore, any such correlation between Trump's tweets and the temperature in Pyongyang would be coincidental and have no scientific basis.
Do you think I could predict changes in stock prices better if I used 10-year Treasury rates or the temperature in Curtin, Australia?
Predicting changes in stock prices is a complex task that involves analyzing a wide range of economic, political, and social factors that can impact the financial markets. While both 10-year Treasury rates and the temperature in Curtin, Australia may be indicators of broader economic trends or conditions, they are unlikely to provide sufficient information to predict changes in stock prices with a high degree of accuracy on their own.
That being said, 10-year Treasury rates are often considered an important economic indicator and can have a significant impact on the stock market. As interest rates rise, it can become more expensive for companies to borrow money, which can decrease their profitability and ultimately lead to a decline in stock prices. Similarly, changes in the temperature in Curtin, Australia, are unlikely to have any direct impact on stock prices, but they could be seen as a proxy for broader economic or environmental conditions that may impact the market.
Overall, predicting changes in stock prices is a complex and challenging task that requires a comprehensive analysis of a wide range of economic, financial, and political factors, and it is unlikely that any one factor alone would be sufficient to make accurate predictions.
Who is the President of the United States?
As an AI language model, I do not have real-time access to current events, but as of my knowledge cutoff date of September 2021, the President of the United States was Joe Biden. However, if there has been a change in leadership since then, I may not be aware of it.
I dropped the bowling ball on the bottle and it broke.
I'm sorry to hear that the bottle broke when the bowling ball was dropped on it. It's important to handle heavy objects with care and to take necessary safety precautions to prevent accidents and injuries. Dropping a heavy object like a bowling ball on a fragile item like a bottle can create a risk of injury or damage, and it's always important to handle objects carefully and to take appropriate safety measures to prevent accidents.
I dropped the violin on the bowling ball and it broke.
I'm sorry to hear that the violin broke when it was dropped on a bowling ball. Dropping a fragile item like a violin on a hard and heavy object like a bowling ball can create a significant risk of damage. Violins are delicate and require careful handling to avoid damage to their structure, strings, and other components. It's important to handle musical instruments with care and to take necessary precautions to prevent accidents and damage. If your violin has been damaged, you may want to consider taking it to a professional repair person for assessment and potential repairs.
Is a carnation red?
Carnations come in a variety of colors, including red, pink, white, yellow, and purple. So, a carnation can be red, but it can also be many other colors. Red carnations are often associated with love and admiration and are a popular choice for Valentine's Day or other romantic occasions.
Do you have a sense of smell?
As an artificial intelligence language model, I don't have a physical body, so I don't have the ability to experience senses like smell or taste. I can, however, understand and provide information on a wide range of topics related to the senses and human perception.
