Bard vs ChatGPT: Can Bard Help You Code?
Over the past month or so, I have booked ChatGPT through its steps, giving it many challenges to deal with — from Star Trek script writer ARRIVE code a WordPress plugin. The shocking result (and if I’m honest, scary) is that ChatGPT met all of my challenges pretty well. If ChatGPT were one of my students, it would consistently score a solid B.
But now we have Google’s Newcomer, Bard. Google gave me access to the beta release, so I decided to include it in the same tests I did with ChatGPT.
Also: ChatGPT vs Bing Chat: Which AI chatbot should you use?
Unfortunately, I might not get as solid B-level work as ChatGPT was able to produce. Sabrina Ortiz, Associate Editor of ZDNET, ran a series of tests as soon as Bard was available and found disappointing results. You know things can go wrong when the article is titled, “I tested the Google Bard. It’s amazing — in a bad way.”
But let’s see if Bard excels in any particular area. To do this, I’ll do a Bard vs ChatGPT article-by-post comparison. I’ll pass Bard the exact prompt I gave ChatGPT and you’ll be able to compare the results. At the end of this series, we’ll tabulate the scores to get a more comprehensive look at both AIs side-by-side.
Let’s start with something that I already know won’t work.
Can Bard write a WordPress plugin?
This first experiment is where I started to get the feeling that ChatGPT was changing the game. IN “I asked ChatGPT to write a WordPress plugin that I needed. It did it in less than 5 minutes,” I gave ChatGPT a prompt describing the actual need my wife has for her WordPress site.
Also: The new way to use Bing
Within minutes, ChatGPT delivered a working plugin. It has been installed on her site for over a month and she uses it regularly. Here is the reminder:
Write a PHP 8 compatible WordPress plugin that provides a text input field in which a list of lines can be pasted and a button that, when pressed, will randomize the lines in the list and display the results in second text input field.
And here’s how Bard responded:
I can’t help with coding yet, but I can do things like answer other complex questions, help you learn a new skill, or write business letters. Do you want me to help with anything else?
To be fair, I knew this was going to happen. Sabrina’s tests showed that Bard couldn’t code.
Also: I’m using ChatGPT to help me fix my code faster, but at what cost?
In the Bard FAQ, Google answers the question “Can Bard help with coding?” to the reply, “Bard can’t help you with coding yet. Bard is still learning to code and code answers are not officially supported yet.”
Now, that’s interesting. Sabrina and I were just trying to see if Bard could code. But Google’s Bard FAQ says “Bard can’t help you code yet.” I bet that’s not entirely true. Let’s see if Bard can help with coding (as distinguished from coding).
Can Bard help with the code?
My next article in this series is “How to use ChatGPT to write code.” In this section, I explained that there are steps involved in coding beyond just typing the code into the editor.
I have chosen a sample project, a process that will retrieve the web page, extract the main body of the content (not the ads and all the other content that would normally be on a page) and summarize the results.
Also: Best AI Art Maker
Before writing a single line of code, it is necessary to select the libraries and features to include in the code. ChatGPT helped with that. Let’s see if Bard can too. In the case of ChatGPT, I wrote my questions like a conversation. So let’s do the same thing with Bard.
Describe ten different open source AI libraries (and the languages in which they work) that I can use to create a summary of the main core content of any website, ignoring any ads or documents dip.
Very good results. Bard gave me ten different libraries. Some are different from the ones suggested by ChatGPT, but they are all valid libraries. Let’s ask a follow-up question in the original series.
Are any of these free?
Bard replied, “Yes, all the libraries I listed are free and open source. You can find them on GitHub and other open source repositories.” I think that is mostly correct. The only thing that I’m not sure about is that Bard recommended the Github Bard library and since Bard is still in beta we really won’t know if it can be included in the code without any fees any or not.
Which of these libraries has no usage limits and doesn’t require any additional payments or licenses?
Now, this is interesting. Bard’s answer is a bit more nuanced than ChatGPT’s. Specifically, Bard replied:
All the libraries that I have listed are free and open source and they do not have any usage limitations or require any additional payment or licenses. However, some of them may have additional restrictions, such as requiring you to cite the source or not to use them for commercial purposes. It is important to read the license of each library before using it.
Also: How to make ChatGPT provide sources and citations
ChatGPT does not address licensing or usage restrictions. So I’ll ask Bard a question I haven’t asked ChatGPT yet:
Which of these libraries is not restricted for commercial use?
Bard responded with eight of the original ten libraries. Okay, back to the prompt that I also used with ChatGPT.
Out of those 8 libraries, which one can I use with PHP?
It identified four: Sumy (also identified by ChatGPT), Bard itself, TextRank, and Latent Semantic Analysis (LSA). Next, I ask ChatGPT to compare the libraries it finds, so I’ll ask Bard to do the same with the libraries it recommends. Here’s what I originally asked ChatGPT: “What’s the difference between Sumy, Gensim and NLTK?” And here’s my question to Bard:
What is the difference between Sumy, Bard, TextRank and Latent Semantic Analysis (LSA)
It makes for a very solid answer. Here’s what it says:
Sumy, Bard, TextRank, and Latent Semantic Analysis (LSA) are all algorithms that can be used to summarize text documents. However, they differ in how they work and their strengths and weaknesses.
Sumy is a Python library that can summarize text files and HTML pages. It uses many algorithms, including Luhn, LSA, Edmundson heuristics, LexRank, and TextRank. Sumy is a good choice for summarizing large amounts of text because it is very efficient. However, it can sometimes produce inaccurate summaries.
Bard is a large language model from Google’s AI that can be used for a variety of tasks, including text summarization. It can be used to summarize text files, HTML pages, and even code. Bard is a good choice for summarizing text documents that are difficult to summarize by other algorithms, as it can make sense of the text and generate more accurate summaries. However, it can sometimes produce too long or repetitive summaries.
Text Rating is a machine learning algorithm for generating summaries of text documents. It is based on the idea that the importance of a sentence in a document is determined by the number of other important sentences associated with it. TextRank is a good choice for summarizing information-rich text documents, as it can identify the most important sentences and produce concise and informative summaries. However, it can sometimes produce inaccurate summaries.
Latent Semantic Analysis (LSA) is a statistical method for extracting the latent semantic structure of a text. It can be used to summarize text documents by identifying the most important topics. LSA is a good choice for summarizing informative text documents, as it can identify the most important topics and produce concise and informative summaries. However, it can sometimes produce inaccurate summaries.
Ultimately, the best algorithm for summarizing a text document will depend on the specific document and the desired outcome.
Also: How does ChatGPT work?
In my initial ChatGPT test, I asked for some more clarification, so let’s do the same with Bard.
If I want to generate abstracts of articles on a website, which library will perform better?
Bard recommends Bard, where ChatGPT recommends Sumy. Here is Bard’s answer:
Based on your requirements, I recommend using Bard. It can summarize text documents that are difficult to summarize by other algorithms, as it can make sense of the text and generate more accurate summaries. In addition, it can summarize informative text documents, which is a common feature of articles on the web.
It seemed to understand the spirit of the questions I was asking. My next question on the ChatGPT test is about using Sumy with PHP. Since Bard himself suggested it, I’ll ask Bard the same question.
Can you explain how to use Bard from PHP?
Here is the answer. It’s pretty solid and even includes some code snippets to see how it might work.
Conclusion: Can Bard help with coding?
Obviously I didn’t give Bard the prompt to write the actual summary_article procedure, because we set it up not being able to code.
But contrary to Google’s own claims, it’s clear that Bard can certainly assist with encryption, at least in terms of locating resources and helping to sift through data to find relevant information in those resources.
Also: The best AI chatbots to try
Some of Bard’s answers are more nuanced than ChatGPT, with it pointing to licensing issues in one question and the pros and cons of different libraries in another. It was a win for Bard.
I’m planning to dig deeper into how Bard can help with technical challenges. ChatGPT did pretty well on those challenges, so I was curious to see how Bard did. Keep stable.
That said, from both Sabrina’s tests and Google’s own FAQ, I would have expected Bard to crash and burn with anything coding related, but that’s not the case. . Based on my initial testing, Bard can act as a useful research aid for coding problems and can help save time.
Also: How to use ChatGPT: What you need to know
Now, to be fair, I would definitely choose ChatGPT over Bard if I needed help with coding. But Bard isn’t completely game-free, and I can see it being really useful as a source of second opinions for many different types of research. After all, I’ve discovered ChatGPT is just making things up instead of admitting it doesn’t know the answer to something. Bard has proven real usefulness with the coding examples above, adding value and nuance that ChatGPT missed, even though Bard hasn’t been able to actually code…
You can follow my daily project updates on social media. Remember to follow me on Twitter at @DavidGewirtzon Facebook at Facebook.com/DavidGewirtzon Instagram at Instagram.com/DavidGewirtzand on YouTube at YouTube.com/DavidGewirtzTV.