Hacker News new | ask | show | jobs
by nateroling 298 days ago
Can you write a prompt to optimize prompts?

Seems like an LLM should be able to judge a prompt, and collaboratively work with the user to improve it if necessary.

6 comments

100% yes! There've been some other writers who've been doing parallel work around that in the last couple weeks.

https://www.dbreunig.com/2025/06/10/let-the-model-write-the-... is an example.

You can see the hands on results in this hugging face branch I was messing around in:

here is where I tell the LLM to generate prompts for me based on research so far

https://github.com/AlexChesser/transformers/blob/personal/vi...

here is the prompts that produced:

https://github.com/AlexChesser/transformers/tree/personal/vi...

and here is the result of those prompts:

https://github.com/AlexChesser/transformers/tree/personal/vi.... (also look at the diagram folders etc..)

What’s the benefit for GPT 5 model not to optimize the prompt they get directly instead of relying on this optimizer?
I use Grok to write the prompts. Its excellent. I think human created prompts are insufficient in almost all cases.

Write your prompt in some shape and ask grok

Please rewrite this prompt for higher accuracy

-- Your prompt

Wouldn't you be better doing it with almost anything other than Grok?

How do you know it won't introduce misinformation about white genocide into your prompt?

Any llm is fine. Grok had the latest model available for free use. Thats all. Gpt5 produces similar result too.

We have to read the result of course.

If someone keeps choosing to use the "mechahitler chatbot" at this point, I don't think they care about what misinformation goes into their prompt.
The LLM is basically a runtime that needs optimized input bc the output is compute bottlenecked. Input quality scales with domain knowledge, specificity and therefore human time input. You can absolutely navigate an LLMs attention piecemeal around a spec until you build an optimized input.
This is pretty much DSPy.
yes, just prepend your request to llm with "Please give me a well-structured LLM prompt that will solve this problem..."