Prompts & plugins
提示工程指南
The Prompt Engineering Guide is a comprehensive open-source resource maintained by DAIR.AI, designed to help users master interaction techniques with Large Language Models (LLMs).
What is 提示工程指南?
The Prompt Engineering Guide is a comprehensive open-source resource maintained by DAIR.AI, designed to help users master interaction techniques with Large Language Models (LLMs).It goes beyond simple prompt design, exploring how prompt engineering can enhance model performance in complex tasks such as question answering, arithmetic reasoning, and code generation.
The curriculum systematically covers core technologies ranging from basic concepts to advanced methods like Zero-shot prompting, Few-shot prompting, Chain-of-Thought (CoT), Tree of Thoughts (ToT), and Retrieval-Augmented Generation (RAG).It also includes specific application cases for mainstream models including Claude-3, GPT-4, Gemini, and Llama-3, alongside research on security risks like adversarial prompting and hallucination identification.
Beyond theoretical frameworks, the guide offers practical tools such as Prompt Hub classification examples, function calling guides, and agent workflow designs.It serves as an essential learning resource for researchers and developers aiming to understand LLM capabilities and build efficient AI applications.
Key features
- Core TechnologyIn-depth analysis of key prompting techniques including Zero-shot, Few-shot, Chain-of-Thought (CoT), Self-Consistency, Tree of Thoughts (ToT), and the ReAct framework.
- Multi-Model SuppCovers specific prompting strategies for mainstream LLMs such as GPT-4, Claude-3, Gemini 1.5 Pro, Llama-3, Mistral, and Kimi.
- Advanced ApplicaProvides design guides for Retrieval-Augmented Generation (RAG), Automatic Reasoning and Tool-use (ART), Program-Aided Language Models, and Agent workflows.
- Security & RiskDedicated sections explore prompt injection, leakage, jailbreaking attacks, and truthfulness issues like model hallucinations and biases.
- Practical ExamplIncludes concrete prompt examples across various domains such as sentiment classification, code generation, mathematical reasoning, image generation, and text summarization.
- Academic ResearcAggregates findings on LLM agents, context engineering, tokenization mechanisms, and latest papers to bridge theory and practice.
How to use it
- Visit the Prompt Engineering Guide website and browse the left navigation menu to understand the complete knowledge system from basics to advanced techniques.
- Select specific prompting technology sections based on your needs, such as learning the principles and implementation of Chain-of-Thought (CoT) or Retrieval-Augmented Generation (RAG).
- Refer to the 'Prompt Applications' section to view concrete prompt examples and best practices for code generation, sentiment classification, or mathematical reasoning.
- Check the 'Models' section for optimization suggestions and comparative analysis tailored to specific models like GPT-4, Claude-3, or Llama-3.
- Review the 'Risks and Misuse' section to learn how to identify and defend against prompt injection and hallucinations, enhancing application security.
- For systematic learning, consider joining the DAIR.AI Academy to access related courses and certification opportunities.
Where it fits
- AI Application DDevelopers use function calling and RAG techniques from the guide to build more accurate and controllable LLM applications.
- Academic ResearcResearchers refer to the latest papers on LLM reasoning, agent components, and context engineering to explore model capability boundaries.
- Prompt OptimizatPractitioners solve complex logical reasoning and domain-specific QA challenges using few-shot prompting and Tree of Thoughts methods.
- Security AuditinSecurity teams learn adversarial prompting techniques to test and harden AI systems against prompt leakage and jailbreak attacks.
Pricing and free quota
The guide is an open-source free resource.DAIR.AI Academy offers paid courses with discounts available using code PROMPTING; specific pricing follows the official site.
Who it is for
- AI Application Developers
- LLM Researchers
- Prompt Engineers
- Data Scientists
- AI Security Specialists
FAQ
Is this guide suitable for beginners?
Yes, the guide starts with an introduction to prompt engineering and basic concepts, gradually progressing to advanced techniques, making it suitable for users at different levels.
Does it include optimization tips for specific models?
Yes.There is a dedicated models section covering features and prompting strategies for mainstream models like GPT-4, Claude-3, Gemini, and Llama-3.
How can I access more systematic training courses?
You can join the DAIR.AI Academy, which offers structured prompt engineering courses and occasionally provides discount codes.
Does the guide cover AI security issues?
Yes, it includes a 'Risks and Misuse' section that discusses security topics such as adversarial prompting, prompt injection, jailbreaking, and hallucinations.