Prompting Fundamentals

What Are Prompts?
A prompt is an input request or instruction you give to a language model to obtain a desired response or output. Essentially, a prompt is the text or information you provide to the model so it can respond. Prompts can be very simple, such as a single question or sentence fragment, or they can include complex instructions and contextual information.
Examples of prompts:
Der Himmel istErkläre den Begriff "Künstliche Intelligenz" in einfachen Worten.Q: Was ist Prompt-Engineering?
A:Prompts are the foundation of interaction with large language models (LLMs) and strongly determine the quality and relevance of generated responses.
What Is Prompting?
Prompting refers to the process of deliberately giving prompts to a language model to accomplish a specific task or obtain information. It involves shaping the prompt so that the model delivers the desired response. Depending on how well a prompt is phrased, the quality of the output can vary widely.
When prompting, you can use different elements, such as:
- A clear instruction or question
- Context information that supports the model
- Examples that show what the answer should look like
With skillful prompting, you can steer the behavior of language models and use them for a wide range of applications, from text generation and translation to complex analysis tasks.
What Is Prompt Engineering?
Prompt engineering is a relatively young but increasingly central discipline in working with large language models. It focuses on the systematic design, analysis, and optimization of prompts to deliberately steer model behavior and make the most of their capabilities.
The goal of prompt engineering is to gain a deeper understanding of how LLMs respond to language inputs, what limits their understanding and generation logic have, and how those limits can be overcome with appropriate strategies. Researchers use these methods to improve the accuracy, coherence, and reliability of models on complex tasks such as question answering, academic writing, or knowledge extraction.
For developers, prompt engineering enables the design of robust and reproducible prompt strategies that allow controlled interaction with LLMs and other AI systems. This is not only about formulating suitable prompts, but also about integrating additional knowledge sources, external tools, and safety-related mechanisms.
In the context of research and teaching, prompt engineering contributes to a better understanding of how generative models work. It supports both the development of new LLM capabilities and the safe, responsible application of this technology. This guide provides a structured introduction to the theoretical foundations, current research results, proven techniques, and practical application examples of prompt engineering.
Simple Prompt
With simple prompts you can achieve a lot, but the quality of the results depends on how much information you provide and how well the prompt is formulated. A simple prompt is often just a short instruction or sentence fragment that the model should complete.
Example:
Der Himmel ist...blau ⛅ - meistens jedenfalls!
Möchtest du, dass ich den Satz fertigstelle (z. B. poetisch, grammatikalisch oder kreativ)?
This example shows how a model responds with a sequence of tokens that make sense in the context of “Der Himmel ist.” The output could be unexpected or far from the intended task, highlighting the need to craft prompts more precisely.
Context Prompt
To better steer the model’s response, you can add additional information to the prompt, such as a clear instruction or context that points the model to the desired task.
Example:
Vervollständige diesen Satz:
Der Himmel istDer Himmel ist blau. 🌤️
By adding the instruction “Vervollständige diesen Satz:”, the model is explicitly guided toward the task, which leads to a more precise and relevant response. This approach is a basic example of prompt engineering, where prompts are designed to effectively guide the model.
Newer OpenAI models such as GPT-5 also enable larger context windows, multimodal inputs, and finer control options, allowing prompts to include more complex system and example messages to influence behavior even more precisely.
QA Prompt (Question-Answer Prompt)
A commonly used and effective prompting technique is the question-answer format (QA prompt), which is standard in many QA datasets. The prompt is structured as questions and answers to guide the model toward a specific response.
A simple QA prompt example:
Q: Was ist Prompt-Engineering?
A:You can omit the “Q:” part if the model recognizes the question as such without this marker:
Was ist Prompt-Engineering?In addition to zero-shot prompting, where the model is asked for the answer directly, there is few-shot prompting. In this case, examples (demonstrations) are provided in the prompt to illustrate the desired task.
Example of few-shot prompting in QA format:
Q: Was ist KI?
A: KI steht für Künstliche Intelligenz und bezeichnet Maschinen, die menschenähnliche Aufgaben ausführen können.
Q: Was bedeutet Machine Learning?
A: Machine Learning ist ein Teilgebiet der KI, bei dem Maschinen aus Daten lernen, ohne explizit programmiert zu sein.
Q: Was ist Prompt-Engineering?
A:Or in free-form format:
Das ist toll! // Positiv
Das ist schlecht! // Negativ
Wow, der Film war klasse! // Positiv
Was für eine fürchterliche Vorstellung! //Negativ ✅
Few-shot prompts enable so-called in-context learning, the ability of language models to learn tasks from a few demonstrations. Both zero-shot and few-shot prompting are important techniques in prompt engineering and are explored further in this guide.
If you use GPT-5 (or GPT-4.1 / GPT-4o) in the ChatGPT app, you can give the model a prompt as shown in the following screenshot. The examples shown here are primarily aimed at casual or non-technical users who want to use the ChatGPT app in everyday life.