Best Practices in Prompt Engineering

Nina Habicht • July 25, 2023

This blog post is a super short guide to prompt engineering. The discipline gains importance for developers but also everybody who wants to use ChatGPT or other tools to be more efficient.


What is Prompt Engineering?


This is a method to work efficiently with an LLM - simply said:


1) Designing, developing and optimizing "prompts", respectively requests that are send to a large language model

2) Identifying existing vulnerablilities in a model

3) Making models are reliable, efficient (less time-consuming when calling the APIs) and safe (less hallucinations)


How does Prompt Engineering work?

Ususally a prompt engineer interact with the LLM via an API or directly. Thereby the prompt engineer can configure a few parameters to get different results for his prompts.


One of the most important topics is the temperature: the lower the temperature, the more deterministic is the result. If you increase the temperature, the more diverse and creative answers you will get. So if you build a Q&A chatbot, you might want to use a low temperature to be more fact-based. Looking at a story or content creation, you would rather increase the temperature value.


What are the principles of good prompts?


1) Good prompts are structured: use delimiters (like quotes), ask for structured output like a Json, png, and check if conditions are satisfied and assumptions are required to do the task.

2) Give the "model time to think": drill down your task you want to get ChatGPT or another llm to be completed into several structured subtasks. Like with humans you can extrapolate the pain point into several steps to solve it. Do the same with the machine


What is Zero-Shot or Few-Shot Prompting?


Few-shot and zero.shot prompts enable the language models to learn tasks given a one or few demonstrations how to do it.


Zero Shot Prompting Example:

Your task is to answer in a consistent way:

<Question>

<Answer>


Few Shot Prompting Example:

To classify a sentence you can use few shot prompting:

<I wish I could have gone on that trip> // sad

<Yey! I will be married soon!> // happy

<hm, I don't feel well> // sad

<So glad that you are here> // ?


And the llm would basically learn based on this structure what to predict in the last sentence. Thus "happy".


What shall I do when I do not know how to prompt ChatGPT?


You can always ask ChatGPT itself to rephrase your question (e.g. "from now on optimize my question and ask me if I should use it?") or optimize your prompt by using tools that help you to write best prompts. A free one is: https://chat.openai.com/share/c1b9f609-e3ac-497a-bf77-a56e1bfd5fb6.



Role Task Format (RTF) for Prompt Engineering is a good starter to learn how to ask ChatGPT. An example is: As an analyst I need to create the most relevant KPIs in a table about topic {XYZ}.

Need support with your Generative Ai Strategy and Implementation?

🚀 AI Strategy, business and tech support 

🚀 ChatGPT, Generative AI & Conversational AI (Chatbot)

🚀 Support with AI product development

🚀 AI Tools and Automation

Get in touch
By Nina Habicht March 25, 2025
What's RAG? The goal is for the language model is not to draw on its own knowledge (from the model), but for information to be enriched in the prompt. This is usually your own data you provide to the model (PDFs, systems).
Video Creation: The Ultimate Guide to Runway, Luma AI, Haiper.ai, and Hailuo AI
By Nina Habicht February 16, 2025
Video Creation: The Ultimate Guide to Runway, Luma AI, Haiper.ai, and Hailuo AI
What are the best AI powerpoint tools
By Nina Habicht February 16, 2025
What are the best AI powerpoint tools. Discover tools that create presenations with AI.
Image Creator Tools
By Nina Habicht November 24, 2024
Ultimative review of all relevant image creation tools
Optimizing your Website for AI: How to get found by ChatGPT
By Nina Habicht August 24, 2024
Optimizing your Website for AI: How to get found by ChatGPT. This article provides concrete Large Language Model Optimization strategies for SMEs and companies.
A Practical Guide for Midjourney Image Generation. Learn how to create professional images.
By Nina Habicht August 24, 2024
Since August 2024, users have been able to use the web version of the image creation tool Midjourney. This simplifies usage by providing a user-friendly interface to experiment with one of the top Generative AI image creation tools available. We tested it for you and are sharing helpful tips and tricks. How to prompt images with Midjourney? If you use Midjourney on discord, there is a clear prompt structure and prompt parameters to adhere to. Usually, it makes sense to stick to it: 1) To prompt use "/Imagine" 2) Then enter your subject (description and details) you want to see on the image and it's environment (see yellow highlighted below in the prompt example) 3) Then enter composition, lightning, colours (see green highlighted below in the prompt example) 4) Finally add technical parameters to adjust and finalize your image. Please find a useful parameter library here.
Agentic AI vs. Gen. AI vs. RPA
By Nina Habicht August 11, 2024
This article explains agentic AI and why it is so important when building generative AI and chatbot applications. Overview about Agentic AI vs. Gen. AI vs. RPA and all you need to know about these terms.
LLM Benchmarks: Finding the right LLM for your Needs
By Nina Habicht July 29, 2024
LLM Benchmarks: Finding the right LLM for your Needs
RAG vs. Finetuning. Open Source vs. Proprietary Models
By Nina Habicht June 25, 2024
RAG vs. Finetuning. Open Source vs. Proprietary Models. We explain what makes sense when.
Top ChatGPT Prompts and Prompt Engineering for Product Managers
By Nina Habicht May 10, 2024
Top ChatGPT Prompts and Prompt Engineering for Product Managers
Show More