Skip to content

lathashree01/prompt-engineering-guides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

Info on Prompt Engineering

Prompt engineering is the process of structuring or crafting an instruction to produce the best possible output from a generative artificial intelligence (AI) model. A prompt is a natural language description of a task for an AI. In the case of a text-to-text language model, a prompt can take the form of a query, a command, or a more extended statement that includes context, instructions, and previous conversation details. Prompt engineering can include crafting a query, defining a specific style, choosing appropriate words and grammar, supplying relevant context, or outlining a character for the AI to emulate.

When communicating with a text-to-image or a text-to-audio model, a typical prompt is a description of a desired output such as "a high-quality photo of an astronaut riding a horse" or "Lo-fi slow BPM electro chill with organic samples".Prompting a text-to-image model may involve adding, removing, emphasizing, and re-ordering words to achieve a desired subject, style, layout, lighting, and aesthetic.

Prompt Engineering Guides

Curated prompt engineering guides for LLMs

  • OpenAI prompt engineering - strategies and tactics for getting better results from LLMs \

  • DAIR.AI prompt engineering guide (LLM setting) - Extremely comprehensive guide with an explanation of various techniques, models, and applications based on prompting \

  • Prompts Lab - Awesome prompt engineering guide - A github repository containing guides to Prompt engineering

  • Video by Anthropic on Prompt Engineering

    Anthropic's prompt engineering experts—Amanda Askell (Alignment Finetuning), Alex Albert (Developer Relations), David Hershey (Applied AI), and Zack Witten (Prompt Engineering)—reflect on how prompt engineering has evolved, practical tips, and thoughts on how prompting might change as AI capabilities grow.

    Key topics covered with timestamps:

    • 6:34 What makes a good prompt engineer
    • 12:17 Refining prompts
    • 24:27 Honesty, personas and metaphors in prompts
    • 37:12 Model reasoning
    • 45:18 Enterprise vs research vs general chat prompts
    • 50:52 Tips to improve prompting skills
    • 53:56 Jailbreaking
    • 56:51 Evolution of prompt engineering
    • 1:04:34 Future of prompt engineering
  • Prompt engineering overview by Anthropic

  • Google's guide for Prompt engineering -

  • Microsoft's Guide to Prompt Engineering

    This article from Microsoft provides an overview of prompt engineering techniques for use with GPT models. Key sections include:

    • Basics: Introduces the fundamental concepts and components of GPT prompts, such as instructions, primary content, examples, cues, and supporting content.
    • Scenario-Specific Guidance: Discusses how prompt engineering differs between the Chat Completion API and the Completion API, highlighting the importance of formatting input data correctly.
    • Few-Shot Learning: Explains how to adapt language models to new tasks by providing training examples within the prompt.
    • Non-Chat Scenarios: Demonstrates how the Chat Completion API can be used for tasks beyond conversations, such as sentiment analysis.
    • Start with Clear Instructions: Emphasizes the importance of providing clear and specific instructions to guide the model's behavior.
    • Repeat Instructions at the End: Suggests reinforcing instructions by repeating them at the end of the prompt.
    • Prime the Output: Recommends providing cues to direct the model towards the desired output.
    • Add Clear Syntax: Highlights the value of using clear syntax to structure the prompt and make it easier for the model to understand.
    • Break the Task Down: Suggests breaking down complex tasks into smaller, more manageable steps.
    • Use of Affordances: Encourages the use of affordances to guide the model's responses.
    • Chain of Thought Prompting: Introduces a technique that involves prompting the model to think step by step to improve reasoning.
    • Specifying the Output Structure: Advises specifying the desired output format to ensure the model generates structured and predictable results.
    • Temperature and Top_p Parameters: Briefly touches on the role of temperature and Top_p parameters in controlling the randomness and diversity of the generated output.
    • Provide Grounding Context: Stresses the importance of providing the model with relevant context to improve the accuracy and coherence of its responses.
    • Best Practices: Outlines general best practices for prompt engineering.
    • Space Efficiency: Considers space efficiency in prompt design.

Courses on Prompt engineering

  • Introduction to Prompt Engineering by Learn Prompting - Paid
    Learn how to craft effective prompts. This comprehensive course teaches you the fundamentals of prompt engineering to enhance productivity, creativity, and problem-solving using advanced AI tools.

  • Advanced Prompt engineering by Learn Prompting - Paid
    Learn to craft complex prompts that drive sophisticated AI applications with our Advanced Prompt Engineering course. Master essential techniques like chain-of-thought prompting and others!

Releases

No releases published

Packages

No packages published