Comment by slt2021

1 year ago

my biggest universal LLM prompt engineering hack is:

1. Ask Claude to come up with LLM prompt to solve problem, I add as many details and context as I can. I try to explain the problem in regular words, and dont care as much about structure and prompt engineering tricks. Just type whatever as I would type to a friend/colleague in Slack.

2. Create new chat and feed output of (1) and get desired, well-structured answer.

sometimes you just need to go meta

In the anthropic console, there is a "Generate a prompt" section, which does what you are doing but better, I guess.

It takes normal text and generates a well-structured prompt.

This sounds interesting! Would you be willing to share an example?

  • just the most recent one:

    1. naiive prompt - gives dogshit answer: "how can I implement authorization for each microservice request if I am using AWS EKS and Linkerd as service mesh?"

    - the answer to the first naiive prompt was mere 148 words. Similar to what you find in first results of gogel search.

    2. meta-prompt - just start with "Write LLM prompt to ask AI about...". My meta prompt was "Write LLM prompt to ask AI about how can I implement authorization for each microservice request if I am using AWS EKS and Linkerd as service mesh"

    - it gives the following prompt: "I'm using AWS EKS for container orchestration and Linkerd as my service mesh. How can I implement robust authorization for each microservice request in this architecture? Please provide an overview of recommended approaches, considering factors like scalability, security best practices, and integration with AWS services. Include any specific tools or patterns that work well in this ecosystem."

    - the answer for the second prompt is much better at 428 words and I didn't have to think much. It took me 27 words of meta-prompt to get the 57 word real-prompt and the final answer is much better

    • Thank you so much for taking the time to give a concrete example! It really elucidated the process for me and I'll definitely do some A/B testing of my own to try it out.

  • Generate a system prompt for an AI model which will do ....

    You put your requirements, take that prompt into a new chat window.