prompt-tuning-playbook  by varungodbole

Prompt engineering guide for post-trained LLMs

created 9 months ago
889 stars

Top 41.5% on sourcepulse

GitHubView on GitHub
Project Summary

This document provides a playbook for effectively prompting post-trained Large Language Models (LLMs), targeting anyone seeking to improve their LLM interaction skills. It offers mental models for understanding LLM behavior and practical techniques for prompt tuning, aiming to demystify the empirical nature of prompt engineering.

How It Works

The playbook frames LLM behavior through the "cinematic universe" metaphor, where pre-training exposes models to a vast corpus approximating all human cultural narratives. Post-training then guides the LLM to adopt a default "universe" and role, such as following instructions or adhering to safety guidelines. Prompting involves providing context to steer the LLM within its learned "universe," with effective prompts acting as clear, concise instructions for a hypothetical, competent human rater.

Highlighted Details

  • Focuses on post-trained Gemini models, with potential generalization to others.
  • Emphasizes clear, concise, and positive instructions, preferring zero-shot over few-shot examples.
  • Suggests an iterative process for prompt development, akin to hyperparameter tuning, involving overfitting to examples and refining instructions.
  • Recommends using Markdown for prompt organization and treating prompts as code for maintainability.

Maintenance & Community

This is a personal collection of observations and best practices from researchers and engineers, not an official position of any team. The authors intend to update it on a best-effort basis as new knowledge emerges.

Licensing & Compatibility

The repository itself does not specify a license. The content is presented as a guide for interacting with LLMs, particularly Gemini.

Limitations & Caveats

The playbook acknowledges that prompt engineering is empirical and rapidly evolving, with specific prescriptions likely to become outdated. It also notes that prompts can be tightly coupled to specific model checkpoints, and achieving deterministic behavior from LLMs is impossible.

Health Check
Last commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
25 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.