SeanPlusPlus / prompt-engineering

https://twitter.com/andrewyng/status/1651605660382134274?s=46

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prompt Engineering for Devs

https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/

1. Intro

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/1/introduction

  • Fine tuned instructions
  • RLHF: Reinforcement Learning with Human Feedback
  • More widely used than Base LLMs

2. Guidelines

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/2/guidelines

  • Use delimiters
  • Ask for structured output
  • Provide concrete steps for the model to follow

https://twitter.com/SeanPlusPlus/status/1653842628067328000


3. Iterative

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/3/iterative

  • Build up prompts to get to a desired output

iter


4. Summarize

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/4/summarizing

  • If you have a site with many reviews, super useful to ask LLM to summarize

5. Inferring

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/5/inferring

  • Useful tools for sentiment analysis

6. Transforming

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/6/transforming

  • Translating languages super straightforward
  • Can also translate tone (slang to formal business)
  • Format (JSON to HTML)
  • Spellcheck and Grammar check
  • Just ask it to use APA as well
  • Can redline text and as well!

transform


7. Expanding

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/7/expanding

  • Degree of randomness of model
  • Temperature allows us to change variety of responses

temp


8. Chatbot

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/8/chatbot

  • Each interaction with a large language model is a standalon interaction
  • You need to pass the entire body of previous parts of a conversation to "simulate" that a conversation is ongoing
  • Also can program roles
  • System, Assistant, User ... 3 roles
  • As a dev, we can set the System message to "whisper in the ear" of the Assistant

assistnat

About

https://twitter.com/andrewyng/status/1651605660382134274?s=46


Languages

Language:Jupyter Notebook 98.4%Language:Python 1.6%