Chatgpt Prompting Essentials is one of the core study topics in our AI catalog. This page gathers the essentials: what the topic covers, the key concepts and
terminology, worked examples and exam-style questions — everything also available as 201 companion flashcards for spaced-repetition practice.
Main questions this page answers:
- What is a prompt in the context of ChatGPT?
- What does the role pattern in a prompt do?
- How does few-shot prompting work?
- What is zero-shot prompting?
- Define chain-of-thought (CoT) prompting.
- What is self-consistency in prompting?
- What is a hallucination in LLM outputs?
- Name three techniques to reduce hallucinations.
What is a prompt in the context of ChatGPT?
A prompt is the natural-language input—question, instruction, or context—a user provides to a language model to elicit a response. It frames the task and guides the model's behavior and output format.
What is instruction tuning?
Instruction tuning is supervised fine-tuning of a base model on diverse (instruction, response) pairs so it better follows natural-language commands across many tasks.
Why is reproducibility hard with LLMs?
Sampling randomness, version updates, and non-deterministic infrastructure can change outputs across runs, making exact reproduction of a given response difficult without fixing seed and version.
What is a 'system message' vs a 'user message'?
The system message sets persistent behavior, persona, and rules for the assistant across the conversation. User messages are the per-turn queries or inputs. The system message has higher priority and is hidden from end users by default.
What is the "prompt sandwich" technique?
Place trusted instructions both before and after untrusted user input in the prompt, so the model is reminded of the original constraints even after reading injected content.
What is "hybrid search" in retrieval?
Combining keyword (BM25) and vector (embedding) search to leverage both exact term matches and semantic similarity, often improving recall.
What is the purpose of a 'role' parameter in an API call to an LLM?
The role parameter (system, user, assistant, or tool) labels each message so the model knows the source and intent. System sets behavior and constraints, user provides the request, assistant is prior model output, and tool is external function results.
What is 'position interpolation' for extending context length?
Position interpolation rescales position indices to fit a longer window without retraining from scratch. RoPE or ALiBi embeddings are linearly interpolated so existing weights work at extended lengths, often with brief fine-tuning.
What is 'semantic routing' in LLM applications?
Semantic routing classifies an incoming query and forwards it to the most appropriate handler—different prompts, tools, or models. It improves cost and quality by matching request complexity to capability.
Define 'agentic loop' in an LLM application.
A loop where the model plans, calls tools, observes results, and re-plans until a goal is met. Typically bounded by max steps, tool scopes, and a stop condition to prevent runaway loops and excessive cost.