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
“Cybersecurity shortage” could reach 85 million workers by 2030
The global talent shortage could reach 85 million workers by 2030, causing approximately $8.5 trillion in unrealized annual revenue.
Why AI playing video games is a big deal
Google’s SIMA can follow human instructions to play 3D video games. Researchers hopes the platform can one day help AI navigate real-world environments.
With inspiration from “Tetris,” MIT researchers develop a better radiation detector
A new detector system based on the game “Tetris” could enable inexpensive, accurate radiation detectors for monitoring nuclear sites.
In a future with brain-computer interfaces like Elon Musk’s Neuralink, we may need to rethink freedom of thought
In a future with more “mind reading,” thanks to computer-brain interfaces, we may need to rethink freedom of thought.
OpenAI and Microsoft are reportedly planning a $100B supercomputer
Microsoft is reportedly planning to build a $100 billion data center and supercomputer, called “Stargate,” for OpenAI.
Up Next
Exit mobile version