Esta página se muestra en inglés. Una traducción al español está en curso.
PromptsApr 1, 2026·2 min de lectura

Prompt Engineering Techniques — 20+ Methods

Comprehensive prompt engineering collection with 20+ techniques. 7.3K+ stars. Chain-of-Thought, ReAct, Tree-of-Thought, runnable notebooks.

Introducción

This is a curated collection of 20+ prompt engineering techniques, each with explanations, templates, and runnable Jupyter notebooks. Covers:

Foundational:

  • Zero-Shot Prompting — No examples needed, just clear instructions
  • Few-Shot Prompting — Provide examples for the model to follow
  • Chain-of-Thought (CoT) — Step-by-step reasoning
  • Role Prompting — Assign an expert persona

Intermediate:

  • ReAct — Combine reasoning with tool use
  • Self-Consistency — Multiple reasoning paths, majority vote
  • Tree-of-Thought — Explore multiple solution branches
  • Least-to-Most — Break complex problems into sub-problems

Advanced:

  • Constitutional AI Prompting — Self-critique and revision
  • Meta-Prompting — Prompts that generate prompts
  • Automatic Prompt Engineering (APE) — Let the model optimize its own prompts
  • Prompt Chaining — Sequential prompts where output feeds input
  • Skeleton-of-Thought — Generate outline first, then fill in details

Each technique includes: concept explanation, when to use it, template, Python notebook, and real-world examples.

FAQ

Q: Which technique should I start with? A: Chain-of-Thought for reasoning tasks, Few-Shot for format-sensitive tasks, ReAct for tasks requiring external tool use.

Q: Do these work with all LLMs? A: Yes. These are model-agnostic techniques. They work with GPT-4, Claude, Gemini, Llama, Mistral, and any instruction-following LLM.

Q: Can I use these in production? A: Absolutely. Each technique is production-tested. The notebooks include evaluation metrics so you can measure effectiveness.

Works With

  • Any LLM: Claude, GPT-4, Gemini, Llama, Mistral
  • Claude Code, Cursor, Codex (for coding-specific prompts)
  • LangChain, LlamaIndex (for chained prompts)
  • Jupyter Notebook (runnable examples)
🙏

Fuente y agradecimientos

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.