Prompt Engineering - urcuqui/Data-Science GitHub Wiki

Introduction

"Prompting" is the activity of giving introductions to AI to perform a task. There are some parameters that you can configure to get different results, these are:

  • Temperature - In short, the lower the temperature the more deterministic the results in the sense that the highest probable next token. Increasing the temperature could lead to more randomness encouraging more diverse or creative results.
  • Top_p - a sampling technique with temperature, controls how deterministic the model is at generating a response.

The idea is to alter one and not both.

Elements of a Prompt

  • Instruction - a specific task or instruction you want the model to perform
  • Context - can involve external information or additional context that can steer the model to better responses
  • Input Data -
  • Output Indicator - indicates the type or format of the output

Instructions are placed at the begging of the prompt, and it is also recommended adding clear separators like "###"

The Elavis Saravia framework and the CRISPE framework are two popular prompt frameworks that can be used to improve the results of your prompts. By following these frameworks, you can ensure that your prompts are clear, informative, and effective.

### Instruction ###

Translate the next blow to Spanish:

Text: "hello!"

A tip when designing prompts is to avoid saying what not to do but say what to do instead.

References