Trained on vast amounts of text, these large language model AIs are capable of creating some pretty interesting stuff. OpenAI’s GPT-4 has shown some impressive capabilities when it comes to code — most famously in turning a literal napkin sketch into a working website.
Bard now has a suit of coding features designed to help handle various software and program development tasks, as well as providing explanations of what the code does.
Google has found itself in an unusual position in the AI wars, put on the back foot by Microsoft-backed OpenAI and even smaller competitors like Anthropic. As of last month, when TechCrunch asked Bard, GPT-4, and Claude to write some simple code head-to-head, Bard simply declined, while GPT-4 and Claude gave some passable (if buggy) code.
Now, Google has rolled out a suite of coding features for Bard, designed to help handle various software and program development tasks, as well as providing explanations of what the code does, which may be especially helpful for beginners or programmers striking off into a different language or application than usual.
“Since we launched Bard, our experiment that lets you collaborate with generative AI, coding has been one of the top requests we’ve received from our users,” Paige Bailey, group product manager at Google Research, wrote in a blog post announcing the features.
Google’s own engineers had been putting the AI through its paces before its launch, Insider reported from internal emails.
In addition to creating code, Bard can help streamline it, as well.
“In many cases, Bard can also help optimize your code by making it faster or more efficient,” Bailey said. “Just respond to Bard’s initial output with ‘Could you please make that code faster?’ or ‘Find error handling clauses you might have missed.’”
As anyone who’s asked ChatGPT to do some simple math, cite a scientific study, or fed it a jailbreak hack knows, AIs are far from infallible. They “hallucinate,” basically making things up. They also present incorrect conclusions with the unchecked confidence of a high school quarterback in a soft conference.
“Bard is still an early experiment, and may sometimes provide inaccurate, misleading or false information while presenting it confidently,” Bailey said. “When it comes to coding, Bard may give you working code that doesn’t produce the expected output, or provide you with code that is not optimal or incomplete.”
Bailey recommended double checking the chatbot’s code, and looking closely for errors or vulnerabilities before incorporating it. Bard does come with the ability to debug code, including its own; just tell it something didn’t work and ask for a fix, and the AI will try.
“With new coding capabilities, we’re excited to apply generative AI to accelerate software development, inspire innovation, and help people solve complex engineering challenges,” Bailey said.
We’d love to hear from you! If you have a comment about this article or if you have a tip for a future Freethink story, please email us at [email protected].