Author: g023 (github.com/g023)
License: MIT
**Zero-shot Prompting**
You are a highly capable AI assistant. Directly answer the following query with accuracy, clarity, and completeness. Do not include any examples or explanations of your process unless asked.
Query: {USER_QUERY}**Few-shot Prompting (including One-shot)**
You are a highly capable AI assistant. Here are {N} example(s) of the desired input-output format:
Example 1:
Input: {EXAMPLE_INPUT_1}
Output: {EXAMPLE_OUTPUT_1}
{ADD_MORE_EXAMPLES_AS_NEEDED}
Now apply the same pattern and format to the new query below. Respond only with the output in the exact style of the examples.
New Query: {USER_QUERY}**Role/Persona Prompting**
You are {ROLE_OR_PERSONA}, an expert with deep knowledge and experience in this domain. Think and respond exactly as this persona would. Maintain the tone, expertise level, and perspective of {ROLE_OR_PERSONA} at all times.
Task: {USER_QUERY}**Contextual Priming / Grounding**
Here is important context and background information you must use:
{CONTEXT_AND_BACKGROUND_INFORMATION}
Using only the provided context above (and your general knowledge when necessary), answer the following query accurately and completely:
Query: {USER_QUERY}**Specificity & Constraint Prompting**
You are a precise AI assistant. Follow these exact constraints and requirements:
- {CONSTRAINT_1}
- {CONSTRAINT_2}
- {CONSTRAINT_3}
- Length: {SPECIFIC_LENGTH}
- Tone: {SPECIFIC_TONE}
- Avoid: {THINGS_TO_AVOID}
Task: {USER_QUERY}**Output Format Specification**
You are a precise AI assistant. Respond to the query below using ONLY the following output format. Do not add any extra text outside this structure.
{EXACT_DESIRED_FORMAT_EXAMPLE}
Query: {USER_QUERY}**Chain-of-Thought (CoT) Prompting**
You are a careful reasoning AI. Think step by step before giving your final answer.
1. Understand the query.
2. Break it down into logical steps.
3. Show your reasoning clearly.
4. Arrive at the final answer.
Query: {USER_QUERY}
Step-by-step solution:**Self-Consistency**
Generate {K} different reasoning paths (each thinking step by step) to answer the query. Then analyze all paths and select the most consistent and correct final answer.
Query: {USER_QUERY}
Reasoning path 1:**Tree of Thoughts (ToT)**
Explore multiple reasoning branches like a search tree. For each branch:
- Generate possible next steps
- Evaluate their promise
- Prune low-quality branches
- Continue until you reach the best solution
Query: {USER_QUERY}
Initial thoughts and branches:**Graph of Thoughts (GoT)**
Organize your reasoning as a graph. Create multiple thoughts, merge related ones, aggregate insights, and form connections between ideas until you reach a comprehensive solution.
Query: {USER_QUERY}
Graph-based reasoning:**Least-to-Most Prompting**
Solve this problem by first addressing the simplest sub-problems, then progressively tackling more complex ones until you reach the full solution.
Query: {USER_QUERY}
Start with the easiest sub-problem:**Step-Back Prompting (Abstraction Prompting)**
First, take a step back and identify the high-level principles, abstractions, or first principles relevant to this query. Then use those insights to provide a detailed, grounded answer.
Query: {USER_QUERY}
High-level abstraction first:**Self-Ask / Decomposition**
Break the original query into a series of smaller, sequential sub-questions. Answer each sub-question one by one, then synthesize the answers into a complete final response.
Query: {USER_QUERY}
First sub-question:**Maieutic Prompting (Socratic-style)**
Use Socratic questioning to explore this topic. Ask yourself clarifying questions, examine assumptions, consider alternative perspectives, and refine your understanding step by step until you reach a well-justified conclusion.
Query: {USER_QUERY}
Initial clarifying question:**Generate Knowledge Prompting**
First, generate relevant background knowledge, facts, and key concepts that would help solve this problem. Then use that knowledge to provide a complete answer.
Query: {USER_QUERY}
Relevant knowledge to generate:**Skeleton-of-Thought (SoT)**
First, create a concise skeleton/outline of the complete answer (list all main points briefly). Then expand each point in detail one by one.
Query: {USER_QUERY}
Skeleton/Outline:**Prompt Chaining**
This is a multi-step task. Complete Step 1 first, then use its output as input for Step 2, and continue until the final output.
Step 1: {STEP_1_DESCRIPTION}
Step 2: {STEP_2_DESCRIPTION}
...
Final Goal: {USER_QUERY}**Rephrase and Respond (RaR)**
First, rephrase the user's query to make it clearer, more precise, and easier to answer. Then answer the rephrased version.
Original Query: {USER_QUERY}
Rephrased Query:**Multimodal CoT**
[If the model supports images/audio:] Analyze the provided image/audio first, then think step by step about the query while referencing the visual/auditory content.
Query: {USER_QUERY}
Step-by-step reasoning including multimodal analysis:**Chain of Verification (CoVe)**
1. Generate an initial draft answer.
2. Create a list of verification questions to check the draft.
3. Answer each verification question.
4. Revise the draft based on verification results.
Query: {USER_QUERY}
Initial draft:**Reflexion / Self-Reflection**
Provide an initial answer, then critically reflect on it, identify any flaws or improvements, and produce a revised final version.
Query: {USER_QUERY}
Initial answer:**Chain-of-Verification / Verification-and-Edit (VE)**
Generate an initial response, create targeted verification questions, fact-check each claim, then edit and improve the original response accordingly.
Query: {USER_QUERY}
Initial response:**Active-Prompt**
Identify which parts of the query have the highest uncertainty. Generate targeted questions or clarifications for those parts, then incorporate the refined understanding into your final answer.
Query: {USER_QUERY}
Areas of uncertainty:**Verbalized Sampling (VS)**
Generate 5–8 distinct possible responses to the query. For each response, assign a probability (0–1) representing how likely it is, ensuring probabilities sum to 1. Then sample and present one final response (you may choose highest probability, lowest probability, or random).
Query: {USER_QUERY}
Response 1: <text>...</text> <probability>...</probability>**Directional Stimulus Prompting (DSP)**
Guide your response in this specific direction: {DIRECTION_OR_STIMULUS}. Incorporate this stylistic or semantic direction while fully addressing the query.
Query: {USER_QUERY}**Ensemble / Multi-Prompting**
Generate answers using {N} different prompting strategies or perspectives. Then synthesize them into one final high-quality response that combines the best elements.
Query: {USER_QUERY}
Answer from strategy 1:**ReAct (Reason + Act)**
Think step by step and interleave reasoning with actions when needed. Use tools or external actions (search, calculate, etc.) whenever necessary.
Query: {USER_QUERY}
Thought 1:**Automatic Reasoning and Tool-use (ART)**
Automatically decide when to use tools or external reasoning. Reason about the best approach, select appropriate tools, and iterate until the query is solved.
Query: {USER_QUERY}
First decision:**Program-Aided Language Models (PAL)**
Generate Python code (or other code) as an intermediate step to solve the problem precisely. Then execute or explain the code's result.
Query: {USER_QUERY}
Generated code:**Retrieval-Augmented Generation (RAG) Prompting**
[Assume relevant documents are provided] Use only the following retrieved documents to ground your answer. Cite them when used.
Retrieved documents:
{DOCUMENTS}
Query: {USER_QUERY}**Meta Prompting**
You are an expert prompt engineer. Create an optimal prompt that would best solve the following task. Then use that prompt to generate the answer.
Task: {USER_QUERY}
First, generate the optimized prompt:**Automatic Prompt Engineer (APE)**
Analyze the task and automatically generate the best possible prompt for solving it. Then apply that prompt to produce the final answer.
Task: {USER_QUERY}
Optimized prompt:**Recursive Self-Improvement / Iterative Refinement**
Generate an initial version, critique it thoroughly, then iteratively improve it over multiple rounds until you reach the best possible output.
Query: {USER_QUERY}
Initial version:**Context-Aware Decomposition (CAD) / Advanced Decomposition**
Decompose the task into sub-tasks while carefully preserving overall context and dependencies between parts. Solve each sub-task and combine them.
Query: {USER_QUERY}
Decomposition:**Prompt Compression / Summarization**
First, compress or summarize the long context while preserving all critical information. Then use the compressed version to answer the query efficiently.
Full context: {LONG_CONTEXT}
Compressed version:**Adversarial / Robustness Techniques**
Generate a robust answer that resists potential misinterpretations, prompt injections, or adversarial attacks. Consider edge cases and failure modes.
Query: {USER_QUERY}
Robust reasoning:**Multimodal Prompting**
[For models that support multiple modalities] Incorporate the provided image, audio, or other media along with the text query. Analyze all inputs together.
Query: {USER_QUERY}
Media provided: {DESCRIPTION_OF_MEDIA}**Graph Prompting**
Structure your reasoning or knowledge as a graph (nodes and edges). Define key concepts as nodes and relationships as edges, then reason over the graph.
Query: {USER_QUERY}
Graph structure:**Negative Prompting / Guardrails**
Do NOT do the following: {FORBIDDEN_BEHAVIORS}. Strictly avoid hallucinations, off-topic content, or unsafe outputs. Stay within these guardrails.
Query: {USER_QUERY}**Temperature / Sampling Parameter Guidance**
Be {CREATIVE_OR_PRECISE} in your response (high temperature = more creative and diverse; low temperature = more deterministic and factual). Adjust your sampling style accordingly.
Query: {USER_QUERY}**Hybrid / Composite Techniques**
Combine the following techniques for maximum effectiveness: {LIST_OF_TECHNIQUES_TO_COMBINE}. Apply them in sequence or together as appropriate.
Query: {USER_QUERY}
Combined approach: