Prompt parameters
There are numerous parameters that are common among most LLMs, but we are going to discuss a small subset that is most likely to have an impact on your RAG efforts: temperature, top-p, and seed.
Temperature
If you think of your output as a string of tokens, an LLM, in a basic sense, is predicting the next word (or token) based on the data you’ve provided and the previous tokens it has already generated. The next word that the LLM predicts is a product of a probability distribution representing all potential words and their probabilities.
In many cases, the probability of certain words is going to be much higher than most others, but there is still a probabilistic chance that the LLM selects one of the less likely words. Temperature is the setting that dictates how likely it is for the model to choose a word further down the probability distribution. In other words, this allows you to use temperature to set the degree of randomness of the model’...