Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Prompt Engineering Reference Library

This page is a verified index of primary sources for prompt engineering: official documentation, developer and API portals, source repositories, SDKs, downloadable or offline documentation, a two-track learning path, and free-access research literature.

It is a navigation layer, not a tutorial. Where the rest of this book explains a concept, this page tells you which document to open to get the authoritative answer, and in what order to read things. Every link was HTTP-verified on the date shown below; sources that block automated checkers but work in a browser are flagged rather than silently dropped.

Vendor prompting documentation, open guides, programmatic prompting and constrained decoding, evaluation frameworks, injection and red-teaming tooling, and a two-track path from hands-on tutorials to DSPy, token-level constraints and defensible evals.

70 entries across 6 categories, plus 53 education & reference-implementation resources (22 basic / 31 advanced), plus 10 video resources and 5 conference sources.

Every link HTTP-verified on 2026-10-07.

ai.google.dev redirects automated clients to an authentication page and openai.com/research returns 403; both load normally in a browser.

Contents

1. Vendor prompting documentation

OpenAI prompt engineering guide

OpenAI Cookbook

  • Docs: cookbook.openai.com
  • Source: github.com/openai/openai-cookbook
  • SDKs & repos: Runnable notebooks for structured output, function calling, evaluation, RAG
  • Downloadable / offline: Repo cloneable; every example executable
  • Note: More useful than the guide. Working code beats prose advice in this field.

Anthropic prompt engineering

Anthropic prompt library

  • Docs: docs.claude.com/en/…
  • SDKs & repos: Dozens of worked production prompts across task types
  • Downloadable / offline: Web
  • Note: Read these as examples of structure, not as prompts to copy.

Anthropic Cookbook

Google Gemini prompting strategies

Azure OpenAI prompt engineering

OpenAI structured outputs

  • Docs: platform.openai.com/docs/…
  • Developer / API: platform.openai.com/docs
  • SDKs & repos: Constrained generation against a JSON Schema
  • Downloadable / offline: Docs site
  • Note: Prefer schema-constrained output over asking politely for JSON. It is the single highest-leverage change in most pipelines.

2. Open guides, courses & curricula

Prompt Engineering Guide (DAIR.AI)

Learn Prompting

  • Docs: learnprompting.org/docs/introduction
  • SDKs & repos: Structured free course from basics through adversarial prompting
  • Downloadable / offline: Web
  • Note: Good sequencing for beginners; broader and shallower than the DAIR guide.

Anthropic interactive tutorial

  • Docs: github.com/anthropics/…
  • Source: github.com/anthropics/…
  • SDKs & repos: Nine chapters of hands-on exercises with solutions
  • Downloadable / offline: Notebooks in-repo
  • Note: The best single way to actually learn this rather than read about it.

Anthropic courses

Generative AI for Beginners (Microsoft)

DeepLearning.AI short courses

  • Docs: deeplearning.ai/short-courses
  • SDKs & repos: Hour-long free courses, many built with the model vendors
  • Downloadable / offline: Free with registration

LLM Course (mlabonne)

Chat templating (Hugging Face)

  • Docs: huggingface.co/docs/…
  • Source: github.com/huggingface/transformers
  • SDKs & repos: How chat messages actually become tokens for open-weight models
  • Downloadable / offline: Docs site
  • Note: Essential and widely skipped. Most ‘the open model ignores my prompt’ bugs are template bugs.

3. Programmatic prompting & constrained generation

DSPy

  • Docs: dspy.ai
  • Source: github.com/stanfordnlp/dspy
  • SDKs & repos: Declare the task signature, let an optimizer compile the prompt against a metric
  • Downloadable / offline: Docs site
  • Note: The most serious attempt to make prompting an engineering discipline instead of a craft. Stanford NLP.

Outlines

  • Docs: dottxt-ai.github.io/outlines
  • Source: github.com/dottxt-ai/outlines
  • SDKs & repos: Structured generation via regex, JSON Schema and context-free grammars
  • Downloadable / offline: Docs site
  • Note: Constrains at the token level, so invalid output is impossible rather than merely unlikely.

Instructor

Guidance

BAML

  • Docs: docs.boundaryml.com
  • Source: github.com/BoundaryML/baml
  • SDKs & repos: A dedicated language for prompts with typed schemas and generated clients
  • Downloadable / offline: Docs site
  • Note: Treats the prompt as a function signature with a compiler. Unusual and worth a look.

LMQL

  • Docs: lmql.ai
  • Source: github.com/eth-sri/lmql
  • SDKs & repos: Query language for LLMs with constraints as first-class syntax
  • Downloadable / offline: Docs site
  • Note: ETH Zurich research project.

LiteLLM

  • Docs: docs.litellm.ai
  • Source: github.com/BerriAI/litellm
  • SDKs & repos: One OpenAI-compatible interface across 100+ providers; routing, fallbacks, cost tracking
  • Downloadable / offline: Docs site
  • Note: Makes prompts portable across vendors, which is what lets you A/B them honestly.

OpenRouter

  • Docs: openrouter.ai/docs
  • SDKs & repos: Single API across many hosted models
  • Downloadable / offline: Docs site

4. Evaluation — the part that makes prompting real

promptfoo

  • Docs: promptfoo.dev/docs/intro
  • Source: github.com/promptfoo/promptfoo
  • SDKs & repos: Declarative prompt testing, side-by-side comparison, CI integration, red-teaming
  • Downloadable / offline: Docs site; runs locally
  • Note: The easiest way to stop guessing. Write assertions, run the matrix, see which prompt actually wins.

OpenAI Evals

Inspect AI

  • Docs: inspect.aisi.org.uk
  • Source: github.com/UKGovernmentBEIS/inspect_ai
  • SDKs & repos: Evaluation framework from the UK AI Safety Institute: solvers, scorers, agent support
  • Downloadable / offline: Docs site
  • Note: The most rigorously designed open eval framework. Built for work that has to withstand scrutiny.

Ragas

  • Docs: docs.ragas.io
  • Source: github.com/explodinggradients/ragas
  • SDKs & repos: Reference-free metrics for retrieval-augmented pipelines
  • Downloadable / offline: Docs site
  • Note: Faithfulness and context-precision are the metrics that catch real RAG regressions.

DeepEval

LangSmith

  • Docs: docs.smith.langchain.com
  • SDKs & repos: Tracing, datasets, evaluation and prompt versioning
  • Downloadable / offline: Docs site

Langfuse

  • Docs: langfuse.com/docs
  • Source: github.com/langfuse/langfuse
  • SDKs & repos: Open-source tracing, prompt management and evaluation
  • Downloadable / offline: Docs site; self-hostable
  • Note: The self-hostable option, which matters if prompts or data cannot leave your infrastructure.

Phoenix (Arize)

Braintrust

  • Docs: braintrust.dev/docs
  • SDKs & repos: Evaluation, logging and prompt iteration
  • Downloadable / offline: Docs site

HELM

  • Docs: crfm.stanford.edu/helm
  • Source: github.com/stanford-crfm/helm
  • SDKs & repos: Stanford’s holistic evaluation framework and public results
  • Downloadable / offline: Free results + repo
  • Note: Multi-metric by design — accuracy, calibration, robustness, bias, efficiency — rather than one headline number.

lm-evaluation-harness

5. Prompt injection, red-teaming & risk

OWASP Top 10 for LLM Applications

  • Docs: genai.owasp.org
  • Developer / API: owasp.org/…
  • SDKs & repos: Prompt injection, insecure output handling, excessive agency and the rest
  • Downloadable / offline: Free PDFs per release
  • Note: Prompt injection is #1 and remains unsolved. Read this before shipping anything that reads untrusted text.

Simon Willison on prompt injection

  • Docs: simonwillison.net/tags/prompt-injection
  • Developer / API: simonwillison.net
  • SDKs & repos: The longest-running and clearest ongoing analysis of the problem
  • Downloadable / offline: Free archive
  • Note: He coined the framing. The ‘lethal trifecta’ — private data, untrusted content, external communication — is the most useful mental model available.

MITRE ATLAS

  • Docs: atlas.mitre.org
  • SDKs & repos: Adversarial threat landscape for AI systems, structured like ATT&CK
  • Downloadable / offline: Free; matrices downloadable
  • Note: Use it to structure a threat model rather than inventing categories.

garak

  • Docs: github.com/NVIDIA/garak
  • Source: github.com/NVIDIA/garak
  • SDKs & repos: LLM vulnerability scanner with dozens of probe families
  • Downloadable / offline: In-repo docs
  • Note: Point it at your deployment and read the report. NVIDIA-maintained.

PyRIT

Guardrails AI

NeMo Guardrails

NIST AI Risk Management Framework

  • Docs: nist.gov/itl/ai-risk-management-framework
  • SDKs & repos: Governance framework; the generative AI profile is the relevant part
  • Downloadable / offline: Free PDFs
  • Note: What compliance teams will ask about. Worth skimming before they do.

6. Research papers & open-access literature

arXiv

  • Docs: arxiv.org
  • Developer / API: info.arxiv.org/help/api/index.html
  • SDKs & repos: Preprints across all of CS; most systems, ML and PL work appears here before publication
  • Downloadable / offline: Every paper is a free PDF. Bulk access documented at info.arxiv.org/help/bulk_data/index.html; a full-text API at export.arxiv.org
  • Note: Not peer-reviewed. Treat an arXiv-only paper as a claim, not a result — but it is where you will read almost everything first.

ar5iv

  • Docs: ar5iv.labs.arxiv.org
  • SDKs & repos: Renders any arXiv paper as responsive HTML instead of PDF
  • Downloadable / offline: Free; swap arxiv.org/abs/ID for ar5iv.labs.arxiv.org/html/ID
  • Note: Makes papers readable on a phone and searchable in-page. Underused.

alphaXiv

  • Docs: alphaxiv.org
  • SDKs & repos: arXiv papers with a public comment and discussion layer
  • Downloadable / offline: Free
  • Note: Useful when a paper is contested — the discussion often contains the critique you were looking for.

Semantic Scholar

  • Docs: semanticscholar.org
  • Developer / API: api.semanticscholar.org/graph/v1
  • SDKs & repos: 200M+ papers with citation graph, influential-citation scoring and TLDR summaries
  • Downloadable / offline: Free Graph API (semanticscholar.org/product/api), bulk datasets available on request
  • Note: The best free citation graph. ‘Highly influential citations’ is a genuinely useful filter for finding what actually mattered.

OpenAlex

  • Docs: openalex.org
  • Developer / API: api.openalex.org/works
  • SDKs & repos: Fully open catalogue of works, authors, venues and institutions; successor to Microsoft Academic Graph
  • Downloadable / offline: Entirely free API with no key required; complete database snapshots downloadable
  • Note: The only large-scale bibliographic database that is open all the way down, including bulk snapshots.

DBLP

  • Docs: dblp.org
  • Developer / API: dblp.org/faq/13501473.html
  • SDKs & repos: Authoritative CS bibliography — complete author and venue listings
  • Downloadable / offline: Free; full XML dump downloadable
  • Note: The fastest way to find everything a given researcher has published, and to see a conference’s full programme by year.

OpenReview

  • Docs: openreview.net
  • Developer / API: docs.openreview.net
  • Source: github.com/openreview
  • SDKs & repos: ICLR, NeurIPS, COLM and dozens of other venues — papers plus the full review threads
  • Downloadable / offline: Free; REST API
  • Note: Reading the reviews and author rebuttals teaches you how the field evaluates work. Nothing else exposes this.

CORE

  • Docs: core.ac.uk
  • Developer / API: core.ac.uk/services/api
  • SDKs & repos: Aggregates 300M+ open-access papers from repositories worldwide
  • Downloadable / offline: Free API and bulk datasets
  • Note: Good for finding the green open-access copy when a publisher’s version is paywalled.

Unpaywall

  • Docs: unpaywall.org
  • Developer / API: api.unpaywall.org
  • SDKs & repos: Finds legal free copies of paywalled papers via DOI
  • Downloadable / offline: Free API; browser extension
  • Note: Legal, author-deposited copies only. Install the extension and most paywalls simply stop appearing.

Papers We Love

  • Docs: paperswelove.org
  • Source: github.com/papers-we-love/papers-we-love
  • SDKs & repos: A curated, categorised repository of classic CS papers with local meetup talks
  • Downloadable / offline: Repo cloneable; many PDFs mirrored in-repo
  • Note: The best starting point if you do not yet know which papers matter in a subfield.

The Morning Paper (archive)

  • Docs: blog.acolyer.org
  • SDKs & repos: Adrian Colyer’s daily paper summaries, 2014-2021
  • Downloadable / offline: Free archive, still online
  • Note: No longer updated, but the back catalogue of ~1000 summarised papers is one of the great free CS resources.

USENIX Proceedings

  • Docs: usenix.org/publications/proceedings
  • SDKs & repos: OSDI, SOSP (co-published), NSDI, ATC, FAST, Security — the core systems venues
  • Downloadable / offline: Every paper free, immediately, with no membership. Often with recorded talks
  • Note: USENIX made everything open access years before the rest of the field. If a systems paper exists, check here first.

ACM Digital Library

  • Docs: dl.acm.org
  • SDKs & repos: SIGMOD, ASPLOS, PLDI, POPL, SoCC and the ACM journals
  • Downloadable / offline: Partly open: ACM Open and author-paid OA papers are free; others are paywalled
  • Note: 403s to automated clients; loads in a browser. For paywalled items, check arXiv, the author’s homepage or Unpaywall first — the free copy usually exists.

IEEE Xplore

  • Docs: ieeexplore.ieee.org
  • SDKs & repos: ISCA, MICRO, HPCA and the IEEE journals
  • Downloadable / offline: Mostly paywalled; abstracts free
  • Note: Almost always worth searching the author’s page or arXiv instead. Architecture authors in particular post preprints widely.

DROPS / LIPIcs (Dagstuhl)

  • Docs: drops.dagstuhl.de
  • SDKs & repos: ECOOP, ITP, CONCUR, SAT and many theory venues
  • Downloadable / offline: 100% open access, free PDFs, Creative Commons licensed
  • Note: A fully open publisher. Every paper, always free, no exceptions.

arXiv cs.CL (Computation and Language)

ACL Anthology

  • Docs: aclanthology.org
  • Source: github.com/acl-org/acl-anthology
  • SDKs & repos: Every ACL, EMNLP and NAACL paper — the peer-reviewed home of this field
  • Downloadable / offline: 100% open access; full metadata dumps in the repo
  • Note: Prompting results that survived review live here, not on arXiv. Check both.

COLM

  • Docs: colmweb.org
  • SDKs & repos: Conference on Language Modeling — a venue created specifically for LLM research
  • Downloadable / offline: Papers open via OpenReview
  • Note: Newer and more focused than NeurIPS/ICML for this material.

OpenReview

  • Docs: openreview.net
  • Developer / API: docs.openreview.net
  • SDKs & repos: ICLR and COLM submissions with full public review threads
  • Downloadable / offline: Free; API
  • Note: For a contested prompting claim, the reviews are often more useful than the paper.

Papers with Code

  • Docs: paperswithcode.com
  • SDKs & repos: Benchmark leaderboards linked to implementations
  • Downloadable / offline: Free
  • Note: Prompting leaderboards are especially gameable — check the evaluation protocol before trusting a delta.

Hugging Face Papers

  • Docs: huggingface.co/papers
  • SDKs & repos: Daily curated arXiv selection with discussion
  • Downloadable / offline: Free
  • Note: The most practical daily filter.

ML Papers of the Week

Prompting Guide — paper index

  • Docs: promptingguide.ai/papers
  • SDKs & repos: The foundational prompting papers, organised by technique
  • Downloadable / offline: Free
  • Note: The fastest way to find the original paper behind a named technique.

Anthropic Research

  • Docs: anthropic.com/research
  • SDKs & repos: Interpretability, alignment, and model-behaviour work
  • Downloadable / offline: Free

Google DeepMind publications

OpenAI Research

  • Docs: openai.com/research
  • SDKs & repos: Model and method papers
  • Downloadable / offline: Free
  • Note: 403s to automated clients; loads in a browser.

Lil’Log

Education & reference implementations

Two tracks: Basic builds the foundations, Advanced is about reading and extending real implementations. Everything listed is free and publicly accessible.

Basic

22 resources across 6 topics.

Do this first

Learn to measure, early

  • promptfoo — Write assertions, run prompts side by side, see which one wins. Start measuring before your prompts get complicated, not after.
  • OpenAI Cookbook — Runnable notebooks, including evaluation. Code you can execute beats advice you have to trust.
  • Hamel Husain on evals — The clearest practical writing on building evaluation for LLM products. Start with the ‘Your AI Product Needs Evals’ post.
  • What We Learned from a Year of Building with LLMs — Six practitioners, written jointly, no vendor agenda. The most honest overview of what works in production.

The things that make prompts reliable

  • Structured outputs — Constrain output to a JSON Schema instead of asking for JSON. Removes an entire class of failure.
  • Instructor — Pydantic models as the contract, with automatic validation and retry.
  • Chat templating — If you use open-weight models, learn this. Most mysterious failures are template mismatches.
  • LiteLLM — One interface across providers, so you can compare models on the same prompt fairly.

Know the failure modes before you ship

Courses, if you want structure

Finding and reading papers

Advanced

31 resources across 6 topics.

Stop writing prompts by hand

  • DSPy — Declare a signature and a metric; let an optimizer compile the prompt. The most credible path from craft to engineering.
  • DSPy source — Read the optimizers — MIPROv2 and the bootstrap few-shot approaches are the interesting part.
  • BAML — Prompts as typed functions with a compiler and generated clients.
  • Guidance — Control flow interleaved with generation.
  • LMQL — Constraints as language syntax. Research-grade, conceptually clean.

Constrained decoding at the token level

  • Outlines — Regex, JSON Schema and CFG constraints applied during sampling. Invalid output becomes impossible.
  • Outlines source — The finite-state-machine index construction is worth reading on its own.
  • SGLang — RadixAttention plus a frontend language for structured, multi-call programs.
  • JSON Schema — Learn the spec properly. Your schema is now part of your prompt, and loose schemas produce loose output.

Evaluation you can defend

  • Inspect AI — UK AI Safety Institute framework. Solvers, scorers, agent evaluation; built for results that get scrutinised.
  • HELM — Holistic evaluation across accuracy, calibration, robustness and bias rather than one number.
  • lm-evaluation-harness — The de facto standard harness. Read task definitions before trusting cross-paper comparisons.
  • Ragas — Retrieval-specific metrics that actually catch regressions.
  • promptfoo — Put the eval matrix in CI so prompt changes are reviewed like code changes.
  • Langfuse — Self-hostable tracing and prompt versioning, for when data cannot leave your infrastructure.

Adversarial prompting

  • MITRE ATLAS — Structured adversarial taxonomy for AI systems, in ATT&CK’s shape.
  • PyRIT — Automated red-teaming with orchestrators and converters.
  • garak — Probe families covering jailbreaks, leakage, toxicity and encoding attacks.
  • promptfoo red-teaming — Adversarial generation wired into the same harness as your functional evals.
  • OWASP GenAI — Track the project, not just the Top 10 list — the deeper guides are where the substance is.
  • NIST AI RMF — The governance vocabulary your organisation will eventually adopt.

Primary papers worth reading in full

  • Chain-of-Thought Prompting — The paper that started the technique. Short, and the ablations matter more than the headline.
  • Self-Consistency — Sample multiple reasoning paths and take the majority. Simple, and still one of the most reliable gains.
  • ReAct — Interleaving reasoning and acting — the foundation almost every agent framework builds on.
  • Tree of Thoughts — Search over reasoning states. Expensive, instructive about where simple prompting ends.
  • Prompting Guide paper index — Everything else, mapped by technique.

Where the field publishes

  • ACL Anthology — Peer-reviewed, fully open, complete.
  • COLM — A venue built specifically for language-model research.
  • OpenReview — Reviews and rebuttals. For contested results, read these first.
  • arXiv cs.CL — The firehose. Pair with curation.
  • ML Papers of the Week — A weekly curated digest from the DAIR.AI team.

Video courses, channels & talks

10 resources across 2 groups. Every channel and playlist below was fetched and title-verified on 2026-10-09. Handles drift and several plausible-looking handles resolve to the wrong channel, so a 200 response is not proof of identity — the links here were each checked against the channel title.

Channels & conference recordings

  • DeepLearning.AI — Short courses run by Andrew Ng & co.; vendor-leaning, verify against the papers.
  • OpenAI — Model releases and DevDay talks; primary for API and product behaviour.
  • Google DeepMind — Research overviews and model announcements from DeepMind.
  • Hugging Face — The open LLM ecosystem: transformers, datasets, agents, tool calling.
  • LangChain — Framework walkthroughs for agents and RAG; vendor content, verify against the docs.
  • Dave Ebbelaar — Practical LLM and agent app builds, end to end, in Python.
  • Machine Learning Street Talk — Long-form research interviews; useful for context around current papers.
  • Latent Space — Interviews with the people building prompting tooling; trend-aware, verify against papers.
  • TWIML AI Podcast — Long-form applied-AI interviews, including prompt and RAG practice.

Lectures & playlists

Note: This is the fastest-moving index in the book and its video goes stale fastest: check publish dates, and prefer primary model-provider talks over third-party technique videos.

Conference videos, notes & archives

5 resources across 2 groups. Conference recordings are the primary-source tier of video: the speaker is usually an author of the paper, and where a talk exists the proceedings entry is often open at the same link. Every URL here returned 200 on 2026-10-09 unless the note says otherwise.

There is no prompt-engineering conference. What exists is the main ML venues plus vendor dev days, which is why this section is short and the staleness warning is loud.

Conference channels & video archives

  • NeurIPS proceedings — Where prompting research is published; search the year’s papers rather than watching talks.
  • ICLR — Most prompting and in-context-learning work appears here first.
  • ICML — Proceedings portal for the same material.
  • AI Engineer World’s Fair — The closest thing to a dedicated conference for applied LLM and agent work; recordings published by the organisers, vendor-heavy.

Notes, proceedings & paper-adjacent archives

  • Treat vendor dev-day talks as release notes — Anything from a model provider about prompting is a product announcement with a talk attached. Check the date before you rely on it.

If you only do three things

  1. Work through Anthropic’s interactive tutorial. Nine chapters, exercises, solutions. Hands-on beats reading.
  2. Set up promptfoo before your prompts get complicated. Once you can measure, prompt engineering stops being folklore.
  3. Read OWASP’s LLM Top 10 and Simon Willison on prompt injection. Then decide what your system is allowed to touch.

Honest notes

  • Most prompt advice online is untested folklore. The half-life is short and almost none of it is measured. Prefer vendor docs, papers, and your own evals.
  • Reasoning models invert much of the standard advice. “Think step by step” and elaborate few-shot scaffolding can make them worse. Check the model-specific guidance.
  • Constrain output, do not request it. JSON Schema or grammar-constrained decoding eliminates a failure class that no amount of prompt wording will.
  • Evaluation is the whole discipline. A prompt you cannot measure is a guess. This is why the eval section here is longer than the technique section.
  • Prompt injection has no general solution. Treat it as an architecture constraint, not a prompt-wording problem.
  • Chat templates break open-weight models silently. If an open model ignores your system prompt, suspect the template before the prompt.