A prompt pattern catalog to enhance prompt engineering with ChatGPT
arxiv.org
arxiv.org
Short video summary: https://youtu.be/ueRuMDb-cPo
>List all the entities in the text that are ambiguous. Entities are ambiguous if you don't understand them, if they have multiple meanings and you can't decide which one from the context, or are phraseal terms whose meaning can be different in different cultures.
This allows the LLM to identify parts of previous prompt that the AI did not fully understand.
>List all the entities and relationships to other entities. Be precise, avoid duplicates, list each relationship only once.
This allows to compress the past context for longer tasks.
>Make a list of Google searches needed to build a factual answer, one sentence per search.
You get the list then
>For each sentence extract the main entity, decide whether to find more information about it on Google, wikipedia, ..., answer in json
This is my "ghetto" agent, it's not iterative, but it's stable enough to handle the unexpected
> It's the context enough to answer factually the user question? Answerer yes or no. Only answer yes if you are sure you can answer
To make the agent able to loop, or ask user for more context.
Here's a similar paper I ran across this morning: https://arxiv.org/abs/2305.18323. Github is here: https://github.com/billxbf/ReWOO
I indexed both documents with my own project, which uses semantic graphs to help with prompt assembly: https://github.com/FeatureBaseDB/DoctorGPT. DoctorGPT doesn't have dynamic prompt chaining yet, but I'm working on it. I hesitate posting any of the analysis of these papers using DoctorGPT here because it would be generated by the LLM, and not me...and some people seem to have an issue with that given this is a human forum.
My sense is that SKGs are important in refining questions, offering alternative approaches, managing context, reflecting on LLM responses, and more.
I was actually upset about everyone claiming they're a "prompt engineer" without any real engineering that I wrote a snarky github gist about it that was on the front page for a big. It's mainly pointing out that NLP can't even do real prompt engineering like Stable Diffusion folks can because we didn't build the right tooling for it yet.
https://gist.github.com/Hellisotherpeople/45c619ee22aac6865c...
These are good straight-to-the-point guides:
- Prompt Engineering by BrexHQ: https://github.com/brexhq/prompt-engineering
- OpenAI guidance: https://help.openai.com/en/articles/6654000-best-practices-f...
- https://devblogs.microsoft.com/dotnet/gpt-prompt-engineering...
- (great examples): https://www.deeplearning.ai/short-courses/chatgpt-prompt-eng...
- (~hr) Karpathy talk: https://www.youtube.com/watch?v=bZQun8Y4L2A
tl;dr:
- Begin with the best and most forgiving model available, optimizing it later if necessary.
- Write your prompts in a clear, specific, and detailed manner
- Be mindful, however, of the tradeoff between including more detail and increasing latency or cost.
- If you're doing any complex reasoning, ask the model to show its work, help "stretch out" computation over more tokens
- "Escape" any included or quoted text properly to avoid confusing the model.
- Keep track of your token budget, considering the context window in conversations and response length.
- Employ an iterative process of measuring, adjusting, and improving your prompt engineering techniques.
https://docs.google.com/document/d/1G0TGB16lOf6hhGNUDnrM-kQy...
Not a permalink so recommend making your own local copy if you like it.
> Solving problems using rules of thumb that cause the best change in a poorly understood situation using available resources.
Have you tried getting great, repeatable results out of an LLM? It requires great depth of knowledge - about both how LLMs work and the specific topic you are trying to build against - plus a methodical process in figuring out what works and what doesn't.
I see no reason not to label that "engineering".
I also think it's important to distinguish between prompting and prompt engineering. Prompting is when people type prompts in a box. Prompt engineering, by my own definition, is when developers build further software on top of LLMs.
Then again, I’m a software engineer that doesn’t consider my job engineering and I hate the title.
If we accept your definition. Then I am a food engineer, I am my own human engineer, I am a coffee engineer, I am child engineer, I am a dog engineer.
The word engineer has lost all meaning and this looks like title inflation.
it’s just like the search tool engineers that would engineer the string to put in your google search
/s
2. It looks great on LinkedIn.