{"id":109823,"url":"https://github.com/tysoncung/awesome-prompt-engineering","name":"awesome-prompt-engineering","description":"🚀 A curated list of awesome prompt engineering resources, tools, and techniques for LLMs","projects_count":60,"last_synced_at":"2026-10-11T13:00:19.907Z","repository":{"id":333279371,"uuid":"1084614882","full_name":"tysoncung/awesome-prompt-engineering","owner":"tysoncung","description":"🚀 A curated list of awesome prompt engineering resources, tools, and techniques for LLMs","archived":false,"fork":false,"pushed_at":"2025-10-27T23:39:39.000Z","size":11,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-09-21T21:08:45.399Z","etag":null,"topics":["ai","awesome","awesome-list","chatgpt","gpt","langchain","llm","machine-learning","nlp","prompt-engineering"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tysoncung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T23:24:28.000Z","updated_at":"2025-11-30T01:18:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tysoncung/awesome-prompt-engineering","commit_stats":null,"previous_names":["tysoncung/awesome-prompt-engineering"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tysoncung/awesome-prompt-engineering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tysoncung%2Fawesome-prompt-engineering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tysoncung%2Fawesome-prompt-engineering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tysoncung%2Fawesome-prompt-engineering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tysoncung%2Fawesome-prompt-engineering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tysoncung","download_url":"https://codeload.github.com/tysoncung/awesome-prompt-engineering/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tysoncung%2Fawesome-prompt-engineering/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":343843146,"owners_count":38187663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-11T02:00:05.703Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"created_at":"2026-01-18T13:00:44.116Z","updated_at":"2026-10-11T13:00:19.909Z","primary_language":null,"list_of_lists":false,"displayable":true,"categories":["License","Tools \u0026 Frameworks","Learning Resources","Model-Specific Resources","Community \u0026 Discussions","Related Lists"],"sub_categories":["Open Source Models","Prompt Testing \u0026 Optimization","Guides \u0026 Documentation","Prompt Libraries","Research Papers","Courses \u0026 Tutorials","OpenAI GPT","Development Tools","Books","Anthropic Claude","Google Gemini"],"readme":"# Awesome Prompt Engineering [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)\n\n\u003e A curated list of awesome prompt engineering resources, tools, techniques, and best practices for working with Large Language Models (LLMs)\n\nPrompt engineering is the art and science of crafting effective inputs to get the best outputs from AI language models like GPT-4, Claude, Gemini, and others. This list covers everything from fundamental techniques to advanced strategies.\n\n## Contents\n\n- [Learning Resources](#learning-resources)\n  - [Courses \u0026 Tutorials](#courses--tutorials)\n  - [Books](#books)\n  - [Research Papers](#research-papers)\n  - [Guides \u0026 Documentation](#guides--documentation)\n- [Core Techniques](#core-techniques)\n  - [Zero-Shot Prompting](#zero-shot-prompting)\n  - [Few-Shot Prompting](#few-shot-prompting)\n  - [Chain-of-Thought (CoT)](#chain-of-thought-cot)\n  - [Tree of Thoughts](#tree-of-thoughts)\n  - [ReAct](#react)\n- [Advanced Techniques](#advanced-techniques)\n  - [Self-Consistency](#self-consistency)\n  - [Constitutional AI](#constitutional-ai)\n  - [Prompt Chaining](#prompt-chaining)\n  - [Meta-Prompting](#meta-prompting)\n- [Tools \u0026 Frameworks](#tools--frameworks)\n  - [Prompt Testing \u0026 Optimization](#prompt-testing--optimization)\n  - [Prompt Libraries](#prompt-libraries)\n  - [Development Tools](#development-tools)\n- [Prompt Templates](#prompt-templates)\n  - [Code Generation](#code-generation)\n  - [Data Analysis](#data-analysis)\n  - [Content Creation](#content-creation)\n  - [Reasoning \u0026 Problem Solving](#reasoning--problem-solving)\n- [Model-Specific Resources](#model-specific-resources)\n  - [OpenAI GPT](#openai-gpt)\n  - [Anthropic Claude](#anthropic-claude)\n  - [Google Gemini](#google-gemini)\n  - [Open Source Models](#open-source-models)\n- [Community \u0026 Discussions](#community--discussions)\n- [Related Lists](#related-lists)\n- [Contributing](#contributing)\n\n## Learning Resources\n\n### Courses \u0026 Tutorials\n\n- [OpenAI Prompt Engineering Guide](https://platform.openai.com/docs/guides/prompt-engineering) - Official guide from OpenAI\n- [Anthropic Prompt Engineering Guide](https://docs.anthropic.com/claude/docs/prompt-engineering) - Best practices for Claude\n- [Prompt Engineering Guide by DAIR.AI](https://www.promptingguide.ai/) - Comprehensive community-driven guide\n- [Learn Prompting](https://learnprompting.org/) - Free course on prompt engineering\n- [DeepLearning.AI ChatGPT Prompt Engineering](https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/) - Course by Andrew Ng\n- [Brex's Prompt Engineering Guide](https://github.com/brexhq/prompt-engineering) - Practical guide with examples\n\n### Books\n\n- [The Prompt Engineering Handbook](https://promptengineering.org/) - Comprehensive handbook on techniques\n- [Prompt Engineering for LLMs](https://www.oreilly.com/library/view/prompt-engineering-for/9781098156046/) - O'Reilly book\n\n### Research Papers\n\n- [Chain-of-Thought Prompting](https://arxiv.org/abs/2201.11903) - Elicits reasoning in LLMs\n- [Tree of Thoughts](https://arxiv.org/abs/2305.10601) - Deliberate problem solving with LLMs\n- [ReAct: Synergizing Reasoning and Acting](https://arxiv.org/abs/2210.03629) - Combining reasoning and actions\n- [Self-Consistency Improves Chain of Thought Reasoning](https://arxiv.org/abs/2203.11171) - Sampling multiple reasoning paths\n- [Constitutional AI](https://arxiv.org/abs/2212.08073) - Self-improvement through AI feedback\n- [Large Language Models are Zero-Shot Reasoners](https://arxiv.org/abs/2205.11916) - \"Let's think step by step\"\n- [Prompt Injection Attacks](https://arxiv.org/abs/2302.12173) - Security considerations\n\n### Guides \u0026 Documentation\n\n- [Prompting Techniques](https://github.com/openai/openai-cookbook/blob/main/techniques_to_improve_reliability.md) - OpenAI cookbook\n- [Prompt Engineering Best Practices](https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api) - OpenAI best practices\n- [Claude Prompt Library](https://docs.anthropic.com/claude/prompt-library) - Curated prompts from Anthropic\n- [Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts) - Community-curated prompts\n\n## Core Techniques\n\n### Zero-Shot Prompting\n\nDirect prompting without examples - asking the model to perform a task with just instructions.\n\n**Example:**\n```\nTranslate the following English text to French: \"Hello, how are you?\"\n```\n\n**Best for:** Simple, well-defined tasks that don't require specific formatting or style.\n\n### Few-Shot Prompting\n\nProviding examples before asking the model to perform the task.\n\n**Example:**\n```\nTranslate English to French:\n\nEnglish: Hello\nFrench: Bonjour\n\nEnglish: Goodbye\nFrench: Au revoir\n\nEnglish: Thank you\nFrench: [model completes]\n```\n\n**Best for:** Tasks requiring specific formatting, style, or complex patterns.\n\n### Chain-of-Thought (CoT)\n\nEncouraging the model to show its reasoning process step-by-step.\n\n**Example:**\n```\nQ: Roger has 5 tennis balls. He buys 2 more cans of tennis balls.\nEach can has 3 tennis balls. How many tennis balls does he have now?\n\nA: Let's think step by step:\n1. Roger starts with 5 tennis balls\n2. He buys 2 cans, each with 3 balls\n3. That's 2 × 3 = 6 new balls\n4. Total: 5 + 6 = 11 tennis balls\n```\n\n**Best for:** Complex reasoning, math problems, multi-step tasks.\n\n### Tree of Thoughts\n\nExploring multiple reasoning paths and evaluating them.\n\n**Best for:** Complex problem-solving requiring exploration of alternatives.\n\n### ReAct\n\nCombining reasoning with action-taking (tool use).\n\n**Best for:** Tasks requiring external information or actions (web search, calculations, etc.).\n\n## Advanced Techniques\n\n### Self-Consistency\n\nGenerating multiple reasoning paths and selecting the most consistent answer.\n\n**Implementation:**\n1. Generate multiple chain-of-thought responses\n2. Extract final answers from each\n3. Use majority voting or consistency checking\n\n### Constitutional AI\n\nUsing AI to critique and improve its own outputs based on principles.\n\n**Example:**\n```\nInitial response: [model output]\n\nPlease critique the above response for:\n1. Accuracy\n2. Completeness\n3. Clarity\n\nThen provide an improved version.\n```\n\n### Prompt Chaining\n\nBreaking complex tasks into a sequence of simpler prompts.\n\n**Example:**\n```\nPrompt 1: \"Summarize this article\"\nPrompt 2: \"Extract key insights from: [summary]\"\nPrompt 3: \"Create action items based on: [insights]\"\n```\n\n### Meta-Prompting\n\nAsking the model to generate or improve prompts.\n\n**Example:**\n```\nI want to use an LLM to analyze customer feedback.\nGenerate an effective prompt for this task that:\n1. Extracts sentiment\n2. Identifies key themes\n3. Suggests improvements\n```\n\n## Tools \u0026 Frameworks\n\n### Prompt Testing \u0026 Optimization\n\n- [LangChain](https://github.com/langchain-ai/langchain) - Framework for developing LLM applications\n- [LangSmith](https://www.langchain.com/langsmith) - Testing and monitoring for LLM apps\n- [PromptFoo](https://github.com/promptfoo/promptfoo) - Test and evaluate LLM outputs\n- [OpenAI Evals](https://github.com/openai/evals) - Framework for evaluating LLMs\n- [Weights \u0026 Biases Prompts](https://wandb.ai/site/prompts) - Track and version prompts\n- [Humanloop](https://humanloop.com/) - Prompt engineering IDE\n- [PromptLayer](https://promptlayer.com/) - Prompt management and tracking\n\n### Prompt Libraries\n\n- [LangChain Hub](https://smith.langchain.com/hub) - Discover and share prompts\n- [FlowGPT](https://flowgpt.com/) - Community prompt marketplace\n- [PromptBase](https://promptbase.com/) - Marketplace for prompts\n- [ShareGPT](https://sharegpt.com/) - Share ChatGPT conversations\n\n### Development Tools\n\n- [LangChain](https://github.com/langchain-ai/langchain) - Python/JS framework for LLM apps\n- [LlamaIndex](https://github.com/run-llama/llama_index) - Data framework for LLM apps\n- [Semantic Kernel](https://github.com/microsoft/semantic-kernel) - Microsoft's LLM SDK\n- [Haystack](https://github.com/deepset-ai/haystack) - NLP framework with LLM support\n- [Guidance](https://github.com/guidance-ai/guidance) - Control LLM generation\n- [LMQL](https://lmql.ai/) - Query language for LLMs\n\n## Prompt Templates\n\n### Code Generation\n\n**Debug Code:**\n```\nI have the following code that's not working:\n\n```python\n[your code]\n```\n\nError: [error message]\n\nPlease:\n1. Identify the bug\n2. Explain why it's happening\n3. Provide the corrected code\n```\n\n**Code Review:**\n```\nReview this code for:\n- Best practices\n- Performance issues\n- Security concerns\n- Readability\n\n```python\n[your code]\n```\n\nProvide specific suggestions for improvement.\n```\n\n### Data Analysis\n\n**Exploratory Analysis:**\n```\nAnalyze this dataset and provide:\n1. Summary statistics\n2. Key patterns or trends\n3. Notable outliers or anomalies\n4. Recommendations for deeper analysis\n\nDataset: [data or description]\n```\n\n### Content Creation\n\n**Blog Post Structure:**\n```\nWrite a blog post about [topic] with:\n- Engaging introduction\n- 3-5 main sections with subheadings\n- Practical examples\n- Actionable takeaways\n- Conclusion\n\nTarget audience: [description]\nTone: [professional/casual/technical/etc.]\nLength: ~1000 words\n```\n\n### Reasoning \u0026 Problem Solving\n\n**Structured Problem-Solving:**\n```\nSolve this problem using structured reasoning:\n\nProblem: [description]\n\nPlease:\n1. Restate the problem in your own words\n2. Identify key constraints and requirements\n3. Break down into sub-problems\n4. Solve each sub-problem\n5. Synthesize the final solution\n6. Verify the solution meets all requirements\n```\n\n## Model-Specific Resources\n\n### OpenAI GPT\n\n- [GPT-4 System Card](https://cdn.openai.com/papers/gpt-4-system-card.pdf) - Capabilities and limitations\n- [OpenAI API Best Practices](https://platform.openai.com/docs/guides/production-best-practices)\n- [Function Calling Guide](https://platform.openai.com/docs/guides/function-calling)\n- [GPT-4 Prompt Engineering](https://github.com/openai/openai-cookbook)\n\n**GPT-4 Specific Tips:**\n- Use system messages effectively for role-setting\n- Leverage function calling for structured outputs\n- Temperature 0.7-1.0 for creative tasks, 0-0.3 for factual\n\n### Anthropic Claude\n\n- [Claude Prompt Engineering](https://docs.anthropic.com/claude/docs/intro-to-prompting)\n- [Claude Best Practices](https://docs.anthropic.com/claude/docs/prompt-engineering)\n- [Extended Thinking with Claude](https://docs.anthropic.com/claude/docs/extended-thinking)\n\n**Claude Specific Tips:**\n- Use XML tags for structure: `\u003cdocument\u003e`, `\u003cexample\u003e`, etc.\n- Leverage extended thinking for complex reasoning\n- Constitutional AI principles built-in\n\n### Google Gemini\n\n- [Gemini Prompting Guide](https://ai.google.dev/docs/prompt_best_practices)\n- [Multimodal Prompting](https://ai.google.dev/tutorials/prompting_with_media)\n\n**Gemini Specific Tips:**\n- Excellent at multimodal inputs (text + images)\n- Long context window (up to 1M tokens)\n- Strong at code generation and analysis\n\n### Open Source Models\n\n- [Llama 2 Prompting Guide](https://replicate.com/blog/how-to-prompt-llama)\n- [Mistral AI Documentation](https://docs.mistral.ai/)\n- [Prompt Engineering for Open Source LLMs](https://huggingface.co/blog/how-to-generate)\n\n## Community \u0026 Discussions\n\n- [r/PromptEngineering](https://www.reddit.com/r/PromptEngineering/) - Reddit community\n- [LangChain Discord](https://discord.gg/langchain) - LangChain community\n- [OpenAI Forum](https://community.openai.com/) - Official OpenAI discussions\n- [Anthropic Discord](https://discord.gg/anthropic) - Claude community\n- [PromptHero](https://prompthero.com/) - Prompt sharing platform\n\n## Related Lists\n\n- [awesome-chatgpt](https://github.com/humanloop/awesome-chatgpt) - ChatGPT resources\n- [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) - Prompt collection\n- [awesome-llm](https://github.com/Hannibal046/Awesome-LLM) - LLM resources\n- [awesome-langchain](https://github.com/kyrolabs/awesome-langchain) - LangChain resources\n- [awesome-gpt4](https://github.com/radi-cho/awesome-gpt4) - GPT-4 specific resources\n\n## Contributing\n\nContributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.\n\n- Submit new resources via pull request\n- Report broken links or outdated information via issues\n- Suggest new categories or improvements\n\n## License\n\n[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)\n\nTo the extent possible under law, [Tyson Cung](https://github.com/tysoncung) has waived all copyright and related or neighboring rights to this work.\n","projects_url":"https://awesome.ecosyste.ms/api/v1/lists/tysoncung%2Fawesome-prompt-engineering/projects"}