Prompt engineering

LLMOps Concepts

Max Knobbout, PhD

Applied Scientist, Uber

LLM lifecyle: Prompt engineering

Overview of the LLM application lifecycle phases

LLMOps Concepts

The development cycle

An initial overview of the development cycle, which will be refined in the course of this chapter

LLMOps Concepts

Why is prompt engineering important?

 

A playful cartoon teaching about prompts

 

 

  • Improve performance
  • Control over output
  • Avoid bias and hallucinations
LLMOps Concepts

Elements of a prompt

 

 

  1. Instruction
  2. Examples / Context
  3. Input data
  4. Output indicator

Example of a prompt showing an instruction, examples, input and output

LLMOps Concepts

Finding the perfect prompt

 

 

Picture of two cartoon characters playing on a playground

 

Experiment with:

  • LLM settings, such as temperature, or max tokens
  • In-context learning and other prompt design patterns

 

Use a playground for experimentation!

LLMOps Concepts

Prompt management

 

 

A playful cartoon character filing prompts in an archive box

  • Crucial for efficiency, reproducibility, and collaboration
  • Important to track:
    • Prompt
    • Output
    • Model and settings
  • Use prompt manager or version control
  • Begin generating a collection of good input-output pairs for evaluation
LLMOps Concepts

Prompt templates for reusability

Image of a prompt on the left, and a prompt template on the right, highlighting the difference between the two

LLMOps Concepts

The development cycle

An initial overview of the development cycle, which will be refined in the course of this chapter

LLMOps Concepts

The development cycle

Development cycle where we have added the activity of prompt engineering

LLMOps Concepts

Let's practice!

LLMOps Concepts

Preparing Video For Download...