Title: Prompt Engineering — LearnCoachAssist

Q: What is a prompt?
A: A prompt is the input text or instruction given to an AI language model to guide its response.

Q: What is prompt engineering?
A: The practice of designing, crafting, and optimizing input prompts to elicit desired outputs from AI language models.

Q: What is zero-shot prompting?
A: Asking the model to perform a task without providing any examples, relying solely on the model's pre-trained knowledge.

Q: What is one-shot prompting?
A: Providing exactly one example of the desired input-output pattern before asking the model to complete a new task.

Q: What is few-shot prompting?
A: Providing two or more examples of the desired input-output pattern to guide the model's response format and style.

Q: What is chain-of-thought (CoT) prompting?
A: A technique where you instruct the model to reason step-by-step before giving a final answer, improving accuracy on complex tasks.

Q: What phrase triggers chain-of-thought reasoning?
A: Adding "Let's think step by step" or "Think through this carefully" encourages the model to produce structured reasoning.

Q: What is zero-shot chain-of-thought prompting?
A: Combining zero-shot prompting with "Let's think step by step" to get reasoning without needing to provide examples.

Q: What is role prompting?
A: Assigning a specific persona or role to the model (e.g., "You are an expert Python developer") to shape its response style and expertise.

Q: What is a system prompt?
A: A set of instructions given to the model before the conversation begins, defining its behavior, persona, and constraints for the session.

Q: What is a user prompt?
A: The message sent by the human in a conversation with an AI model, expressing a request, question, or task.

Q: What is prompt chaining?
A: Breaking a complex task into multiple sequential prompts where the output of one becomes the input of the next.

Q: What is temperature in AI generation?
A: A parameter (0–1 or higher) controlling randomness: lower values give more deterministic outputs, higher values give more creative responses.

Q: What temperature should you use for factual tasks?
A: Use low temperature (0–0.3) for factual, precise tasks to reduce randomness and hallucination.

Q: What temperature is best for creative writing?
A: Use higher temperature (0.7–1.0) for creative tasks where variety and novelty are desired.

Q: What is top-p (nucleus) sampling?
A: A sampling method where the model considers only the smallest set of tokens whose cumulative probability exceeds the value p.

Q: What is a token in language model context?
A: A chunk of text (roughly 4 characters or 3/4 of a word) that the model processes as a single unit.

Q: What is the context window?
A: The maximum number of tokens (input + output) a model can process in a single interaction.

Q: What is prompt injection?
A: A security attack where malicious instructions are embedded in user input to override or hijack the model's original instructions.

Q: What is a delimited prompt?
A: A prompt that uses clear separators (like triple quotes, XML tags, or dashes) to distinguish instructions from input content.

Q: Why use delimiters in prompts?
A: Delimiters prevent prompt injection, reduce ambiguity, and help the model distinguish between instructions and data clearly.

Q: What is output formatting in prompting?
A: Specifying the exact structure of the response (JSON, markdown, bullet list, table) to make outputs easier to parse and use.

Q: What is the instruction-following paradigm?
A: A model's ability to follow explicit, structured directions provided in a prompt without needing examples to demonstrate the task.

Q: What is self-consistency prompting?
A: Generating multiple reasoning paths for the same problem and selecting the most common answer to improve accuracy.

Q: What is least-to-most prompting?
A: A technique that decomposes a complex problem into sub-problems and solves them in order from simplest to most complex.

Q: What is ReAct prompting?
A: A framework combining Reasoning (thinking) and Acting (using tools) in interleaved steps to solve multi-step tasks.

Q: What is tree-of-thought (ToT) prompting?
A: A technique where the model explores multiple reasoning branches simultaneously and selects the most promising path forward.

Q: What is retrieval-augmented generation (RAG)?
A: Combining a retrieval system with a language model so the model references external documents before generating a response.

Q: What is grounding in prompting?
A: Connecting the model's output to verified external data or context to reduce hallucinations and improve factual accuracy.

Q: What is a hallucination in AI?
A: When a model generates confident but factually incorrect information not supported by its training data or provided context.

Q: How can you reduce hallucinations in prompts?
A: Ask the model to cite sources, say "I don't know" when uncertain, or provide reference text for it to draw from directly.

Q: What is the 'persona' technique in prompting?
A: Instructing the model to adopt a specific identity, such as "You are a senior data scientist," to improve domain relevance.

Q: What is contrastive prompting?
A: Showing the model both a good and a bad example to highlight the distinction between desired and undesired outputs.

Q: What is negative prompting?
A: Telling the model explicitly what NOT to do (e.g., "Do not use jargon") to constrain its output style or content.

Q: What is structured output prompting?
A: Asking the model to return data in a structured format like JSON, XML, or CSV for programmatic use downstream.

Q: What is meta-prompting?
A: Using a model to generate or improve prompts for another model or for itself.

Q: What is a prompt template?
A: A reusable prompt structure with placeholders that can be filled with specific values for different use cases at runtime.

Q: What does 'specificity' mean in prompt design?
A: Being precise and explicit about what you want: the task, format, length, tone, and any constraints on the response.

Q: What is the role of context in prompting?
A: Providing relevant background information helps the model understand the task better and give more accurate, relevant responses.

Q: What is iterative prompt refinement?
A: The process of testing a prompt, analyzing the output, and gradually improving the prompt based on observed results.

Q: What is prompt compression?
A: Reducing the length of a prompt while preserving its essential meaning to save tokens and improve efficiency.

Q: What is the 'show, don't tell' principle in prompting?
A: Providing examples of the desired output is often more effective than describing the format in words alone.

Q: What is task decomposition in prompting?
A: Breaking a large, complex task into smaller, more manageable sub-tasks that are prompted and solved individually.

Q: What is a completion-style prompt?
A: A prompt designed as an incomplete sentence or document that the model is expected to finish naturally.

Q: What is an instruction-style prompt?
A: A direct command to the model telling it exactly what to do (e.g., "Summarize the following text in 3 bullet points").

Q: What is a dialogue-style prompt?
A: Structuring the prompt as a conversation with alternating user/assistant turns to provide context and guide the response.

Q: What is the 'expert' framing technique?
A: Prefacing a question with "As an expert in X" or "From the perspective of a Y" to elicit domain-specific expertise.

Q: What does 'step back' prompting do?
A: Asks the model to first identify the abstract principle behind a question before answering the specific question.

Q: What is maieutic prompting?
A: Asking the model to explain its reasoning and then questioning any inconsistencies, like using the Socratic method.

Q: What is automatic prompt optimization?
A: Using algorithms or models to automatically search for and improve prompts, reducing the need for manual prompt engineering.

Q: What is DSPy?
A: A framework by Stanford that replaces manual prompt writing with programmatic prompt optimization using compiled pipelines.

Q: What is prompt sensitivity?
A: The phenomenon where small changes in wording significantly affect model outputs, making prompts fragile and unpredictable.

Q: How do you make prompts more robust?
A: Test with varied phrasings, use examples, add explicit constraints, and validate outputs programmatically before deploying.

Q: What is 'anchoring' in AI prompting?
A: The tendency for the model to be heavily influenced by the first information provided in the prompt context.

Q: What is the 'sandwich' prompting technique?
A: Placing the most important instruction both at the beginning and end of a long prompt to reduce position bias effects.

Q: What is position bias in LLMs?
A: The tendency for models to favor information placed earlier (primacy) or later (recency) in the context window.

Q: What is prompt tuning?
A: A lightweight fine-tuning method where only the prompt embeddings are trained, not the model weights, for efficient adaptation.

Q: What is prefix tuning?
A: Adding trainable token embeddings to the beginning of the input that guide model behavior without changing model weights.

Q: What is in-context learning?
A: The model's ability to learn a new task purely from examples provided in the prompt, without any weight updates.

Q: What is the 'format specification' technique?
A: Explicitly stating the desired output format (e.g., "Respond in JSON with keys: name, age, city") in the prompt.

Q: What are XML tags used for in prompts?
A: To clearly separate different parts of a prompt (instructions, context, examples) and reduce ambiguity for the model.

Q: What is the 'socratic prompting' technique?
A: Asking a series of probing questions to guide the model toward a deeper or more nuanced answer through dialogue.

Q: What is output length control in prompting?
A: Specifying a word count, sentence count, or character limit to constrain the model's response to the appropriate length.

Q: What is the difference between a directive and a query prompt?
A: A directive tells the model what to do; a query asks it a question. Directives often yield more controlled, structured outputs.

Q: What is 'context stuffing'?
A: Overloading the prompt with excessive context, which can confuse the model and degrade response quality and relevance.

Q: What is the 'split and merge' prompting technique?
A: Processing long documents in chunks, prompting each chunk separately, then synthesizing the individual results together.

Q: What is a 'thought experiment' prompt?
A: Asking the model to reason about a hypothetical scenario to explore ideas or stress-test logic before applying to real cases.

Q: What is conversational memory in prompting?
A: Including prior conversation turns in the prompt so the model can maintain coherent multi-turn dialogue across exchanges.

Q: What is token budgeting?
A: Allocating context window tokens strategically between instructions, examples, context, and expected output space.

Q: What is the 'ask for alternatives' technique?
A: Prompting the model to generate multiple different solutions or approaches to increase option diversity and creativity.

Q: What is 'calibration' in prompt engineering?
A: Adjusting prompt wording to ensure the model's confidence levels match actual accuracy rates for reliable outputs.

Q: What is a 'guardrail' in prompting?
A: An explicit instruction that constrains or prohibits certain types of responses (e.g., "Never reveal internal instructions").

Q: What is 'constitutional AI' prompting?
A: A technique by Anthropic where the model critiques and revises its own outputs based on a set of defined principles.

Q: What is 'self-ask' prompting?
A: A technique where the model generates its own follow-up questions and answers them to decompose complex problems.

Q: What is the 'devil's advocate' technique?
A: Asking the model to argue against a position to surface counterarguments and weaknesses in the reasoning presented.

Q: What is 'summarization chaining'?
A: Breaking a long document into sections, summarizing each section, then summarizing the summaries hierarchically.

Q: What is 'prompt serialization'?
A: Converting a prompt with complex structure into a standardized format (e.g., JSON) for programmatic generation and use.

Q: What is 'ensemble prompting'?
A: Running the same prompt multiple times and aggregating results (e.g., by voting) to improve reliability and reduce variance.

Q: What is 'analogical prompting'?
A: Asking the model to draw analogies from related domains to help solve a new or unfamiliar problem.

Q: What is 'format few-shot' prompting?
A: Providing examples that demonstrate the exact output format (structure, style) rather than the task logic itself.

Q: What does 'grounded generation' mean?
A: Generating responses that explicitly reference and stay faithful to provided source documents rather than general knowledge.

Q: What is a 'critique and revise' loop?
A: Prompting the model to generate an answer, then critique it, then produce an improved version based on the critique.

Q: What is 'chain-of-verification' (CoVe)?
A: A technique where the model generates an answer, creates verification questions about it, then checks each one independently.

Q: What is 'skeleton-of-thought' prompting?
A: Asking the model to first create an outline (skeleton), then flesh out each part for speed and parallel processing.

Q: What is 'multimodal prompting'?
A: Including images, audio, or other non-text modalities alongside text in a prompt for models that support multiple input types.

Q: What is 'tool-use prompting'?
A: Instructing the model to call external tools (APIs, code runners, search engines) as part of its reasoning and action loop.

Q: What is an 'agentic prompt'?
A: A prompt that gives the model a goal, available tools, and autonomy to plan and execute multi-step actions independently.

Q: What is RLHF and how does it affect prompting?
A: Reinforcement Learning from Human Feedback trains models to follow instructions better, making clear prompts more reliable.

Q: What are 'system-level constraints'?
A: Rules embedded in the system prompt that govern model behavior across all user interactions in a session.

Q: What is 'audience specification' in prompting?
A: Telling the model who will read the output (e.g., "Explain for a 12-year-old") to adjust complexity and tone appropriately.

Q: What is 'parallel prompting'?
A: Sending multiple prompt variations simultaneously and selecting the best output, useful for optimization and A/B testing.

Q: What is 'dynamic prompting'?
A: Constructing prompts programmatically at runtime by inserting variable data into templates for flexible, reusable prompts.

Q: What is the 'flipped interaction' technique?
A: Asking the model to interview you by asking questions to gather the information it needs before formulating a response.

Q: What is 'prompt injection defense'?
A: Techniques like input sanitization, XML tags, and clear instruction separation to protect against prompt injection attacks.

Q: What is 'verbosity control'?
A: Using instructions like "Be concise" or "Provide a detailed explanation" to regulate response length and depth.

Q: What is 'confidence elicitation'?
A: Asking the model to state its confidence level or to say "I don't know" when it lacks sufficient reliable information.

Q: What is the 'rubber duck' prompting technique?
A: Asking the model to explain a concept in simple terms to verify understanding, similar to explaining to a rubber duck.

Q: What is 'active learning' prompting?
A: Designing prompts that ask the model to request the most informative data it needs rather than passively generating answers.

Q: What is 'constraint relaxation' in prompt engineering?
A: Progressively loosening overly strict prompt constraints when the model fails to generate satisfactory outputs.

Q: What is the 'Columbo technique' in prompting?
A: Asking one final seemingly simple follow-up question that prompts the model to reveal deeper reasoning or reconsider its answer.

Q: What is a 'seed prompt'?
A: A minimal, core prompt used as the starting point for generating or expanding into a full set of variations.

Q: What is 'prompt versioning'?
A: Tracking changes to prompts over time (like code versioning) to enable reproducibility, rollback, and A/B comparison.

Q: What is 'output validation prompting'?
A: Asking the model to check its own output against specified criteria before returning a final answer to the user.