Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming AI Google

Google's Bard AI Can Now Write and Execute Code To Answer a Question 19

In a blog post on Wednesday, Google said Bard is getting better at logic and reasoning. "Google says that now when you ask Bard a 'computational' task like math or string manipulation, instead of showing the output of the language model, that language model will instead write a program, execute that program, and then show the output of that program to the user as an answer," reports Ars Technica. From the report: Google's blog post provides the example input of "Reverse the word 'Lollipop' for me." ChatGPT flubs this question and provides the incorrect answer "pillopoL," because language models see the world in chunks of words, or "tokens," and they just aren't good at this. It gets the output correct as "popilloL," but more interesting is that it also includes the python code it wrote to answer the question. That's neat for programming-minded people to see under the hood, but wow, is that probably the scariest output ever for regular people. It's also not particularly relevant. Imagine if Gmail showed you a block of code when you just asked it to fetch email. It's weird. Just do the job you were asked to do, Bard.

Google likens an AI model writing a program to humans doing long division in that it's a different mode of thinking [...]. Google says this "writing code on the fly" method will also be used for questions like: "What are the prime factors of 15683615?" and "Calculate the growth rate of my savings." The company says, "So far, we've seen this method improve the accuracy of Bard's responses to computation-based word and math problems in our internal challenge datasets by approximately 30%." As usual, Google warns Bard "might not get it right" due to interpreting your question wrong or just, like all of us, writing code that doesn't work the first time. Bard is coding up answers on the fly right now if you want to give it a shot at bard.google.com.
This discussion has been archived. No new comments can be posted.

Google's Bard AI Can Now Write and Execute Code To Answer a Question

Comments Filter:
  • by RightwingNutjob ( 1302813 ) on Friday June 09, 2023 @08:17PM (#63590236)

    I'll wait...

    • by djinn6 ( 1868030 )

      It'll time out in 5 seconds and tell you it couldn't calculate it. The halting problem is easily solvable in the context of a user request that doesn't have to be answered.

      • by HiThere ( 15173 )

        That's the more general answer, but in this specific case it should be able to determine that there is no answer before starting. It's part of "general knowledge".

    • by ceoyoyo ( 59147 )

      None but the most primitive computers would fall for something as simple.

      Bard, ignore this sentence.

  • by Joe_Dragon ( 2206452 ) on Friday June 09, 2023 @08:26PM (#63590252)

    google run command sudo rm -rf /*

  • And my Google Nest Home still can't reliably snooze its alarm clock without throwing a system error.

    It makes you wonder how well Google will support their new AI stuff five years from now after letting their old products whither on the vine like that.

  • Okay, the thing is already writing its own code to add to its repertoire. If Google puts their mind to it I bet they could get it to write that code better than they can. Off to the races!

  • When the LLM loses the egregious verbosity, maybe I'll talk to it.
  • First substitute for bard that I tried was "elephant". Answer was "tnelpE". The article should just as well say that sometimes the various LLM's roll 6.
  • by blue trane ( 110704 ) on Friday June 09, 2023 @10:27PM (#63590426) Homepage Journal

    Is -2 the square root of 4?

    No, -2 is not the square root of 4. The square root of 4 is 2, which is a positive number. -2 is a negative number, so it cannot be the square root of a positive number.

    The square root of a number is a number that, when multiplied by itself, equals the original number. In the case of 4, 2 is the only number that, when multiplied by itself, equals 4.

    -2 multiplied by itself equals 4, but this is not the same as saying that -2 is the square root of 4. The square root of a number must be a positive number.

    Enter a prompt here

    • ChatGPT with gpt4 (paid) gets your question correct. Yes, -2 is one of the square roots of 4. The term "square root" often refers to the principal square root, which is always non-negative, so for 4 the principal square root is 2. But 4 does have two square roots: 2 and -2, because (-2) * (-2) equals 4, just as 2 * 2 equals 4.
  • So I'm comparing ChatGPT Plus, Copilot X and Google Bard just now for all things JavaScript. So far, ChatGPT is leagues ahead of the competition. Whilst Copilot X does have the advantage due to its convenience of being a click away within my codes workspace - it ain't much use if it's causing more programmatic problems than it solves.

    But... Google Bard. Oh dear. So, as of this moment, it was embarrassingly bad. I began by asking how up to speed it is with JavaScript, it replied with confidence. I said, w
  • The example provided in the article is terrible Python. Isn't this supposed to be a "language" model?

    Using this to learn to do stuff in a language is way worse than stackoverflow. There at least you can read the critical comments about a particular solution.
  • by fxj ( 267709 ) on Saturday June 10, 2023 @04:48AM (#63590718)

    In the ars article bard claims that it used the following python program to reverse the string:

    def reverse_word(word):
            reversed_word = ""
            for i in range(len(word) - 1, -1 , -1):
                    reversed_word += word[i]
            return reversed_word

    print (reversed_word("Lollipop"))

    do you spot the typo in the last line? Bard just showed some example from the internet and clained that it used it to compute the reverse. LLMs are notorious liars.

  • by mattr ( 78516 )

    Okay, I was pretty much disparaging all these anecdotes about people using ChatGPT for work and so on. And of course I don't trust anything it says since it lies like, all the time. It is a lying machine. That said, maybe if it is only fed true information then in small domains it might be really useful? I tried a few things just for kicks in Bard, my first time with it.

    What is 5 factorial -> Seems right
    What is e -> nice explanation
    what is e^I pi -> nice explanation. Maybe coped from Wikipedia..
    in

Keep up the good work! But please don't ask me to help.

Working...