Top_p : Again, using top_p(together with temperature, called a kernel sampling technique), you can control the certainty of the answers returned by the model. If you want factually accurate answers, set the parameter value low. If you want more diverse answers, set the parameter value high.
Generally speaking, it is sufficient to change one of the parameters; there is no need to adjust both at the same time.
Before we look at some basic examples, please note that the final results generated may vary depending on the version of the large language model used.
Basic Concepts
Basic prompt words
You can get a lot of results with a simple prompt, but the venezuela mobile database quality of the results is related to the amount and completeness of the information you provide. Prompts can contain information to pass to the model, such as instructions, questions, etc., or they can contain detailed information such as context, inputs, or examples to better guide the model and get better results.
Prompt word
The sky is
Output
blue.
As shown in the above example, the language model completes the continuation based on the given context "The sky is". However, the output may be unexpected or exceed our requirements.
To achieve more specific goals, we need to provide more background or explanation information, such as:
Prompt word
Output
so beautiful today.
Is the result better? Here we explicitly ask the model to complete the sentence, so the output matches our input exactly. Prompt engineering is the study of how to design the best prompt words to guide the language model to complete the task efficiently.