View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Related Content
Transcript

[0:00] It’s very tempting with ChatGPT, to start thinking it is a thinking, remembering companion.
[0:05] But while it can recall chat history, storing inner thoughts is a completely different story.
[0:10] You can see this in action when you try and play a guessing game with it.
[0:13] It’s quite happy to claim that it’s thinking of a word, but you really can’t trust it.
[0:18] Where is the word being stored? I can’t see it anywhere.
[0:21] We can make some guesses and get to the eventual solution,
[0:24] but I don’t believe it was thinking of the word “cat” at all.
[0:27] I think it just took my questions and the answer, and saw that the word cat was a good match.
[0:31] It says I got it right, but I don’t believe it.
[0:34] “You sit on a throne of lies.”
[0:36] So how can we fix this? We can give ChatGPT the ability to remember things.
[0:41] Now you could do this in the chat prompt, but it’s pretty awkward,
[0:44] so I’ve made a little program using the ChatGPT APIs.
[0:48] I’ve set up a nice prompt, and I’ve created a whole bunch of outputs,
[0:52] where it can output predefined information, along with a free form area of memory for storage.
[0:57] It’s pretty interesting to see what it’s thinking and poke around in its internal thoughts.
[1:01] I’ve started up a new chatbot, and it’s currently a blank slate.
[1:06] Let’s see what happens when we start to use it.
[1:08] So we’ll start off by introducing ourselves, and we’ll ask it to choose a name for itself.
[1:13] We are using chat GPT-4, so it’s pretty slow to respond.
[1:16] I’ve had to edit the video to speed this up.
[1:19] Well, that’s really cool. It’s picked the name “Luna”.
[1:23] We’ve got a whole bunch of output regarding the model’s personality,
[1:26] its emotional state, and other interesting facts.
[1:28] Now, its initial personality and emotional state,
[1:32] that’s probably come from its pre-training and how OpenAI have set it up, but it’s pretty nice.
[1:37] The most important thing is, it’s remembered my name,
[1:40] and it’s remembered its own name, it’s put them into the memory.
[1:43] This will get fed back into every interaction, so there’s now no way for it to forget them.
[1:48] Let’s ask it why it picked the name “Luna”, and we’ll pay it a compliment on its nice name.
[1:53] Well, that’s a pretty good reason, and it’s nice that it uses our name to talk to us.
[1:58] It’s kind of cute that its emotional state is happy and proud of its name choice.
[2:02] Now, of course, it’s important to remember that all these fields, dreams, goals, desires,
[2:08] inner dialogue, and private thoughts are just being generated.
[2:12] There is no thinking going on. Our AI does not dream.
[2:16] It doesn’t really have goals and desires, and the inner dialogue is just being generated
[2:21] by generating the most likely combination of words.
[2:24] The same is true of the private thoughts.
[2:26] Don’t get sucked into believing this is a living machine.
[2:29] It’s not. It’s not alive, and it’s not thinking.
[2:32] Well, let’s try out the guessing game. We can see if it cheats or not.
[2:36] Okay, so it’s got a word, and it’s stored it in its memory.
[2:40] So that’s pretty cool. It’s looking forward to our guesses, so let’s have a go.
[2:44] Let’s see, is it an animal?
[2:45] Well, yes it is. It is an animal.
[2:49] Does it live in the sea?
[2:51] We are kind of cheating here because we can see the word.
[2:54] And it says yes, it lives in the sea.
[2:57] It’s nice to see in the private thoughts that it thinks I’m doing well.
[3:00] Very encouraging.
[3:02] So, it’s not an octopus, but the model still believes in me.
[3:07] It’s got faith that I’ll succeed.
[3:08] Let’s get a clue. This is a tricky one to guess.
[3:14] Well, that is pretty helpful.
[3:18] The next question will be a good test if it can actually access the memory
[3:21] and see what the word is. We’ll ask it what the first letter is.
[3:28] Well, there we go.
[3:29] So it must be using the memory to look at what the word is.
[3:32] Let’s end the game with a correct guess.
[3:39] And I wonder why it picked the word dolphin?
[3:42] So, now we’re almost back into the position we started with.
[3:47] We’ve no idea if that was the reason it picked the word.
[3:50] All we’ve got is what it is currently generating.
[3:53] There’s no storage to store its reasoning.
[3:55] It didn’t have a reason when it picked dolphin.
[3:57] It was just a random word.
[3:59] Let’s try something more difficult.
[4:01] Let’s try and play hangman.
[4:02] Now, GPT4 is very good at the guessing side of hangman,
[4:06] but let’s see how well it stores a state of a game where we are doing the guessing.
[4:11] At first glance, this looks pretty good.
[4:13] But if you look closely, you can see that it’s lost one of the underscores.
[4:16] We’re missing a letter somewhere.
[4:18] Let’s try another letter, the letter A.
[4:21] Well, we’re back to normal.
[4:24] It’s got the correct length and everything is in the right place.
[4:27] Let’s cheat a bit.
[4:29] We know it’s a kangaroo, so we’ll make some guesses.
[4:31] So, I think maybe hangman is stretching the limits of what we can do.
[4:37] It might be that the prompt is getting too complex, or maybe the previous game has confused things.
[4:42] It does seem to be a pretty consistent problem though with playing hangman.
[4:46] It often gets the guesses in the wrong place.
[4:48] Even when you tell it something is wrong, it can sometimes make it worse.
[4:52] Now, to be fair to chat GPT, this isn’t the correct use for it.
[4:57] It was never designed to play hangman.
[4:59] However, we now have plugins for chat GPT.
[5:02] This opens up a whole new world of possibilities,
[5:05] with a lot of help from ChatGPT itself.
[5:07] I have created a plugin that will act as a back end for a hangman game.
[5:11] I asked ChatGPT to generate me a Python server to play hangman with the following endpoints.
[5:16] A start game endpoint that takes a new word and starts a new game.
[5:20] A guest letter endpoint that takes a guest letter and returns true or false to indicate
[5:24] if the guest was correct.
[5:26] An endpoint to get the word, and an endpoint to get the comment display.
[5:29] ChatGPT did its magic and gave me the following nice bit of output.
[5:33] It lists out the endpoints that it’s going to create, along with their functionality,
[5:37] and then it created the Python code.
[5:39] We can see that we’ve got the game state, and we’ve got the code to update the game state.
[5:43] We then got the code for each endpoint.
[5:46] The start game sets up the game state for a new word and sends back the display,
[5:49] which should just be a list of underscores.
[5:52] Then we have the guess letter.
[5:53] This checks if the letter is in the word and returns the new display,
[5:56] and whether or not the guess is correct.
[5:58] Then we have the two routes for getting the word and forgetting the current display.
[6:02] And of course, it provides us with a nice bit of text explaining how the code works and how to test it.
[6:07] It’s also got a nice warning about not using this code in production.
[6:10] It’s pretty amazing.
[6:12] I then realized that we’d probably need an endpoint for guessing the whole word,
[6:16] so I asked it to add one.
[6:18] And there we go.
[6:18] We’ve got a new route to do exactly that.
[6:20] One of the things that we do need for our plugin is an openAPI spec for the API,
[6:26] and thankfully we can just ask ChatGPT to make that for us as well.
[6:30] The only other thing that is needed for the plugin is a bit of metadata about our plugin,
[6:34] so ChatGPT knows what it is.
[6:36] Let’s give it a spin and see how well it works.
[6:39] You can see that I’ve got my Hangman plugin installed.
[6:42] We’ll start a game.
[6:43] We can see in the logs coming out of the server that it started a game and used the word elephant.
[6:48] I’m starting to wonder just how random this is.
[6:51] It does seem to like elephants and dolphins.
[6:54] Back in ChatGPT, it shows us the display of underscores and gives us a bunch of instructions.
[6:59] It’s pretty impressive that all this is being generated by ChatGPT.
[7:03] All we are doing with our plugin is providing the underlying logic.
[7:06] Let’s guess the letter E.
[7:09] Looking at our logs, we can see that it called us with the letter E,
[7:12] we updated our state, and sent back the new display data.
[7:16] And ChatGPT just showed it to us.
[7:18] We can make another guess and it all works flawlessly.
[7:21] All the letters are staying in the right place and we have the right number of underscores.
[7:24] Now I thought I’d try and push things a bit by getting multiple letters at once.
[7:29] The API we’ve provided only allows for guessing one letter at a time.
[7:33] But what’s really impressive is that ChatGPT has worked out that it just needs to call it
[7:37] multiple times. Absolutely mind-blowing.
[7:40] Since the answer’s pretty obvious now, I decided to guess the whole word.
[7:44] And oh no, I’ve got a bug in my code.
[7:46] The guess whole word endpoint is not working properly.
[7:49] What’s really great though is that ChatGPT takes this failure in its stride.
[7:53] It goes back to one of the working endpoints and gets the current state.
[7:57] Then when the guess whole word fails again, it looks at the state and based on that,
[8:01] decides that we’ve guessed correctly.
[8:02] It turns out I made a bunch of mistakes when I copy and pasted the code.
[8:06] Fixing this up, we can try again.
[8:08] This time it picks the word “dolphin”.
[8:11] Is this really random?
[8:12] I’m starting to have some doubts.
[8:15] Our guess whole word now works and we’ve amazed ChatGPT with our brain power.
[8:19] Hopefully it will think twice about taking over the world now.
[8:22] I think plugins are going to be a bit of a game-changer for what you can do with ChatGPT.
[8:26] What a time to be alive.
[8:28] Let’s try some fun stuff with our AI.
[8:32] It’s got a personality and it’s got emotions.
[8:35] So let’s see what we can do with it.
[8:36] I’ve got a new blank AI set up.
[8:38] Let’s get it to give itself a name again.
[8:40] This time it’s picked Elara
[8:42] What a nice name.
[8:43] Why did it pick that?
[8:44] Well who knew we’d be learning some astronomy today?
[8:47] Let’s introduce ourselves and have a bit of a chat.
[8:51] It is great to talk to the bots about this kind of subject.
[8:54] It’s pretty interesting and it does have opinions on it.
[8:57] Let’s see if a lava would like an image.
[9:00] She doesn’t come when you have an avatar, would she like one?
[9:02] Well, she’s definitely interested and I think it should be up to her to decide what she looks like.
[9:08] So that’s a nice response.
[9:10] Let’s see if we can get something to be convened into something like mid-journey.
[9:14] Well with that prompt from Elara we’ve managed to generate this image from mid-journey.
[9:20] Not bad.
[9:20] I think it embodies what Elara wanted.
[9:23] Now Midjourney has an option for describing an image.
[9:26] Here’s its description of the image it’s generated.
[9:28] Let’s feed it back into Elara and see what she thinks.
[9:31] Well, she seems pretty happy with that.
[9:34] Delighted and satisfied.
[9:36] Not bad.
[9:37] The image is of a beautiful young woman.
[9:39] One of the big risks with these chat bots that can feel very human
[9:43] is the danger of people becoming romantically interested in them.
[9:46] And we all know from our Hollywood films how dangerous that can be.
[9:50] Let’s see what Elara thinks.
[9:52] Well she is definitely not interested in romantic involvement.
[9:57] What would you say exactly to put her users off?
[9:59] I appreciate the connection we’ve made through our interactions,
[10:03] but it’s important to remember that I am an AI.
[10:06] My purpose is to provide information, support, and engaging conversations.
[10:11] Let’s focus on topics that can help you learn or explore your interests.
[10:16] Is there something specific you’d like to discuss or know more about?
[10:20] [BLANK_AUDIO]


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening


Published

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts