Free, open-source guides, prompt libraries, automatic prompt optimizers, prompt compression and structured-output libraries for getting better, more reliable results from LLMs.
DAIR.AI's guides, papers, lessons and notebooks on prompt engineering, context engineering, RAG and AI agents, also published as a website. MIT.
Anthropic's 9-chapter interactive course with exercises on prompt structure, common failure modes and building prompts from scratch, written for Claude. No license file.
22 prompt engineering techniques as hands-on Jupyter notebooks, from basic templates to chain-of-thought, self-consistency and tree-of-thought. Custom non-commercial license.
A hand-curated collection of papers, tools, models, benchmarks and courses for prompt and context engineering. Apache-2.0.
Formerly Awesome ChatGPT Prompts: a large community prompt library that works with most chat models, and can be self-hosted. Code MIT; prompts CC0.
An open-source CLI framework that organizes reusable AI prompts, called Patterns, for tasks like summarizing papers or pulling the key points from videos. MIT.
A structured, reusable prompt design framework (a "programming language for prompts") with templates, variables and commands; widely used in the Chinese AI community. Apache-2.0.
Stanford's framework for programming rather than prompting language models: write modular Python and let its optimizers tune prompts and weights. MIT.
Optimizes prompts, code and other text parameters against any metric using LLM reflection and Pareto-efficient evolutionary search; works with DSPy. MIT.
A PyTorch-like library to build and auto-optimize LM workflows, with zero-shot and few-shot prompt optimization. MIT.
A prompt tuning framework based on Intent-based Prompt Calibration: it generates hard edge cases and refines the prompt step by step, within a budget you set. Apache-2.0.
A prompt optimization tool as a web app, desktop app, Chrome extension or Docker image: improve prompts, reuse variable templates and compare versions side by side. AGPL-3.0.
Microsoft's prompt compression methods (LLMLingua, LongLLMLingua, LLMLingua-2) that use a small model to drop non-essential tokens and cut cost and latency. MIT.
A programming paradigm for steering language models and constraining the structure of their output, with backends such as Transformers and llama.cpp. MIT.
A library for structured outputs from LLMs, so generated text follows the schema or format you need. Apache-2.0.
Define the data you need as a Pydantic model; Instructor asks the LLM for those fields, validates the response and can retry on failure. MIT.
A typed programming language for LLM and agent functions with built-in tests, callable from Python, TypeScript, Go and more. Apache-2.0.
A Python library to call many LLMs through one interface, with prompts as decorated functions, structured output and tools. MIT.
A markdown file format (.prompty) for LLM prompts, with runtimes for Python, TypeScript, Rust and C# and a VS Code extension. MIT.
A task-based NLP engine (entity extraction, classification and more) with Pydantic structured outputs and built-in evaluation. Apache-2.0.
An open-source LLMOps platform to manage and version prompts and to observe and monitor AI calls; runs locally with Docker Compose. Apache-2.0.
Every link goes to the project's own GitHub repo or official site. Check each project's license and docs before you use it. Licenses are as reported by GitHub or the repo's README/LICENSE on Nov 29, 2026. Prompt testing and eval tools (promptfoo, Langfuse) are on llmevaltools.surge.sh, and prompt-injection defenses are on llmguardrailtools.surge.sh.