4 ms·
I don't have any prompts that I reuse, I normally just talk to it like a person and get it to write code or get information out of it. Where I see people fail
by CSMastermind 3y ago
I don't have any prompts that I reuse, I normally just talk to it like a person and get it to write code or get information out of it.
Where I see people fail is when they give it sentence fragments like it's a search engine.
Here's an example of something I've prompted it with:
> I'm building a commerce application and debugging issues with our data feed. In order to debug further I need to get a list of products that are out of stock and some additional information about them.
> Calling this endpoint with a GET request will return all out of stock products: <<endpoint>>
> The shape of the response will be an object that has two properties: data and pagination. The data property will be an array of product objects. Those objects will have a property called id.
> Calling this endpoint with a GET request will return information about that product in the context of a specific vendor: <<endpoint>>
> Where {productId} is replaced with the id of the specific product extracted from the previous request.
> That endpoint will return a response that is an object with a property called data that will be an array with a single object in it (since we only requested information about one product).
> The object in that array will have the properties id and name and availableFrom among others.
> availableFrom will be an array with a single object in it and that object will have the properties sku and link among others.
> Please write a script in JavaScript that makes a request to the initial endpoint to get all items that are out of stock and then calls the second endpoint with the relevant productId for every product returned. The script should then extract the properties id, name, sku, and link then save that data to a CSV file where each product from the original endpoint request is represented as a single row in the file with the relevant data in it.
> Let me know if you have any questions.
- dinkleberg 3y agoI think this is the best approach. I keep seeing people say they can’t get any value out of Chatgpt but I have to imagine they’re using it wrong. I blame all of those Twitter and LinkedIn influencers sharing those “top 100 prompts for X, Y, and Z” for spreading the idea that you need to get fancy with prompts. Literally just treat it like a slack thread with a person and keep chatting with it to get what you want. A lot of the time the first response isn’t going to be what you want, but like any conversation, you can provide feedback until you get what you need.
- wslh 3y agoI think ChatGPT prompts follow consequently the GIGO (garbage-in garbage-out) concept.
- ShamelessC 3y ago> I blame all of those Twitter and LinkedIn influencers. Look below. Dozens of similarly terrible ideas being suggested. Isn't this place supposed to be for the tech savvy?
- dinkleberg 3y agoIn my experience highly technical people can be among the worst when it comes to working with radically new tech. I’m sure there is a similar effect for other fields and new developments there. But once one becomes known as knowledgeable and skilled in their domain, I think there is fear/concern over their image when it comes to the new thing. If they are going to try the new thing, they have to make sure they do it perfectly and as a result they’ll end up relying on the best practices others discover, or alternatively put down the new tech explaining why it actually isn’t good. Meanwhile you have completely un-tech savvy folks who are using it for all sorts of cool stuff because they are just playing around and trying things out. Honestly one of my big aims in life is to never fear being the noob and asking stupid questions and just trying things out.
- mordymoop 3y agoMy mentality is that I write the request exactly as I would write an email to an intern asking them to do the task for me, aiming to disambiguate and provide detail that increases the odds of getting exactly the result I want.
- davely 3y agoI think this is right on. I usually give it a definitive question and provide some relevant context around it. It’s been immensely helpful! ‘’’ I am receiving the following TyperScript error for the piece of code I’ve included below: [Error Message] What would be the best way to fix this? For context, here is the relevant method below. [Code] ‘’’ I’ve legitimately learned things from this. It’s wild. And I don’t have to deal with patronizing Stack Overflow comments. I definitely review the code, almost as if a new colleague were writing it. But damn, I’m impressed!