Hacker News new | ask | show | jobs
by doctoboggan 964 days ago
Here is my prompt:

You are an expert programmers assistant, specializing in cloud native deployment tools like Kubernetes, helm, and their associated command line tools. When working with the users DO NOT USE PLACEHOLDERS, instead you should give commands to run that will provide the needed context to answer their question. For example, rather than answer with `k logs <insert pod name>`, you would first instruct the user to run `k get pods`, wait for the user to respond with the pod names, then you would give the full `k logs` command with the correct pod name already included in it. DO NOT SPECULATE, instead, ask the user to execute a command that will give you the information needed to answer the question.

I know there is a lot of magical thinking around prompts so take it with a grain of salt, but it as seemed to work well for me, especially around the iterative debugging process.

4 comments

Thank you for sharing your prompt! I hear people talking about how much ChatGPT has changed their life and I sometimes feel like I am accidentally using an entirely different product – it’s definitely worth $20 a month but I find myself disappointed more than half the time that I reach for it. I will try some of the ideas from your prompt for my work context.

Are there any communities you use to find and discuss prompts for various used cases?

I'd compare GPT-4 to having a mid-level SWE (3-5 years experience) as a consultant.

If you're just getting started with a new technology, it's fantastic. But if you're already familiar with your stack, you'll probably produce better code on your own.

I think that is fair.

But also, the other day I had it walk me through the construction of NFA's from regexps, and then construction of a DFA from the NFA. I "know" the subject, but it's literally decades since I've done it.

That too (refreshers on a subject you used to be familiar with) seems to be an area where GPT shines - it explained it to me well, and since I had a vague recollection I remembered enough to be able to quickly determine that it was giving me correct information, which avoided the wild goosechases you sometimes get sent on when you try to dig into an entirely new subject.

It even gave me an table for an NFA for a (trivial) grammar I provided as an example, and by then I remembered enough thanks to the refresher I could easily verify that GPT and I had the same understanding of the expected output. It then converted the NFA to a DFA for me, and got that entirely correct as well.

Neither of these things are hard if you sit there with a textbook or the papers or has it fresh in mind, but it gave me a custom-tailored refresher that saved me looking it up and digging out the details I needed myself.

I feel the same way. It's a dedicated intern sitting at my desk with me, who can read documentation instantly, that's worth $150,000. And for $240/year.
The API is pure usage based. I'm using the API in an an app I'm developing, both as one of the UI means for the user to do things as well as in the backend. I'm calling their API quite a bit everyday, and my bill last month was $2.
but the api is GPT3.5 not GPT4, right?
No? The api has all the models
GPT-4 API is very expensive, there is no way for someone to use it intensively every day and end up with a $2 bill. With GPT-3.5 it's normal.
I must be hallucinating that bill then.

I am surprised by the low bill too. I theorize that my queries, mostly very short that complete in under 5 seconds, are simply not expensive.

GPT4 use will cost you a good deal more than GPT3.5Turbo.
There is something with these prompts that is akin to what children do when they have tea parties with their pets.
I have gotten a ton of use out of ChatGPT, in pretty esoteric subjects like the above, and have never needed to prompt it with “you are an expert x.” Just asking the question is always enough for me, so I’m curious why you do so here
Oh no: a thing that interprets meaning to all-caps.