I am just sharing my random trial with Google Bard and its comparison to ChatGPT.
At this time google Bard is still in Beta Experimental mode, however it should show somewhat expected result that we expect from a Tech Giant - Google ! But it fails to meet that expectation ! Below are some screenshots from both Google Bard and ChatGPT with same prompts
Prompt : Create a php script to parse .HTML and extract all text contents in the paragraph elements with the following requirements: all paragraphs with a class = ‘important’
ChatGPT
now lets run this code and test - it worked !
now, it is google Bard
and time to test, I dont want to use a local .html file, hence I just use the same inline html content from the chatGPT code but rest of the parsing is done by Google Bard
so it failed, we know why ! But how come Bard could not succeed a simple query like this ? wait sec to kick Bard out, there is a button says ’ View other Drafts’ in the Bard page, oh, it shows few other options / version of the code for same query. So unlike chatGPT, Bard is giving us multiple answers for one prompt and we have to choose which works the best. Yes, some AI helping us to choose instead of telling us what to do ? :)
so in the third draft, I see this code
Now, lets run that and code it works !
So, chatGPT used ‘xpath’ and Bard used normal class property comparison, both works as per the requirement.
lets do one more prompt -
generate python code : “Create a multidimensional array with 3 keys. Each key should have 2 values, and each of those values will become inner keys. Each inner key will have 3 additional values. For example, the main keys are Engineering, Agriculture, and Travel. The example values for Engineering are Marine, Aero, and Army. The example values for Agriculture are herbal, food, and solar. The values for Travel are ship, car, and rail.”
so chatGPT gave me
and Bard gave me
Both are good but if you can notice the difference as Bard gave some real values instead just ‘value1’, ‘value2’. This may not be much of an advantage but something cool.
There are few addition offers Google Bard provides, for example you can export and open the generated code into few options
so consider if you are generating an email or resume or some thing - you can directly export into your email. What does it save ? just few clicks :) just because google has monopoly on email :)
The last option is to open the generated code into Colab. If you dont know what it is, just read it here
Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education. More technically, Colab is a hosted Jupyter notebook service that requires no setup to use, while providing access free of charge to computing resources including GPUs.
So which one is better, I would say chatGPT at this point since it provides better answers, stick to the point while Google Bard is trying to give us a lot more than what we ask.
But lets wait and see how this AI war goes on :)
Update : I could not find a good featured image for the text ’ chatGPT vs Google Bard ‘, all of the good images in Google image search are copyrighted. Hence I used Bing AI to create an image for me for the text ‘chatGPT vs Google Bard’ and Bing says ’ content blocked !! '
So I just generated another image with prompt ‘Two people boxing ’ and voila,I got the image that you are seeing as the Featured Image now :)








