Google chatbot “Bard” can now code in 20 languages

The AI can now write, explain, streamline, and debug code in two dozen programming languages.

Never one to be left out of a Silicon Valley arms race, Mountain View behemoth Google rolled out its own chatbot AI, called Bard, to compete with the GPTs and Claudes of the world. 

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.

Specialized AI coding systems, like Github’s Copilot (powered by OpenAI) and Replit’s Ghostwriter, are already available to the public and showing big potential to boost programmer productivity.

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.

Bard is now capable of coding in over 20 programming languages, Bailey said. C++, Go, Java, Javascript, Typescript, and Python are all within the programming polyglot’s capabilities, and it can translate from one language to another, TechCrunch reported. The AI is also now capable of writing functions for Google Sheets. When it pulls from open source code, it will also cite it.

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.’”

Bard can also debug code, including its own; just tell it something didn’t work and ask for a fix, and the AI will try. 

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 tips@freethink.com.

Related
Why the USSR and China fell behind the US in the Chip Cold War
The US is currently winning the “chip war” with China, but to stay ahead, experts say it needs to start manufacturing microchips stateside.
Silicon chips are no longer sustainable. Here’s what’s next.
To take our tech to the next level, we need a more energy-efficient semiconductor. Gallium nitride could be it.
Is this the biggest industrial espionage campaign in history?
The cat-and-mouse game between China and the world’s semiconductor companies is already having enormous consequences.
AI is now designing chips for AI
AI-designed microchips have more power, lower cost, and are changing the tech landscape.
The next big tech trend will start out looking like a toy
In “Read, Write, Own: Building The Next Era of the Internet,” investor Chris Dixon explains why the biggest trends often go overlooked.
Up Next
Exit mobile version