aum Posted May 13, 2023 Share Posted May 13, 2023 Letās see how Bard does vs.Ā ChatGPT, without preconceptions or hype. One personās totally unscientific, anecdotal, but realistic field experiment. Ā Apricot is an āAI-poweredā product in a few ways. Most directly, the Apricot app uses a large language model (LLM) service for on-demand content summaries. Behind the scenes, I use LLM chat bots to write drafts of both new code and marketing content, like LinkedIn posts and Tweets. Ā So far, Iāve used ChatGPT for this (GPT-3.5 for the API, GPT-4 in the chat window), but Google made Bard generally available this week and upgraded it to use its new PaLM 2 LLM and the hype men came out in predictable force. A Bard hype tweet. One example of many. Many of the examples in these hype tweets donāt stand up to scrutiny, in terms of being meaningful for everyday use. Ā Sure, Bard can export code directly to Google Colab, but Ctrl-C, Ctrl-V into a notebook isnāt that hard either. Yes, Bard can get yesterdayās stock returns, but so can Yahoo Finance. Sometimes the examples just donāt replicate. I asked Bard for specific SEO tips for Apricotās landing page and it gave generic suggestions. Fine, but nothing special. Voice prompts are probably very helpful to some people, but not a deciding factor for most. Ā I donāt want to fall behind the pack, though, so letās put Bard to the test vs.Ā ChatGPT for my actual Apricot-related use cases. Some context This is not a scientific study, clearly. Once upon a time, I enjoyed doing controlled, in-depth, technical comparisons of ML models, but those days are past. In this post, Iām going to take about an hour to explore a few use cases, make a decision, and move on to the rest of my long to-do list. The competitors OpenAI ChatGPT, with the GPT-4 model, in the chat window at https://chat.openai.com/. I pay about $20/month for this. Google Bard, in the chat window at https://bard.google.com/. Iām not sure what the model is under the hood, so minus 1 point for Google. But itās free, so plus 1 point and weāre back to even. Challenge and Results 1. Summarize long-form content Benn Stancil writes a great data science newsletter but his headlines are super vague. Take Stancilās post The new philosophers as an exampleāI have no idea whatās its about from the title alone. Letās ask our AI assistants to summarize the content, so we know if itās worth our time to read. Ā My prompt to each system is the same as the Apricot Appās prompt for on-demand user-facing summaries:1 Ā Summarize the following content in one sentence: āāā{text}āāā ChatGPT says: Ā Bard says: Well, hang on a secā¦Bard truncates the input, and itās not obvious where. Letās hope Stancil didnāt save the punchline for the very endā¦Kinda surprising, to be honest, when other tools are expanding the context window dramatically. At any rate, Bardās answer is: Ā Ā Side note: the View other drafts option is intriguing but Iām not sure it makes sense, from a product perspective. Wouldnāt it be better to iterate with a new prompt if I donāt like the response? I donāt have the patience to read three answers every time I use the tool. Ā Winner: ChatGPT Ā Bardās summary is too terse; it conveys very little information. ChatGPT, on the other hand, captures explicitly that the next evolution of the data management tools will be about AI specifically and could be a fundamental, discontinuous change. 2. Write a Python function Users coming to Apricot from an RSS reader can import their feeds in bulk with an OPML file. When I set out to build this feature, I didnāt know much about OPML so I asked ChatGPT to write the core parsing code. Write a Python function to parse an OPML file. ChatGPTās answer: import xml.etree.ElementTree as ET def parse_opml(file_path): # Parse the OPML file tree = ET.parse(file_path) root = tree.getroot() # OPML should have a 'body' child, which contains 'outline' elements body = root.find('body') outlines = [] for outline in body.findall('outline'): # Each outline should have 'text' attribute text = outline.get('text', '') # Append it to our list outlines.append(text) return outlines Bardās code: def parse_opml(filename): """Parses an OPML file. Args: filename: The path to the OPML file. Returns: A list of dictionaries, where each dictionary represents an outline item. """ with open(filename, 'r') as f: xml = f.read() # Parse the XML into a tree. tree = ET.fromstring(xml) # Get the outline items. outline_items = [] for outline_item in tree.findall('outline'): outline_item_dict = {} outline_item_dict['title'] = outline_item.find('title').text outline_item_dict['url'] = outline_item.find('xmlUrl').text outline_items.append(outline_item_dict) return outline_items OK, this is not the biggest thing, but why on earth does Bard use indentation with 2 spaces instead of the standard 4? This drove me up the wall, so I tried all sorts of prompts to get Bard to use indentation with 4 spaces but they all failed. There must be some sort of post-processing thing going on, but thatās strange because Googleās official style guide says to use 4 spaces. Ā Moving on. Ā Frankly, both of these code snippets are pretty bad. ChatGPTās code only extracts the text field of each entry in the OPML file, but thereās typically other important stuff like URLs. Ā Bardās code looks better at first glance because it does try to extract multiple fields (title and xmlUrl) from each entry. But it fails to run because it uses the ElementTree class without importing it first. Once thatās fixed, it runs but returns an empty list because it fails to understand that the findall method only searches direct children of the current node, but the individual outline elements are nested two levels deep. Ā Itās no surprise that the code isnāt perfect on the first pass; what matters is how quick and easy it is to iterate to a good version. For ChatGPT, I extended the conversation to say Please extract all fields from each outline element of the input file into a Python dict. and it updated the code to an elegant, correct answer. Ā For Bard, I replied Please update the code to parse outline elements in the body of the input document. and it did fix the known problem. But the new code still doesnāt work because it fails to recognize that for OPML outline elements, the data is stored as tag attributes, not encapsulated text. Sigh. š Ā Winner: ChatGPT 3. Social media marketing tactics As a bootstrapped, solo project, Apricot has relied so far on social media and content marketing. Itās about time to make a Show Hacker News post, whichādone wellācan generate a big spike in traffic and sign-ups. Letās ask our AI assistants to how to make the post successful. Bard first this time: Ā Ā And now ChatGPT, with the same prompt: Ā Ā Unlike the code challenge, this time both answers feel pretty good! š„³ Ā Both LLMs include tips about both content and logistics, as requested, both seem to understand the Hacker News culture, and both give good, ācorrectā advice. My only complaint is that both are very generic. Compare to this post on Indie Hackers, which gives a very specific recipe for posting successfully on Hacker News2. Ā Winner: tie 4. Write a customized Tweet Continuing in the same vein, I often use ChatGPT to write first drafts of Apricot marketing content. The difference with this challenge is that the content needs to be about Apricot specifically or even a particular blog post topic. This time Iāll use a bit of prompt engineering to get the tone I want. Ā Letās do Bard first again: Ā Yikes! I didnāt think this would be a particularly sensitive request. Letās click that Regenerate drafts button a few times⦠  And now ChatGPT: Ā Looks great, but it doesnāt fit within the character limit! I had to remove the hashtags to make it fit. Ā Winner: tie Ā I like ChatGPTās emojis and hashtags but Bardās text-only version is a fair response to my guidance of a ādirect, no-spamā brand. Bard refused to answer at all at first, but ChatGPTās response was too long. Both tweets are live, so you can vote yourself. š Ā Bard tweet ChatGPT tweet And the overall winner isā¦. ChatGPT. Ā ChatGPT beat Bard pretty convincingly in summarization and Python coding. Thatās worth $20/month to me, at least for now, despite the fact that they tied in Tweet and marketing tactics generation. Ā Iām happy thereās competition and I suspect Bard will improve quicklyāI look forward to re-doing this test again soon! Footnotes The text of the article goes in the {text} slot, of course.ā©ļø In short, use a tool (like Apricot!) to find news articles in your area of expertise as soon as theyāre published and post them quickly. Ā Source Quote Link to comment Share on other sites More sharing options...
Akaneharuka Posted May 14, 2023 Share Posted May 14, 2023 I bet the person who wrote this artist also use ChatGPT to wrote this too 𤫠Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.