---
title: "Prompt Engineering In Depth"
source: Panaversity Learn Agentic AI
source_url: https://github.com/panaversity/learn-agentic-ai
licence: Apache-2.0
domain: agentic-ai
subdomain: panaversity-agentic
date_added: 2026-04-25
---

# Prompt Engineering In Depth

**We will start with [Learn Prompting](https://learnprompting.org/docs/introduction) and then moving to the [Prompt Engineering Guide](https://www.promptingguide.ai/) as your skills and knowledge evolve.**

## Basic Learning Path

1. [Prompt Engineering](https://learnprompting.org/docs/basics/prompt_engineering)
2. [Basics of Prompting](https://www.promptingguide.ai/introduction/basics)
3. [Elements of a Prompt](https://www.promptingguide.ai/introduction/elements)
4. [General Tips for Designing Prompts](https://www.promptingguide.ai/introduction/tips)
5. [Examples of Prompts](https://www.promptingguide.ai/introduction/examples)
6. [Instruction prompting](https://learnprompting.org/docs/basics/instructions)
7. [Assigning Roles](https://learnprompting.org/docs/basics/roles)
8. [Shot-Based Prompting](https://learnprompting.org/docs/basics/few_shot)
9. [Parts of a Prompt: Understanding the Key Elements](https://learnprompting.org/docs/basics/prompt_structure)
10. [How to Create Effective Prompts: Essential Tips and Best Practices](https://learnprompting.org/docs/basics/ai_prompt_tips)
11. [Combining Prompting Techniques](https://learnprompting.org/docs/basics/combining_techniques)
12. [Chatbots vs. LLMs](https://learnprompting.org/docs/basics/chatbot_basics)
13. [Priming Prompt](https://learnprompting.org/docs/basics/priming_prompt)
14. [Limitations of LLMs](https://learnprompting.org/docs/basics/pitfalls)

## Intermediate Learning Path

1. [Chain-of-Thought Prompting](https://learnprompting.org/docs/intermediate/chain_of_thought) and [In Depth](https://www.promptingguide.ai/techniques/cot)
2. [Zero-Shot Chain-of-Thought](https://learnprompting.org/docs/intermediate/zero_shot_cot)
3. [Self-Consistency](https://learnprompting.org/docs/intermediate/self_consistency) and [In Depth](https://www.promptingguide.ai/techniques/consistency)
4. [Generated Knowledge](https://learnprompting.org/docs/intermediate/generated_knowledge)
5. [Prompt Chaining](https://www.promptingguide.ai/techniques/prompt_chaining)
6. [Least-to-Most Prompting](https://learnprompting.org/docs/intermediate/least_to_most)
7. [Revisiting Roles](https://learnprompting.org/docs/intermediate/revisiting_roles)
8. [LLM Settings](https://learnprompting.org/docs/intermediate/configuration_hyperparameters)
9. [Retrieval Augmented Generation (RAG)](https://www.promptingguide.ai/techniques/rag) and [RAG Reseach Findings](https://www.promptingguide.ai/research/rag)

## Advanced Learning Path

1. [Zero-Shot Prompting Techniques](https://learnprompting.org/docs/advanced/zero_shot/introduction): [Emotion Prompting](https://learnprompting.org/docs/advanced/zero_shot/emotion_prompting), [Re-reading (RE2)](https://learnprompting.org/docs/advanced/zero_shot/re_reading), [Rephrase and Respond (RaR)](https://learnprompting.org/docs/advanced/zero_shot/re_reading), [Role Prompting](https://learnprompting.org/docs/advanced/zero_shot/role_prompting), [System 2 Attention (S2A)](https://learnprompting.org/docs/advanced/zero_shot/s2a), and [SimToM](https://learnprompting.org/docs/advanced/zero_shot/simtom)
2. [Few-Shot Prompting Techniques](https://learnprompting.org/docs/advanced/few_shot/introduction): [Self-Ask Prompting](https://learnprompting.org/docs/advanced/few_shot/self_ask), [Self-Generated In-Context Learning (SG-ICL)](https://learnprompting.org/docs/advanced/few_shot/self_generated_icl), [K-Nearest Neighbor (KNN) Prompting](https://learnprompting.org/docs/advanced/few_shot/k_nearest_neighbor_knn), [Vote-K Prompting](https://learnprompting.org/docs/advanced/few_shot/vote-k), [Prompt Mining](https://learnprompting.org/docs/advanced/few_shot/prompt_mining)
3. [Thought Generation Techniques](https://learnprompting.org/docs/advanced/thought_generation/introduction): [Contrastive Chain-of-Thought (CoT) Prompting](https://learnprompting.org/docs/advanced/thought_generation/contrastive_cot), [Automatic Chain of Thought (Auto-CoT)](https://learnprompting.org/docs/advanced/thought_generation/automatic_chain_of_thought), [Tabular Chain-of-Thought (Tab-CoT)](https://learnprompting.org/docs/advanced/thought_generation/tabular_chain_of_thought_tab_cot), [Memory-of-Thought (MoT) Prompting](https://learnprompting.org/docs/advanced/thought_generation/memory_of_thought), [Active Prompting](https://learnprompting.org/docs/advanced/thought_generation/active_prompting), [Analogical Prompting](https://learnprompting.org/docs/advanced/thought_generation/analogical_prompting), [Complexity-Based Prompting](https://learnprompting.org/docs/advanced/thought_generation/complexity_based_prompting), [Step-Back Prompting](https://learnprompting.org/docs/advanced/thought_generation/step_back_prompting), [Thread of Thought (ThoT)](https://learnprompting.org/docs/advanced/thought_generation/thread_of_thought)
4. [Ensembling Prompting Techniques](https://learnprompting.org/docs/advanced/ensembling/introduction): [Mixture of Reasoning Experts (MoRE)](https://learnprompting.org/docs/advanced/ensembling/mixture_of_reasoning_experts_more), [Consistency-based Self-adaptive Prompting (COSP)](https://learnprompting.org/docs/advanced/ensembling/consistency_based_self_adaptive_prompting), [Max Mutual Information (MMI) Method](https://learnprompting.org/docs/advanced/ensembling/max_mutual_information_method), [DiVeRSe (Diverse Verifier on Reasoning Step)](https://learnprompting.org/docs/advanced/ensembling/diverse_verifier_on_reasoning_step), [Prompt Paraphrasing](https://learnprompting.org/docs/advanced/ensembling/prompt_paraphrasing), [Universal Self-Adaptive Prompting (USP)](https://learnprompting.org/docs/advanced/ensembling/universal_self_adaptive_prompting), [Universal Self-Consistency](https://learnprompting.org/docs/advanced/ensembling/universal_self_consistency), [Multi-Chain Reasoning (MCR)](https://learnprompting.org/docs/advanced/ensembling/multi-chain-reasoning)
5. [Self-Criticism Prompting Techniques](https://learnprompting.org/docs/advanced/self_criticism/introduction): [Self-Calibration](https://learnprompting.org/docs/advanced/self_criticism/self_calibration), [Self-Refine](https://learnprompting.org/docs/advanced/self_criticism/self_refine), [Reversing Chain-of-Thought (RCoT)](https://learnprompting.org/docs/advanced/self_criticism/rcot), [Self-Verification](Self-Verification), [Chain-of-Verification (CoVe)](https://learnprompting.org/docs/advanced/self_criticism/chain_of_verification), [Cumulative Reasoning (CR)](https://learnprompting.org/docs/advanced/self_criticism/cumulative_reasoning)
6. [Decomposition Prompting Techniques](https://learnprompting.org/docs/advanced/decomposition/introduction): [Decomposed (DecomP) Prompting](https://learnprompting.org/docs/advanced/decomposition/decomp), [Plan-and-Solve (PS) Prompting](https://learnprompting.org/docs/advanced/decomposition/plan_and_solve), [Program of Thoughts Prompting](https://learnprompting.org/docs/advanced/decomposition/program_of_thoughts). [Faithful Chain-of-Thought Reasoning](https://learnprompting.org/docs/advanced/decomposition/faithful_cot), [Skeleton-of-Thought Prompting](https://learnprompting.org/docs/advanced/decomposition/skeleton_of_thoughts), [Tree of Thoughts (ToT) Prompting](https://learnprompting.org/docs/advanced/decomposition/tree_of_thoughts), [Recursion of Thought Prompting](https://learnprompting.org/docs/advanced/decomposition/recursion_of_thought)


## New Techniques Learning Path

1. [Self-Harmonized Chain-of-Thought (ECHO)](https://learnprompting.org/docs/new_techniques/self_harmonized_chain_of_thought)
2. [Logic-of-Thought (LoT)](https://learnprompting.org/docs/new_techniques/logic_of_thought)
3. [Tree of Thoughts (ToT)](https://www.promptingguide.ai/techniques/tot)
4. [Code Prompting](https://learnprompting.org/docs/new_techniques/code_prompting)
5. [Aligned Chain-of-Thought (AlignedCoT)](https://learnprompting.org/docs/new_techniques/aligned_cot)
6. [End-to-End DAG-Path (EEDP) Prompting](https://learnprompting.org/docs/new_techniques/end_to_end_dag_path_prompting)
7. [Instance-adaptive Zero-Shot Chain-of-Thought Prompting (IAP)](https://learnprompting.org/docs/new_techniques/instance_adaptive_zero_shot_chain_of_thought)
8. [Narrative-of-Thought (NoT)](https://learnprompting.org/docs/new_techniques/narrative_of_thought)
9. [Reflexion](https://www.promptingguide.ai/techniques/reflexion)
10. [Multimodal CoT Prompting](https://www.promptingguide.ai/techniques/multimodalcot)
11. [GraphPrompts](https://www.promptingguide.ai/techniques/graph)
   
## Techniques for Vision-Language Models

1. [Prompt Learning for Vision-Language Models](https://learnprompting.org/docs/new_techniques/for_vision_language_models/prompt_learning)
2. [Context Optimization (CoOp) for Vision-Language Models](https://learnprompting.org/docs/new_techniques/for_vision_language_models/context_optimization)
3. [Conditional Prompt Learning (CoCoOp) for Vision-Language Models](https://learnprompting.org/docs/new_techniques/for_vision_language_models/conditional_prompt_learning)
4. [Mixture of Prompt Learning (MoCoOp) for Vision-Language Models](https://learnprompting.org/docs/new_techniques/for_vision_language_models/mixture_of_prompt_learning)
5. [Attention Prompting on Image](https://learnprompting.org/docs/new_techniques/for_vision_language_models/attention_prompting_on_image)
6. [Visual Prompting for Multimodal LLMs](https://learnprompting.org/docs/new_techniques/for_multimodal_llms/visual_prompt)


## Agents Learning Path

1. [What is prompt engineering and why it matters for AI Agents](https://medium.com/@alvaro_72265/what-is-prompt-engineering-and-why-it-matters-for-ai-agents-0c1537d64b14)
2. [Research Findings: LLM Agents](https://www.promptingguide.ai/research/llm-agents)
3. [Agents Introduction](https://learnprompting.org/docs/agents/introduction)
4. [LLMs Using Tools](https://learnprompting.org/docs/agents/mrkl)
5. [LLMs that Reason and Act (ReAct)](https://learnprompting.org/docs/agents/react) and [In Depth](https://www.promptingguide.ai/techniques/react)
6. [Code as Reasoning](https://learnprompting.org/docs/agents/pal)
7. [Function Calling with LLMs](https://www.promptingguide.ai/applications/function_calling)
8. [Fine-Tuning with GPT-4o Models](https://www.promptingguide.ai/applications/finetuning-gpt4o)


#### Note for Chain-of-Thought Prompting:

OpenAI's o1 model represents a significant advancement in AI reasoning capabilities, particularly when compared to earlier models like GPT-4o. Here's a detailed comparison focusing on the application of Chain-of-Thought (CoT) prompting:

**Chain-of-Thought Prompting with GPT-4o:**

- **Explicit Prompting Required:** To engage in step-by-step reasoning, users must explicitly instruct GPT-4o to "think step by step" or "show your reasoning." Without such prompts, the model may provide direct answers without detailed explanations.

- **Performance in Complex Tasks:** While capable, GPT-4o's effectiveness in complex reasoning tasks is limited. For instance, it solved only 13% of problems on the International Mathematics Olympiad (IMO) qualifying exam.

**o1's Built-in Reasoning Capabilities:**

- **Internal Chain-of-Thought Processing:** o1 is designed to internally process a chain of thought before responding, eliminating the need for explicit CoT prompts. This design allows o1 to handle complex problems more effectively.

- **Enhanced Performance:** o1 significantly outperforms GPT-4o in complex reasoning tasks. It achieved an 83% success rate on the IMO qualifying exam and ranked in the 89th percentile in Codeforces coding competitions.

- **Reinforcement Learning Integration:** o1's training incorporated reinforcement learning, enabling it to refine its reasoning processes and adapt strategies for problem-solving.

**Key Differences:**

- **User Interaction:** With GPT-4o, users must prompt the model to engage in detailed reasoning. In contrast, o1 autonomously employs internal reasoning, streamlining user interaction.

- **Response Time and Cost:** o1's internal reasoning process requires more computational resources, leading to longer response times and higher costs compared to GPT-4o.

- **Accuracy and Reliability:** o1's built-in reasoning reduces the likelihood of errors and hallucinations, making it more reliable for complex tasks.

**Considerations for Use:**

- **Task Complexity:** For straightforward tasks, GPT-4o may suffice. However, for complex problem-solving in areas like mathematics, coding, and scientific reasoning, o1's advanced capabilities are advantageous.

- **Resource Allocation:** Due to o1's higher computational demands and associated costs, it's essential to assess whether its enhanced reasoning aligns with your project's requirements and budget.

In summary, while GPT-4o can perform chain-of-thought reasoning when explicitly prompted, o1 inherently integrates this capability, offering superior performance in complex reasoning tasks. This integration simplifies user interaction and enhances accuracy, albeit with increased computational requirements.

 

 

## Advanced Papers

Techniques for prompting LLMs in more sophisticated ways began to take off in 2022. They coalesced in moves toward agentic AI early this year. Foundational examples of this body of work include:

1. [Chain of Thought prompting](https://arxiv.org/abs/2201.11903), which asks LLMs to think step by step
2. [Self-consistency](https://arxiv.org/abs/2203.11171), which prompts a model to generate several responses and pick the one that’s most consistent with the others
3. [ReAct](https://research.google/blog/react-synergizing-reasoning-and-acting-in-language-models/), which interleaves reasoning and action steps to accomplish a goal
4. [Self-Refine](https://arxiv.org/abs/2303.17651), which enables an agent to reflect on its own output
5. [Reflexion](https://arxiv.org/abs/2303.11366), which enables a model to act, evaluate, reflect, and repeat.
6. [Test-time compute](https://arxiv.org/abs/2408.03314), which increases the amount of processing power allotted to inference

Reference:

https://www.deeplearning.ai/the-batch/issue-281/
