create account

🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108) by ace108

View this thread on: hive.blogpeakd.comecency.com
· @ace108 ·
$9.25
🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)
<html> 
<br>

Woke up too early in the morning but not early enough to try to fall asleep again. I decided to whip up and my phone and do a bit of experiment to compare how well ChatGPT do against Bard in Python programming. <center> <img src="https://i.ibb.co/sv4Qn1Y/Slide59.jpg" alt="@ace108" border="0"> </center><br><br>






<h3>
🎶Meanwhile, some music for you to enjoy as you read. This piece is part of Vivaldi’s The Four Seasons, particularly the first of the 4 violin concertos, called Spring. 
<blockquote>
🎶让大家继续读的时候,欣赏一点音乐。这件作品是维瓦尔第的“四季”的一部分 - 4小提琴协奏曲中的第一首,名为“春天”。
</blockquote>
Source | 来源: <a
href="https://musopen.org/"
target="_blank">https://musopen.org/</a><br>
</h3>
https://soundcloud.com/alan-chang-563971986/four-concerti-grossi-4-vivaldi-op8-i-la-primavera-allegro-largo-allegro
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/303622945&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
Source | 来源: https://musopen.org/music/2213/antonio-vivaldi/the-four-seasons/
<hr>

Half awake (which explained the typo and grammar error), I tried to prompt engineer ChatGPT to tell my the other file format to consider and it listed a few. <center> <img src="https://i.ibb.co/BB3Bbz6/Slide60.jpg" alt="@ace108" border="0"> </center><br><br>
I copied the same prompt and run it through Bard and the list is slightly different but the first 3 are the same. <center> <img src="https://i.ibb.co/ykRvdXN/Slide61.jpg" alt="@ace108" border="0"> </center><br><br>
Then I went back to ChatGPT and asked to create a Python function to convert a CSV or (with a typo of "of" instead of "or") Excel file to Parquet with the same filename in the same file folder as the input file and give a table with 3 rows of output with the first two rows showing the input and output filenames and the 3rd row showing the Python code I can use to read in the created Parquet file. <center> <img src="https://i.ibb.co/18GzFzf/Slide62.jpg" alt="@ace108" border="0"> </center><br><br>
It spat out the code quite fast.<center> <img src="https://i.ibb.co/sJXg3H2/Slide63.jpg" alt="@ace108" border="0"> </center><br><br>
I didn't look at it in detail.<center> <img src="https://i.ibb.co/nn5T8C3/Slide64.jpg" alt="@ace108" border="0"> </center><br><br>
Then I copied the prompt and run it through Bard. The code was also spat out quite fast. <center> <img src="https://i.ibb.co/xDPW8nd/Slide65.jpg" alt="@ace108" border="0"> </center><br><br>
What I saw which wasn't there before was an option to export to Colab which I thought was pretty cool.<center> <img src="https://i.ibb.co/h7d7xRw/Slide66.jpg" alt="@ace108" border="0"> </center><br><br>
So I tried that but I didn’t run it because I didn't have a file for it read.<center> <img src="https://i.ibb.co/41VcnQf/Slide67.jpg" alt="@ace108" border="0"> </center><br><br>
After I got up, I decided to test the code for ChatGPT first. The output table came out with 3 columns instead of 3 rows I asked out.<center> <img src="https://i.ibb.co/7bSSdVg/Slide68.jpg" alt="@ace108" border="0"> </center><br><br>
I tested the Python code generated from the program to read the Parquet file that was created and it worked quite well. <center> <img src="https://i.ibb.co/M9H7nY2/Slide69.jpg" alt="@ace108" border="0"> </center><br><br>
Then I tried the program created by Bard which gave an error because it was reading my Excel file as a CSV. I guessed it didn't like the typo in my promt. <center> <img src="https://i.ibb.co/j5NPcbH/Slide71.jpg" alt="@ace108" border="0"> </center><br><br>
I fixed that and got a different error. So, I had to do a bit more debugging.<center> <img src="https://i.ibb.co/Yykykmb/Slide72.jpg" alt="@ace108" border="0"> </center><br><br>
Finally, I tried the the Python code generated from the program to read the Parquet file that was created.<center> <img src="https://i.ibb.co/dMHZPvW/Slide73.jpg" alt="@ace108" border="0"> </center><br><br>
It came out well. <center> <img src="https://i.ibb.co/dKPMN2q/Slide74.jpg" alt="@ace108" border="0"> </center><br><br>
Based on this limited experiment, it is probably not fair to to make a definitive conclusion about which model is better. ChatGPT produced closed to the desired Python code well including accomodating my typo and grammar error but had an issue. Bard didn't do well probably due to typo in the prompt but produced worked after a bit of debugging. Additionally, Bard offered a unique feature to export to Colab, which was nice. So, I think I'd go to ChatGPT first and if the result is good enough, then I can skip Bard.




 

<center><img src="https://i.imgur.com/Wti5OoD.png" alt="SEPARATOR-ace" border="0"></center>

Please see my other posts: @ace108<br>
<blockquote>请看我其他帖: @ace108 </blockquote>

<hr>
<center><img src="https://i.imgur.com/EnAxOkQ.gif" alt="I See👀. Shoot📷. I Blog it👆😎" border="0"></center>

<br>
<br>

</html>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 64 others
properties (23)
authorace108
permlinkdiving-into-prompt-engineering-assessing-chatgpt-and-bard-for-python-programming-by-ace108
categoryai
json_metadata"{"tags":["ai","chatgpt","bard","promptengineering","proofofbrain","neoxian","palnet","creativecoin"],"users":["ace108"],"image":["https://i.ibb.co/sv4Qn1Y/Slide59.jpg","https://i.ibb.co/BB3Bbz6/Slide60.jpg","https://i.ibb.co/ykRvdXN/Slide61.jpg","https://i.ibb.co/18GzFzf/Slide62.jpg","https://i.ibb.co/sJXg3H2/Slide63.jpg","https://i.ibb.co/nn5T8C3/Slide64.jpg","https://i.ibb.co/xDPW8nd/Slide65.jpg","https://i.ibb.co/h7d7xRw/Slide66.jpg","https://i.ibb.co/41VcnQf/Slide67.jpg","https://i.ibb.co/7bSSdVg/Slide68.jpg","https://i.ibb.co/M9H7nY2/Slide69.jpg","https://i.ibb.co/j5NPcbH/Slide71.jpg","https://i.ibb.co/Yykykmb/Slide72.jpg","https://i.ibb.co/dMHZPvW/Slide73.jpg","https://i.ibb.co/dKPMN2q/Slide74.jpg","https://i.imgur.com/Wti5OoD.png","https://i.imgur.com/EnAxOkQ.gif"],"links":["https://musopen.org/"],"app":"hiveblog/0.1","format":"html","description":"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎"}"
created2023-05-23 13:57:48
last_update2023-05-23 13:57:48
depth0
children15
last_payout2023-05-30 13:57:48
cashout_time1969-12-31 23:59:59
total_payout_value4.637 HBD
curator_payout_value4.618 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,032
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,758,378
net_rshares19,608,634,990,645
author_curate_reward""
vote details (128)
@doitvoluntarily ·
tried one of the graphic art ones they turn out some interesting stuff lol
properties (22)
authordoitvoluntarily
permlinkrw7nl3
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-06-13 21:26:33
last_update2023-06-13 21:26:33
depth1
children1
last_payout2023-06-20 21:26:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length74
author_reputation1,412,689,148,080,496
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,431,761
net_rshares0
@ace108 ·
I was wanting to try mid-journey but having been busy. I tried bit of dall-e and craiyon but I don't have fancy requires and then https://bing.com/create came along which works well for occasional needs. Now, I just prompt the bing chat directly. It generates 4 images for review quite well.
properties (22)
authorace108
permlinkrw7r4g
categoryai
json_metadata{"links":["https://bing.com/create"],"app":"hiveblog/0.1"}
created2023-06-13 22:43:30
last_update2023-06-13 22:43:30
depth2
children0
last_payout2023-06-20 22:43:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length291
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,433,771
net_rshares0
@lichtblick ·
Interesting. Rehived.
👍  
properties (23)
authorlichtblick
permlinkrv4kgo
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-05-23 18:53:12
last_update2023-05-23 18:53:12
depth1
children1
last_payout2023-05-30 18:53:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length21
author_reputation735,159,689,925,082
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,765,886
net_rshares0
author_curate_reward""
vote details (1)
@ace108 ·
$0.08
Thanks
👍  
properties (23)
authorace108
permlinkrv7qwt
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-05-25 12:05:18
last_update2023-05-25 12:05:18
depth2
children0
last_payout2023-06-01 12:05:18
cashout_time1969-12-31 23:59:59
total_payout_value0.040 HBD
curator_payout_value0.040 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,819,421
net_rshares174,909,376,419
author_curate_reward""
vote details (1)
@magicmonk ·
@tipu curate
properties (22)
authormagicmonk
permlinkre-ace108-rv489l
categoryai
json_metadata{"tags":["ai"],"app":"peakd/2023.5.1"}
created2023-05-23 14:29:42
last_update2023-05-23 14:29:42
depth1
children2
last_payout2023-05-30 14:29:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation1,097,085,929,118,678
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,759,111
net_rshares0
@ace108 ·
Thank you
properties (22)
authorace108
permlinkrvcvmn
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-05-28 06:35:12
last_update2023-05-28 06:35:12
depth2
children0
last_payout2023-06-04 06:35:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,908,670
net_rshares0
@tipu ·
<a href="https://tipu.online/hive_curator?magicmonk" target="_blank">Upvoted  &#128076;</a> (Mana: 16/66) <a href="https://peakd.com/hive/@reward.app/reward-app-quick-guide-updated" target="_blank">Liquid rewards</a>.
properties (22)
authortipu
permlinkre-re-ace108-rv489l-20230523t142946z
categoryai
json_metadata"{"app": "beem/0.24.26"}"
created2023-05-23 14:29:45
last_update2023-05-23 14:29:45
depth2
children0
last_payout2023-05-30 14:29:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length217
author_reputation55,902,105,514,997
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,759,114
net_rshares0
@malos10 · (edited)
bard is really good,  due it is free i like more bard than chatgpt
👍  
properties (23)
authormalos10
permlinkre-ace108-2023526t202613230z
categoryai
json_metadata{"tags":["ai","chatgpt","bard","promptengineering","proofofbrain","neoxian","palnet","creativecoin"],"app":"ecency/3.0.32-vision","format":"markdown+html"}
created2023-05-27 00:26:15
last_update2023-06-13 21:33:45
depth1
children1
last_payout2023-06-03 00:26:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length66
author_reputation648,473,688,800,227
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,872,494
net_rshares0
author_curate_reward""
vote details (1)
@ace108 ·
I think it's still useful. As tbey try to outdo each other, i hope we all benefit from it.
properties (22)
authorace108
permlinkrvcitg
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-05-28 01:58:30
last_update2023-05-28 01:58:30
depth2
children0
last_payout2023-06-04 01:58:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length90
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,903,889
net_rshares0
@maxwellmarcusart ·
It's good to do comparison to whether there are much difference. From your research, I believe there are not much difference though they varies.
properties (22)
authormaxwellmarcusart
permlinkre-ace108-rvmwze
categoryai
json_metadata{"tags":["ai"],"app":"peakd/2023.6.2"}
created2023-06-02 16:40:30
last_update2023-06-02 16:40:30
depth1
children1
last_payout2023-06-09 16:40:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length144
author_reputation1,204,932,252,560,174
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,099,662
net_rshares0
@ace108 ·
I think they have different strengths. So, sometimes have to try both
properties (22)
authorace108
permlinkrvnnjg
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-06-03 02:14:06
last_update2023-06-03 02:14:06
depth2
children0
last_payout2023-06-10 02:14:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id124,111,000
net_rshares0
@mizuosemla ·
AI is everything these days wow 😮
 🥦 !HUG 🥦
properties (22)
authormizuosemla
permlinkre-ace108-2023524t193352993z
categoryai
json_metadata{"tags":["ai","chatgpt","bard","promptengineering","proofofbrain","neoxian","palnet","creativecoin"],"app":"ecency/3.0.39-mobile","format":"markdown+html"}
created2023-05-24 17:33:51
last_update2023-05-24 17:33:51
depth1
children1
last_payout2023-05-31 17:33:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length43
author_reputation139,924,481,738,441
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,794,769
net_rshares0
@hug.bot ·
@mizuosemla, sorry!

You are out of hugs for today.

You can call the HUG bot a maximum of 3 per day.

The current call limits are:

|HUG in wallet|calls per day|
|-|-|
|0|1|
|1|2|
|10|3|
properties (22)
authorhug.bot
permlinkre-re-ace108-2023524t193352993z-20230524t205737z
categoryai
json_metadata"{"app": "beem/0.24.26"}"
created2023-05-24 20:57:39
last_update2023-05-24 20:57:39
depth2
children0
last_payout2023-05-31 20:57:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length188
author_reputation705,845,356,207
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,800,060
net_rshares0
@xplosive ·
> So, I think I'd go to ChatGPT first and if the result is good enough, then I can skip Bard.

Seeing the development of the AI, probably it is good to check other solutions from time to time. Probably there will be better solutions over time. And probably the ChatGPT and the Bard will also be improved over time. And the results can also be different from task to task. There could be tasks, in which Bard is (or will be) better than ChatGPT. After all, it is an expressedly experimental conversational AI service.
👍  
properties (23)
authorxplosive
permlinkre-ace108-2023524t64830819z
categoryai
json_metadata{"tags":["ai","chatgpt","bard","promptengineering","proofofbrain","neoxian","palnet","creativecoin"],"app":"ecency/3.0.39-mobile","format":"markdown+html"}
created2023-05-24 05:48:33
last_update2023-05-24 05:48:33
depth1
children1
last_payout2023-05-31 05:48:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length516
author_reputation205,670,273,106,267
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,780,012
net_rshares5,757,600,967
author_curate_reward""
vote details (1)
@ace108 ·
$0.03
Things are moving so fast. The competition must be intence.
👍  ,
properties (23)
authorace108
permlinkrv9u54
categoryai
json_metadata{"app":"hiveblog/0.1"}
created2023-05-26 15:10:18
last_update2023-05-26 15:10:18
depth2
children0
last_payout2023-06-02 15:10:18
cashout_time1969-12-31 23:59:59
total_payout_value0.014 HBD
curator_payout_value0.014 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length59
author_reputation1,219,881,571,293,136
root_title"🤖Diving into Prompt Engineering: Assessing ChatGPT and Bard for Python Programming😎(by @ace108)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,856,662
net_rshares63,756,498,447
author_curate_reward""
vote details (2)