Tried it and love it. This is still not at par with ChatGPT 3.5. I use ChatGPT all the time, and will increase use of Bard from now.
Good that Bard is aware of latest version of software (eg. NextJS). Helps when APIs of a software evolves quickly.
I use a lot of Google products and really hope that they manage to nail it as at least #2 player in the space. As a company, they have not proven to come back and take the lead from behind.
GPT-4 has a lot of problems with recent versions of APIs. Working with Cloudflare workers was initially painful because of the dated code it would generate. The code would be valid, it just didn't work with the initial scaffolding wrangler generated.
I've found copying and pasting chunks of the API context into the prompt solves 99% of it. I'm now able to get it to generate modern workers just fine. You can copy an example method signature, some docs, etc. and it picks up on that fairly reliably. I've even just copy-and-pasted an entire worker implementation (100+ LoC) at the beginning of a prompt and that worked.
I don’t bother much with prompt engineering. I just treat ChatGPT as a pair programmer who can’t see my editor. I tell it where files are, what I’m using, copy and paste relevant code in, and it just works.
The big “breakthrough” for me was unlearning all of my search engine habits of thinking I need to be precise and talk to it like a machine. I use compliments like “that’s great” and it seems to reinforce good answers well enough.
Just treat it like a human on the other side of the screen and adjust as necessary.
Also pay the $20 - GPT-3.5 is not good, GPT-4 is junior engineer good. Most of my time is now spent describing problems to it and code reviewing what it does.
Edit: I do use prompt engineering when I’m building AI enabled products to help keep things on the rails. But for my personal use of ChatGPT I just let ‘er rip.
Remember you are not an AI. You are a human, so it takes you significantly more time to read a response and produce another query. 25 messages every 3 hours is a lot when you're doing what parent described. When I'm programming, I also do other things too. 3 hours goes by fast.
Nothing it produces is that many lines. How is that not debuggable? If you can’t, you’re having it do things you don’t even understand and blindly implementing and seems like a user issue. Additionally, take the code and ask it to write tests and validation scripts with your expectations.
> If you can't, you're having it do things you don't even understand and blindly implementing
Today's programming is not SICP in scheme, it is more plumbing between very large bodies of code. Using GPT is a great way to short cut needing to learn lots of details about code bases you only need for one specific feature. Recently though, by integrating two pieces of code I do know a lot about, I lost a lot of confidence in GPT coding.
For example, I asked it to implement a small script in emacs that would loop through org text files in emacs, and run some commands based on keybindings. That's it.
It messed up the usage of recursive-edit (which is a complicated feature itself), it produced many bugs in how Org utilizes indirect buffers, it sends windows around instead of buffers in the variables, and it wrote lots of contradictory code.
I understand how all these features work, and I went through and started fixing all the bugs. I would tell it about each bug, but it was producing so many subtle bugs with org-mode, inventing functions that didn't exist and it couldn't define... I gave up and just re-implemented it myself.
So no, I do not understand 100% of all code I refer to when I write code, that's why APIs actually exist.
But copilot actually outputs code into your project, do you really want citations there? I prefer to just enable the setting for it to not reproduce code verbatim from other projects.
Sounds like a codebase filled with the ghosts of programmer past. Just put the code in and own maintaining it. Anyone can do a git blame and find the history of its implementation, and also see the original PR which should have described what it was doing, and provided far more context to the reviewers than a code comment.
And if an architecture decision is so significant, retain a repository of architecture decision records.
Just did a comparison of Bard vs GPT-4 with a coding question I came up with:
> I have a 3 dimensional black bitmap (voxel map) with a white straight line drawn in it. The 3d bitmap is saved as a bunch of tiff files by layer eg. layer_347.tif Write me python code to load this data and return the x,y,z location of each end of the line. The bitmap is too big to load all of it into RAM at once. Use a binary search to avoid loading unnecessary files.
Bard came up with a solution which was close but didn't follow the instructions (it just loaded all the data). It also assumed layer_9 sorted before layer_10.
GPT-4 came up with a solution which followed the instructions, but had a buggy binary search implementation, and a suboptimal O(n).
The GPT-4 solution was closer to what I was after, but there wasn't much in it. Neither implementation handled edge cases like missing files or had tests or anything.
Neural networks are really parallelizable. If I scale up my AI service to handle double the number of users by buying double the number of GPU's, it is theoretically possible to also serve each user in half the time.
To do so, you need to split the matrix multiplies across the new machines. You also need more inter-machine network bandwidth, but with GPT-3 that works out to 48 kilobytes per token predicted collected from every processing node and given to every processing node. Even if Bard is 100x as big, that is still very doable within datacenter scale networking.
However, OpenAI doesn't seem to have done this - I suspect an individual request is simply routed to one of n machine clusters. As they scale up, they are just increasing n, which doesn't give any latency benefit for individual requests.
I just gave Bard a try. It's still nowhere near as good at coding as chatGPT (and GPT4 specifically). I asked it to write a Python program to solve the Traveling Salesman Problem using ACO. The code GPT4 gave me for this prompt runs out of the box which is pretty impressive. The Bard code, on the other hand, has errors like forgetting to pass an argument to a function, or calling a method on a class that hasn't been defined on that class. When I point out the error to Bard it presents code that it says solves the problem, but often doesn't. In some cases when it fixes a problem in one area it reintroduces a previously fixed bug elsewhere.
Also, chatGPT always goes the extra mile and includes instructions on compiling/running the code it provides (including sample data). Bard does not.
I've been using it extensively and never once found ChatGPT to produce working code when the ask is just above basic. It might have to do with subject matter. It usually is close enough but my experience has been what you've found with Bard - missing arguments, phantom methods, etc.
In my experience, GPT-4 does get lots of textbook/common problems right in common languages on first try. But when I tried to solve a just mildly complex problem (finding a ring of cells in a Godot GridMap using GDScript), it produced nonsense: Solved the problem wrong, called functions that don't exist and so on. It did correct some of the mistakes after I pointed them out, but I couldn't get something working without manual editing. Then I asked it to optimise the solution and got nonsense again. For simple data wrangling in Python it worked a lot better.
I have a suspicion there might be some... showmanship at work where all kinds of test problems and common tasks are made sure to work well.
Also it generates code slower than I would type (if I know what to write), which makes me mad for some reason.
I think it has a lot to do with how common code examples in the language are. I bet if you tried with languages detailed here you will get a lot better results than more obscure languages (like GDscript)
"But did you try with GPT4?" is becoming a bit of a refrain for me when talking about this with people. I can get GPT-4 to produce working code from agile user stories surrounded by a well-crafted prompt.
> I just gave Bard a try. It's still nowhere near as good at coding as chatGPT (and GPT4 specifically)
Because its a much smaller model IMO. Its like comparing a car with 2.0 engine, with a car with 3.0 engine. Also ChatGPT made a lot of errors in code just a few months ago. Google seems to be catching up.
Worth noting that Google i/o is next month and many are expecting announcements related to Bard. There is that rumor floating around that they are training a very large (30T) model
The only source I can find is a reddit post from April fool's day, do you have a better one by chance?
There's almost no way they make a 30T model that's useful at least? That's over 60TB of memory at 16bit, 15TB at 4 bit. That's 15TB that have to go through either VRAM or TPU Memory (TPUv4 is 32GB I think?). Yes you could distribute it and chunk it, but that would be insanely slow/expensive to run for anything more then a research demo.
GPT-4 is most likely 1~2T from what I've heard, and they've been struggling to run that profitably/quickly judging by the crazy pricing and 25messages/3hours if you pay for premium chatgpt.
EDIT: The only way this is possible is if they've pulled off some crazy optimization, which is definitely possible, but a lot of the research from them such as their own Chinchilla scaling suggest smaller models that are more fully trained are better.
According to their chinchilla paper they would need over 330TB of training data for that, and an absurd amount of training time.
I've found that GPT4 does very well for problems that have examples on the web, but I have yet to make it display a 3d cube using opengl (any version) in linux using c++ or python.
So it depends heavily on the task and how much it has stored from the training.
Now if you ask them to do a teapot, it sometimes do it since there are so many examples of that, even if you often have to tinker a bit to get it to compile and run, at least it is a teapot and not some weird random geometrical object.
I have yet to try it with bard, will test when I get home to a proper computer.
That is a very good idea. I expect Google to keep coming out new features and my expectation is also that they will follow OpenAI's lead and prioritize features for developers.
I think there will be a settling in period over the next year where providers will take the time fix problems. I have been playing around with AutoGPT on my laptop and that is a very different experience because it exhaustively searches for useful material on the web, saves it to local text files, then works with these local files to finish up preparing text for the user. I don't expect Bard and Bing+ChatGPT to be so explorative and iterative, but they might be when inference technology and specialized hardware architectures get better.
Just gave Bard a try and was able to browse the google/google internal repository as well as some internal YouTube repos. I have since reached out and got the flaw fixed but this proves that google is reacting and not innovating. Also data security is at risk considering what you train on (see the earlier post on copilot emitting GPL code).
Twitter post coming soon, I will share with HN when it’s live
Reworded the prompt and it seemed to work, I entered yours and it didn't work but the below did:
how would you send a post html request with firstName, lastName as inputs to a url
To send a POST HTML request with firstName and lastName as inputs to a URL, you can use the following steps:
1. Create an HTML form with two input fields, one for firstName and one for lastName.
2. Set the method of the form to "POST".
3. Set the action of the form to the URL you want to send the request to.
4. Submit the form.
The following is an example of an HTML form that you can use to send a POST request with firstName and lastName as inputs:
When you submit this form, the server will receive the firstName and lastName values as POST request parameters. You can then use these values to perform whatever actions you need to do on the server.
I'm experimenting with using Bard to generate Prolog code. I have this idea that if I can synthesize Prolog and a LLM, I can do some very clever planning work.
I've asked bard some coding questions around winapi that I've asked ChatGPT the last few weeks. So far not only does it give incorrect answers, it seems super confident in telling me the wrong thing.
E.g, does SendInput send to a background window? It told me not only does it but it is the only way to do it and then gave me examples where it got a handle to a window but then didn't even use it.
A few months ago this would be super impressive but after using ChatGPT there is no reason that I've found why I'd want to use an inferior AI.
It's labelled as "Experiment" in the titlebar, it says that it has limitations and that feedback will help improve, and it says that it may display inaccurate information. I think that covers it all pretty well.
> Bard is still an early experiment, and may sometimes provide inaccurate, misleading or false information while presenting it confidently. 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. Always double-check Bard’s responses and carefully test and review code for errors, bugs and vulnerabilities before relying on it.
Also this nonsense geoblock that still exists. I've already joined waitlist via Tor and then I was granted access. Yet when I visit bard.google.com without Tor I'm still informed that bard isn't supported in my country.
I try to glance at both, but because I do that I know that ChatGPT has severe availability problems, whereas Bard so far has not failed for me. And Bard is much faster even though superficially it can seem slower because ChatGPT blurts out the first word more quickly.
Well right now it's just another website you have to go to with intent to use it like ChatGPT, but if Google built it into search it would get a ton of organic use from people doing things like googling error messages.
I'm not sure if this is what is planned of course, but that would be far more widely used than an otherwise siloed website you have to visit specifically.
Also remember that most people have at least never used ChatGPT, and most probably still haven't heard of it. We live in a tech bubble – none of my family had heard of it a few weeks ago. They all use Google search on a daily basis.
Why does competition exist ever? I think there are trade offs for everyone to consider before they blindly assume one will be the better option for every use case forever
I wouldn't touch anything that Google(The eyes and ears of advertisers) offers, with a 10 foot pole. Specially if is work related.
Chat GPT software development answers get better with warm up questions. I don't shoot questions point blank but do a 3-4 related questions first.
And Github is owned by MS too but MS did not invented it and Github remains an okay service. ChatGPT was not invented by MS and it could be that it remains a good service. Money matters aside.
Good that Bard is aware of latest version of software (eg. NextJS). Helps when APIs of a software evolves quickly.
I use a lot of Google products and really hope that they manage to nail it as at least #2 player in the space. As a company, they have not proven to come back and take the lead from behind.