 Hello, and welcome to my channel. My name is Christian Heer, and today we're going to have some fun asking some questions on the chatbot AIs. So I want to ask Google Bard open at chatGPT and bang AI chatbot to see if they can write a piece of Python code. Now only that, I'm going to ask them to also fix a tiny bug which I want to introduce into the same code that they provided and see what they can do. OK, so the question I want to ask them is as follows. Let's go and take a look. I'm going to ask each of them to write a recursive function in Python that will compare two lists of integers and returns only the list that has the least gap between the elements. So for example, I have N1 and N2 here. And the missing numbers, as you can see, those will determine the gaps. And this example, N1 should have the least gaps, so N1 should be returned. OK, so for bang chatbot, the open AI and Google Bard. So let's head over and ask them this question. I'm going to copy this first, so I don't have to retight this. And let's see what they can do for us. Let's give me a second here. Let me share my screen. So here is bang. I'm going to go and pick the one that says very precise. OK, I want to be as precise as possible. So let me ask first if you can write me a code. Hi, can you write Python code? And let's see what it says. Hopefully, yes. Still waiting. OK, great. OK, so I'm going to paste the question right here and see what it says. And then OK, great. Looks good. OK, a bit long. OK, let's give it a test. OK, I'm going to go and copy this. And then I'm going to go right into the chat over here. And let's test this is the bang chatbot. OK, so I'll put it right up here. I'm going to rename the function just to the underscore. OK, let's give it a try and see if this is. Oh, no, that's not correct. Actually, I'm going to change the name to my down here. All right, so let's give it a run. And OK, you got a really strange answer here. It probably made me misunderstood my question. But if you turn the wrong answer, OK, maybe it wasn't clear or something. And I'm going to see if it can fix that. OK, it's not giving the right answer. And so let's give it another spin over here. Where is Bing? Yeah, there you go. And I'm going to say, can you revise it? All right, so it's going to try to do that. I don't know if it's the same or not. It appears to be much shorter than before, as you can see. But much shorter, let's give it a try. OK, so now let's copy this and go back to the IDE. And so I'm going to comment this out now. And we'll leave this as this. We're coming this out. We'll close this and we'll add a new one right below it. So this is the new one, the same function name, I guess. Good. All right, so let's see if it's correct this time. Looks to be working fine. Yeah, much shorter. And it is giving me what I wanted. So just to be sure, this is the second one here. OK, let me clear the console here again. Run one more time. And we did prove that this is the smaller of the gap. If I go back and make this like a 20. No, let's make this a 20. Then the smaller should be the other one. OK, so let's try again. Great, so OK, good. Finally got it at the second attempt. Let's go ask the same question to the other bots. OK, I'm going to ask the same question. We call this, copy that, and let's head over to a Google box for me, open AI. So again, I can you write Python code? And yes, oh, this is pretty quick. This response is very fast. OK, here's the same question. Yeah, very fast compared to Bing AI. OK, it includes comments as well. I guess is just as long as the other one. And it provides some explanation as well. Pretty interesting. OK, it says that assume inputs are valid and contain only integers. OK, we got that. So good, let's go and give this code a test. It's going to copy that. It's going to head over to the IDE. And now let's switch over to chatbot. So right here, we'll copy the function. It's got total gap. Replace it down here. All right, so let's give it a try and see what happens. There we go. Do run, try again. OK, it's probably had the wrong one, sorry. Least gap. That's my bad. Try again, let's clear the console. All right, so you can see it does understand what I was asking, and it did provide the correct answer as I expected. Let's test this again. Let's put a, let's make this the larger one. OK, I'm going to put here like a 20. Now that second should be the larger one. Let's run one more time. OK, so I think that's the correct one. So let's make this a 10. And then that is still a small width test. OK, good. Let's make this a 8. All right. Yeah, so it is working as expected. Good for chat GPT. Now let's go try Google BARD and see what happened. So let's go over back to Google BARD. I'm going to switch over to this side. Assessing question, hi. Can you write code or Python code? And OK, it's thinking. So you can see it's a little bit slower as well. OK, you can write Python code, different Twitter. OK, good. You can also write complex code. Great, that's the same question. And see what happens. I'm shocked. OK, says I'm not trained for coding yet, so I can't help with that right now. Interesting. OK, it says it can write complex Python code, but I guess it's not as complex as a function. Let's ask to write something really simple. Write a function in Python to sort a list of unordered number. See if you can write that. OK, I'm very disappointed actually. Can't write a code, but claiming that it could actually write code, maybe a very simple one. Write a Python script to sort a list of unordered numbers. Maybe. Let's see if we can do that. OK, I'm shocked that Google BARD doesn't even can do that for me. So, well, that was a disappointment for Google BARD. It was not able to provide a code at all. It would be just a simple sorting algorithm. So that's unfortunate. Maybe in the future. But now the next thing I want to do is I'm going to give them back the same code. And I'm going to introduce a tiny syntax error in the bug in the code and see if they can detect and fix that for me. OK, so let's go back and see what we can do here. I'm going to just put an extra parentheses right here. This is a syntax error. I'm going to go back and copy this code and give it back to Bing and see what it can do. So let's go back to Bing. I'm going to say, can you? My code has an error. Or I'd be more specific, a syntax error. Can you tell me? See if you understand. Hopefully you would ask me for the code. OK, so here is the code. And let's see if we can find that for us. Wow. I'm impressed. Yeah, it defined the parentheses here. And it fixed that by removing that extra parentheses there. So this is very good. I'll give it a thumbs up. Good job on that one. OK, let's go and do the same thing for opening AI. Let's go back to its quest. It's the same code. And I'm going to copy its code. And so do the same thing. I'm going to do it's much longer, but let's put it in the same thing here. OK, yeah, here. Or let's do it right up here. I guess right here. OK, so I'm going to copy this code. And try again. Make sure I copy it right. Copy this code. And let's go back to chatGPT. All right, so here we go. I'm going to say my code has a syntax error. And you help me. OK, so here it is. Yeah, it got it too. This time looks good. It did find that there's an extra closing parentheses before the plus right here. Very precise. And it did fix that line for me as it should. So very good. Compare that to the other one. I think they're both equally good in this part. OK, so what do you think? What's your favorite? What do you like about it? So let's look at Bing first. OK, the first was a little bit slow when I asked the question. It provided the solution. And the first solution was actually not correct. Not that what I wanted. Maybe you didn't understand my question correctly. Maybe I wasn't being clear. But the second round, it actually produced a really good answer. The code is much, much shorter. It's actually working correctly. And then when I introduced the bug, it was able to fix it right away, too. So awesome for that one. ChatGPT was very, very fast. That was my first impression. I asked right away, and it starts showing the question right away, typing the solution. Not only that, the code itself has some comments or documentation. And it also explains what's going on inside the function as well. It was also able to detect the error and also fix it right away. I think the response was actually called my attention. Google Bard was very disappointed, actually. At first, I asked if you could write Python code. It said yes. You could also write complex Python code. So it said, so I introduced the question. It was not able to do that. So it basically adds another very simple question just to do a function to sort a list of arrays. It was not able to do that. Then I just asked it to write a loop. I mean, yeah, basically a loop to sort an array. It was not able to do that at all. So I guess it's still have a lot of catching up to do for Google Bard. So in my opinion, the winner is basically OpenAI ChatGPT. So tell me what's your favorite. And if there's anything that you'd like me to test, any comments you have, please let me know in the comment below. Thank you and have a wonderful day.