⚙️Prompt
Prompt engineering is a method for communicating with large language models to steer thier behavior for designed outcomes without updating the model weights. It is an empirical science, and the effcet of prompt engineering methods can vary a lot among models, thus requiring heavy experimentation and heuristics. When working with prompts, you interact with th LLM via an API or directly, and you can configure a few parameters to get different results for your prompts. These parameters include temperature, which affects the randomness of the output, and the version of LLM you use. A poorly crafted prompt only generates a poor response that is half-baked and inaccurate, that's close to hallucination. Using the correct vocabulary to instruct the model in the most concise from is critical to exploit the power of LLMs. Since LLMs are limited by the number of tokens for accepting the input and generating the output, prompts must adhere to the size restrictions imposed by the model.
The more descriptive and detailed the prompt is, the better the results. This is particularly important when you have a desired outcome or style of generation you are seeking. There aren't specific tokens or keywords that lead to better results. It's more important to have a good format and descriptive prompt. In fact, providing examples is very effective to get desired output in specific formats.
When designing prompts, you should also keep in mind the length of the prompt as there are limitations regarding how long the prompt can be.
An example:
Prompt:
Output:
Place: Champalimaud Centre for the Unknown, Lisbon
Last updated