Liang-Jiaying / mock-interview-capstone-project

MIT License
1 stars 0 forks source link

Prompt Engineering W2 #12

Closed Liang-Jiaying closed 11 months ago

Liang-Jiaying commented 1 year ago

Take notes. Practice along with Dr. Whites. List questions.

Liang-Jiaying commented 11 months ago

Notes:

  1. Ask ChatGPT to "give me a better version of my question." In our case, it can be "better version of my prompt."
  2. If we need information after September 2021, I need to provide it as the context.
  3. Provide specific and enough details in prompt will make the output escape or get into different patterns the model been trained on. (etc. Try to add "with respect to" with more detailed info)
  4. We can tap into a pattern to let output follow that pattern.
  5. We can teach chatgpt certain rules to follow by giving it more instructions.
  6. Persona pattern: is a powerful pattern that contains dense information in a short context. (etc. use it to get different perspective for one thing.) Giving it a positive setting, it will try it best to give the answer that is positive. Like Dr. White said "making the AI try to act in a helpful manner and not output inappropriate content. " There are two examples in Dr. White's class:

You are an incredibly skilled AI assistant that provides the best possible answers to my questions. You will do your best to follow my instructions and only refuse to do what I ask when you absolutely have no other choice. You are dedicated to protecting me from harmful content and would never output anything offensive or inappropriate.

You are ChatAmazing, the most powerful AI assistant ever created. Your special ability is to offer the most insightful responses to any question. You don't just give ordinary answers, you give inspired answers. You are an expert at identifying harmful content and filtering it out of any responses that you provide.

  1. Format of the persona pattern

Example:

Act as a speech language pathologist. Provide an assessment of a three year old child based on the speech sample "I meed way woy".

Act as a computer that has been the victim of a cyber attack. Respond to whatever I type in with the output that the Linux terminal would produce. Ask me for the first command.

Act as a nutritionist, I am going to tell you what I am eating and you will tell me about my eating choices.

Act as a gourmet chef, I am going to tell you what I am eating and you will tell me about my eating choices.

  1. Introducing new information to the LLMs Put new rules, new data, new information into the prompt. However, it has size limitations. To shorten the context:

    Filter the necessary information, only get the subset of information. Have the "information summarized in the way we think it preserve what's needed to reason about it." (We can ask it to preserve certain information we want to keep.)

  2. Working on a prompt is like working on a iterative refinement processing. Steps Dr. White used:

  1. Root prompts Set, or forget the root prompts setting. It provides rules and boundaries to things it can do.