openai-cookbook
openai-cookbook copied to clipboard
[PROBLEM] The example on unit test writing is out of date. Would it be helpful if I updated it?
Identify the file to be fixed Unit test writing using a multi-step prompt
Describe the problem I am a programmer familiar with unit tests, but relatively new to GPT. I tried to follow this example in the cookbook: Unit test writing using a multi-step prompt. But with the help of a GPT Ambassador, we determined it was fairly out of date.
Describe a solution With the help of the GPT Ambassador, I was able to figure out how to use GPT to write unit tests in my code, as well as some end-to-end tests as well. If you plan on maintining the other examples in this repo, and keeping them up to date and relevant, I would be happy to write an updated tutorial for the Unit test writing example here in the cookbook. One caveat is that my tutorial would be written from a JavaScript perspective, not Python (as with many of the other examples here).
But if for some reason OpenAI does not plan on maintaining the examples in this particular repo, then maybe updating the unit test example here is not a worthwhile exercise. If there is another website or online repo that could benefit from a tutorial like this, I'd be happy to write one and post it there.
Let me know :-)
What is out of date about it?
OK that's a good and fair question. When I first tried to read and follow the example, I was originally quite confused. The GPT Ambassador that helped me said the instructions were outdated, so we eschewed them while she taught me how use GPT to generate unit tests (without use of the example). Now that I have a better idea about how to do that, I admittedly did not return to the example to confirm exactly how it was outdated.
After reviewing the example, I actually can't see any steps that I would call outdated. So I apologize for that. Edit: Actually I see there was a commit from May 20 which actually updates some of the things the GPT ambassador noted were outdated. Namely, parts about different models for different steps (e.g. text-davinci, code-davinci, etc).
But I can say that much of my initial confusion is still present. As a programmer with with no prior experience with GPT, Python, or Jupyter Notebook, I feel the example is a bit difficult to follow. I'm happy to give specifics if you'd like :-) But if I'm the first person bringing this up, then maybe it's not really an issue you should devot resources to right now--feel free to simply note it, and close this issue in favor of something more pressing :-)
Thanks for the detailed feedback. I think things were outdated, but hopefully the May 19 update brings them up to speed. I acknowledge things may be hard to follow if you're new to GPT and Python and Jupyter all at the same time. It's a bit of a balancing act, but happy to consider concrete improvements if you have them. Cheers.
Thanks for the detailed feedback. I think things were outdated, but hopefully the May 19 update brings them up to speed.
OK yep, sounds good.
I acknowledge things may be hard to follow if you're new to GPT and Python and Jupyter all at the same time. It's a bit of a balancing act, but happy to consider concrete improvements if you have them.
I'd also be happy to contribute improvements. But in the interest of most bang-for-the-buck, I might say that we forego those, unless you've had other similar complaints. If others have made similar comments, let me know and I'd be happy to offer some concrete suggestions.
Apart from that, is there any other helpful contribution I can make to this repo in light of my recent learning exercise? What about a different version of the unit test example, written in markdown (rather than Jupyter Notebook), from the perspective of a JavaScript developer? I could try to mirror the existing Python-based example as much as possible. Let me know if you think that would be helpful--I'd be happy to write one up.
👍