dair-ai / Prompt-Engineering-Guide
🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.
View dair-ai/Prompt-Engineering-GuidePrompt engineering stopped being about clever wording and became a loop: draft a prompt, run it against a set of cases, measure the result, change one variable, repeat. This board follows the tooling that loop depends on — prompt compression and pruning, automated prompt optimisation, libraries and templates, tuning methods and evaluation harnesses. It is assembled from GitHub topic pages for prompt engineering, prompt optimisation, prompt compression and prompt tuning, ranked by stars, which is why a two-week-old optimiser can outrank a template collection that has existed for years. Each card shows language, stars and forks and opens a page with description, license, activity dates, README and related prompt projects. If your goal is cutting token cost or making an agent follow instructions reliably, the sections below split the board into optimisation, libraries, tuning and structured-output tooling.
🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.
View dair-ai/Prompt-Engineering-GuideExtracted system prompts from Anthropic - Claude Fable 5.1, Opus 5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro, Antigravity.
View asgeirtj/system_prompts_leaksLEAKED SYSTEM PROMPTS FOR CHATGPT, CLAUDE, GEMINI, GROK, PERPLEXITY, CURSOR, LOVABLE, REPLIT, AND MORE! - AI SYSTEMS TRANSPARENCY FOR ALL! 👐
View elder-plinius/CL4R1T4SAn AI prompt optimizer for writing better prompts and getting better AI results.
View linshenkx/prompt-optimizerTest your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more.
View promptfoo/promptfooA Claude skill that writes the accurate prompts for any AI tool. Zero tokens or credits wasted. Full context and memory retention
View nidhinjs/prompt-masterLangGPT: Empowering everyone to become a prompt expert! 🚀 📌 结构化提示词(Structured Prompt)提出者 📌 元提示词(Meta-Prompt)发起者 📌 最流行的提示词落地范式 | Language of GPT The pioneering framework for structured & meta-prompt
View langgptai/LangGPTPractical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny).
View cobusgreyling/loop-engineeringBuild high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
View microsoft/promptflowA CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
View mufeedvh/code2promptSuperPrompt is an attempt to engineer prompts that might help us understand AI agents.
View NeoVertex1/SuperPrompt🔥中文 prompt 精选🔥,ChatGPT 使用指南,提升 ChatGPT 可玩性和可用性!🚀
View langgptai/wonderful-promptsPrompt Engineering, Generative AI, and LLM Guide by Learn Prompting | Join our discord for the largest Prompt Engineering learning community
View trigaten/Learn_PromptingA full-featured & carefully designed adaptive prompt for Bash & Zsh
View liquidprompt/liquidpromptPrompt Engineering | Prompt Versioning | Use GPT or other prompt based models to get structured output. Join our discord for Prompt-Engineering, LLMs and other latest research
View promptslab/Promptify[CVPR 2026] PromptEnhancer is a prompt-rewriting tool, refining prompts into clearer, structured versions for better image generation.
View Hunyuan-PromptEnhancer/PromptEnhancer🕹️ Open-source, developer-first LLMOps platform designed to streamline prompt design, version management, instant delivery, collaboration, troubleshooting, observability and more.
View pezzolabs/pezzoTemplates and workflow for generating PRDs, Tech Designs, and MVP and more using LLMs for AI IDEs
View KhazP/vibe-coding-prompt-templateOpen-source tools for prompt testing and experimentation, with support for both LLMs (e.g. OpenAI, LLaMA) and vector databases (e.g. Chroma, Weaviate, LanceDB).
View hegelai/prompttoolsAn open-source visual programming environment for battle-testing prompts to LLMs.
View ianarawjo/ChainForgeA framework for prompt tuning using Intent-based Prompt Calibration
View Eladlev/AutoPromptA unified evaluation framework for large language models
View microsoftarchive/promptbenchPractical bilingual AI prompt library for prompt engineering, work, learning, content, marketing, and everyday use.
View yaojingang/yao-open-promptsClickPrompt - Streamline your prompt design, with ClickPrompt, you can easily view, share, and run these prompts with just one click. ClickPrompt 用于一键轻松查看、分享和执行您的 Prompt。
View prompt-engineering/click-promptAn optimized deep prompt tuning strategy comparable to fine-tuning across scales and tasks
View THUDM/P-tuning-v2Streamlines and simplifies prompt design for both developers and non-technical users with a low code approach.
View character-ai/prompt-poetPromptr is a CLI tool that applies plain language instructions to the filesystem. Instructions can utilize a liquidjs based templating system.
View ferrislucas/promptrA library for prompt engineering and optimization (SAMMO = Structure-aware Multi-Objective Metaprompt Optimization)
View microsoft/sammoOriginal Implementation of Prompt Tuning from Lester, et al, 2021
View google-research/prompt-tuningUnified Go interface for Language Model (LLM) providers. Simplifies LLM integration with flexible prompt management and common task functions.
View teilomillet/gollmA method to fix GPT-3 after deployment with user feedback, without re-training.
View madaan/mempromptDrop-in prompt compression for production LLM apps. Cut your token bill 40-60% without changing your code. Python SDK, LLMLingua-2, MIT.
View jia-gao/leanctxAgent skill for analyzing and improving prompts using 31 frameworks across 7 intent categories. Works with Claude Code, Gemini CLI, Cursor, Copilot, and 30+ Agent Skills compatible tools.
View ckelsoe/prompt-architectExploring Visual Prompts for Adapting Large-Scale Models
View hjbahng/visual_prompting[TPAMI] Searching prompt modules for parameter-efficient transfer learning.
View ZhangYuanhan-AI/NOAHGradient descent, but the parameters are agents — a parallel, asynchronous framework for self-evolving agents (skills, prompts, harnesses). Diffs are the gradients; the aggregator is the optimizer.
View Birfy/agentdescentLocal proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output
View fkiene/llmtrimOfficial implementation for "UniST: A Prompt-Empowered Universal Model for Urban Spatio-Temporal Prediction" (KDD 2024)
View tsinghua-fib-lab/UniST可同时输入多个初版提示词,开启多轮自动优化,连续得到高分后得到最终结果。
View XBigRoad/prompt-optimizer-studio[WWW 2022] KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction
View zjunlp/KnowPromptWe introduce new zero-shot prompting magic words that improves the reasoning ability of language models: panel discussion!
View holarissun/PanelGPT[ICCV 2023] Prompt-aligned Gradient for Prompt Tuning
View BeierZhu/Prompt-alignMCP server for AI image generation and editing with automatic prompt optimization and quality presets. Supports Nano Banana (Gemini), OpenAI GPT Image, and BytePlus Seedream.
View shinpr/mcp-imageA unified, modular framework for prompt optimization
View gepromptet/promptolutionOpen-source, bilingual AI video-prompt skill — rewrite ideas into model-ready text-to-video prompts. A portable Agent Skill (Claude Code, Codex, OpenClaw
View Alisa0808/vibe-creating-skill[ICLR 2022] Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learners
View zjunlp/DARTПереписывает промпт под правила той модели, где вы работаете: GPT-6 Astra, Claude Fable 5.1, Opus 5, Codex. Каждая правка со ссылкой на офиц. док.
View edvardgrishin27/nativepromptBest Prompt Engineering Tools for 2026 AI Workflow Optimization
View AgustiPuigserver/opus-prompt-architectTop 10 Claude Prompt Optimization Frameworks 2026
View heavenaruba/codified-prompt-rule-engine[ECCV 2022] Official Pytorch Implementation of the paper : " Zero-Shot Temporal Action Detection via Vision-Language Prompting "
View sauradip/STALEOfficial implementation for CVPR'23 paper "BlackVIP: Black-Box Visual Prompting for Robust Transfer Learning"
View changdaeoh/BlackVIPProduction-Grade Autoresearch. Ideal for agent harness engineering, prompt engineering, ML model development, GPU kernels, and other optimizable code.
View WecoAI/weco-cli[ICLR 2024] This is the repository for the paper titled "DePT: Decomposed Prompt Tuning for Parameter-Efficient Fine-tuning"
View ShiZhengyan/DePTPromptdesk is a tool designed for effectively creating, organizing, and evaluating prompts and large language models (LLMs).
View promptdesk/promptdeskOn Transferability of Prompt Tuning for Natural Language Processing
View thunlp/Prompt-TransferabilityProgressive Prompts: Continual Learning for Language Models
View arazd/ProgressivePromptsAI agent that turns your rough ideas into perfect image generation prompts. 7-component formula, 70+ creative techniques, 9 domain modes.
View Hainrixz/claude-banana[ICML'2024] "FlashST: A Simple and Universal Prompt-Tuning Framework for Traffic Prediction"
View HKUDS/FlashSTSCOPE: Self-evolving Context Optimization via Prompt Evolution - A framework for automatic prompt optimization
View JarvisPei/SCOPE[AAAI 2024] Prompt-based Distribution Alignment for Unsupervised Domain Adaptation
View BaiShuanghao/Prompt-based-Distribution-AlignmentTurn Claude Code into its own Meta-Harness — a skill that evolves the scaffolding around a fixed model (memory, retrieval, context, prompts) via a native propose→score→Pareto loop.
View 001TMF/harness-forge[NeurIPS 2023 Main Track] This is the repository for the paper titled "Don’t Stop Pretraining? Make Prompt-based Fine-tuning Powerful Learner"
View ShiZhengyan/PowerfulPromptFTThis repo is the official implementation of "Retrieval-Augmented Dynamic Prompt Tuning for Incomplete Multimodal Learning" accepted by AAAI 2025.
View Jian-Lang/RAGPTSource code for Dialogue State Tracking with a Language Model using Schema-Driven Prompting
View Chia-Hsuan-Lee/DST-as-PromptingState-of-the-art prompting techniques implementation with DSpy - Manager-style prompts, role personas, meta-prompting, and more
View dx-corp/dspy-advanced-promptingClaude Code & Cursor token usage monitor and cost tracker for macOS & Windows. Live token/cost/burn monitoring across 8 AI coding agents
View Terse-AI/terseaiA lightweight implementation of the GEPA (Genetic-Pareto) prompt optimization method for large language models.
View egmaminta/GEPA-Lite[ACLW'24] LMPT: Prompt Tuning with Class-Specific Embedding Loss for Long-tailed Multi-Label Visual Recognition
View richard-peng-xia/LMPTOptimize any AI agent’s skills, tools/MCP, and prompts against your own evals.
View skillberry-ai/cap-evolveResidual Prompt Tuning: a method for faster and better prompt tuning.
View arazd/ResidualPromptsOfficial PyTorch implementation of KDD2025 paper "AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection"
View mala-lab/AnomalyGFMCreate the prompts you need to write your Novel using AI
View danielsobrado/ainovelprompterMCP server integrating GEPA (Genetic-Evolutionary Prompt Architecture) for automatic prompt optimization with Claude Desktop
View developzir/gepa-mcp[ICML 2024] Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts (Official Pytorch Implementation)
View zhiyichin/P4D[WWW'2024] "PromptMM: Multi-Modal Knowledge Distillation for Recommendation with Prompt-Tuning"
View HKUDS/PromptMMExploring prompt tuning with pseudolabels for multiple modalities, learning settings, and training strategies.
View BatsResearch/menghini-neurips23-codeOfficial implementation of PCS in essay "Prompt Vision Transformer for Domain Generalization"
View zhengzangw/DoPrompt[AAAI 2024] DGL: Dynamic Global-Local Prompt Tuning for Text-Video Retrieval.
View knightyxp/DGL[ICLR'24 Spotlight] DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer
View VITA-Group/DP-OPTAI-powered prompt optimization hook for Claude Code. Transforms simple prompts into comprehensive, structured instructions using Claude Opus 4.6's advanced reasoning capabilities.
View johnpsasser/claude-code-prompt-optimizerCreate Suno Prompts Using Gemini Flash, works with the Suno API. Create professional-looking timed word-for-word lyrics videos.
View Lumi-Script/Suno-ArchitectDistribution-Aware Prompt Tuning for Vision-Language Models (ICCV 2023)
View mlvlab/DAPTImprove prompts for e.g. GPT3 and GPT-J using templates and hyperparameter optimization.
View Mavenoid/prompt-hyperopt🚀 Lightweight Python library for building production LLM applications with smart context management and automatic token optimization.
View JacobHuang91/prompt-refiner[CVPR 2023] VoP: Text-Video Co-operative Prompt Tuning for Cross-Modal Retrieval
View bighuang624/VoPClaude Code skill that forces AI to understand before executing. Three disciplines: cognition check, requirement understanding, method search.
View ViryaZheng/promptly-promptlocal-first MCP discovery runtime for agents — search before invoke, reduce prompt bloat, and route to local MCP tools
View mcp-shark/lazy-toolPrompt Engineering for Language models (GPT-3, GPT-4, chatGPT) and text-to-image models (Stable Diffusion, Midjourney, Dall-e)
View imJunaidAfzal/Prompt-EngineeringGeneticPromptLab uses genetic algorithms for automated prompt engineering (for LLMs), enhancing quality and diversity through iterative selection, crossover, and mutation
View AmanPriyanshu/GeneticPromptLabOfficial implementation of our EMNLP 2022 paper "CPL: Counterfactual Prompt Learning for Vision and Language Models"
View UCSB-AI/CPLPromptForge scores LLM prompts across seven quality dimensions, then rewrites weak prompts into clear, intent-preserving instructions
View arjun988/promptModel[ECCV 2024] Soft Prompt Generation for Domain Generalization
View renytek13/Soft-Prompt-GenerationIterative prompt refinement means treating a prompt as something you test rather than something you write once. The loop is short: write a first version, run it against a fixed set of inputs you care about, look at where it fails, change one thing, run it again. What makes that engineering rather than tinkering is the fixed set — a small evaluation file kept next to the prompt, so every change is measured against the same cases instead of your memory of last week.
Real examples of iteration look banal on purpose: moving an instruction from the middle of a long prompt to the end because the model honours the last constraint more reliably; replacing a vague adjective with an explicit output format; splitting one prompt that does three jobs into two that do one each. The optimiser projects below automate the search, but the loop is the technique — they simply run it faster than you can by hand.
Prompt compression is the family of techniques that shorten the input without changing the answer. It splits into two kinds. Token-level pruning deletes text the model demonstrably does not need — stop-words, duplicated instructions, boilerplate from a retrieved document — usually with a small trained model scoring each span. Prompt rewriting restates a long instruction more densely, often by letting a model do the shortening and then verifying that behaviour did not change. Both pay off when the same long prefix is sent on every request: cost scales with input tokens, so a prefix that is 40% smaller is a bill that is roughly 40% smaller, and long prompts also raise latency and lower reliability.
Prompt hygiene is what keeps a working prompt working after three people have edited it. Concretely: keep prompts in version control as files rather than as strings buried in application code; keep a small evaluation set and run it before merging a prompt change, the same way you would run tests before merging code; state the output format explicitly and validate it, so a malformed answer surfaces as an error instead of a parse failure three services downstream. The structured-output and guardrail projects in the last section exist because asking politely for JSON is not a validation strategy.
What is iterative prompt refinement? Repeatedly revising a prompt and re-measuring it against a fixed set of test inputs, changing one variable per round, until the failure rate on those inputs is acceptable.
Which is an example of iteration in prompt engineering? Adding an explicit output schema after seeing the model return prose, re-running the same evaluation set, and confirming that parse failures dropped — then keeping the version that passed.
What is prompt compression? Reducing the number of tokens a prompt consumes while preserving the model behaviour you rely on, usually by pruning unnecessary spans or rewriting instructions more densely.
What is prompt hygiene? Treating prompts as versioned artefacts: stored in files, reviewed, tested against an evaluation set, with an explicit output contract and validation around them.
Do I need a framework to do this? No. A folder of prompt files, a script that runs them over a JSONL of cases and a diff of the results covers most of it. Frameworks start to pay off once the number of prompts and models grows.