'Prompt Engineering for ChatGPT' course note: Part 2 What are Prompts
What are prompts
- A prompt is a cue, a reminder to let LLVM remember something to say.
- A prompt can influence not only the current question, but also the future responses.
- Example: "From now on, when I ask a question, suggest a better version of my question and ask me if I would like to use it."
- You can provide additional info to help LLM analysis.
- Example: For ChatGPT 3.5 not knowing online info, provide new articles for it to parse answer.
Intuitions behind prompts
Based on training data and prompts, LLM predict the next word continuously.
- A strong pattern in training data can be a trap. We need to add specific words to escape or get into a trap.
- For example, "Mary has a little" is almost certainly to be followed by "lamb". If we don't want go into this trap, we can add word to skip it, like "Mary has a little microscopic".
- The prompt can provide pattern for output. It prompts LLVM to follow the pattern.
- For example:
Recommend 10 books:
--------------------
Title: <Title>
Author: <Author>
Summary: <Summary>
Everyone can program with prompts
Given LLM a rule to follow, it can generate output following the pattern.
For example: Generate examples in the requested CSV format (NAME, AUTHOR, SUMMARY).
Comments
Post a Comment