Icon

1.4 - LLM Temperature

You can easily download and run the workflow directly in your KNIME installation. We recommend that you use the latest version of the KNIME Analytics Platform for optimal performance.

The workflows requires an OpenAI API key to run. If you don't have one yet, register with OpenAI and create a new API key under https://platform.openai.com/account/api-keys.

We use text-ada-001 in all examples with LLMs for cost saving.
Consider that using a better model over text-ada-001 significantly increases costs.

More information can be found at https://platform.openai.com/docs/models/gpt-3.

What is temperature?

In the context of language models like GPT-3 (which is an example of a large language model), temperature is a parameter that affects the randomness and creativity of the model's output. When generating text, the temperature determines how much the model prioritizes high-probability words and how much it explores less likely options.

A higher temperature, such as 1.0, makes the model more random and creative. It increases the likelihood of generating diverse and unexpected responses. On the other hand, a lower temperature, such as 0.5, makes the model more focused and conservative, favoring more probable and safe responses.

URL: OpenAI API Keys https://platform.openai.com/account/api-keys
URL: Model Documentation https://platform.openai.com/docs/models

Explore the effect of temperature on OpenAI LLMs

  • This workflow shows the effect that temperature has on the model's outputs.

  • The workflow requires an OpenAI API key to run.

  • To learn more about the workflow, click the left bar and check the description section.


In a world far, far away
Table Creator
Authenticate withAPI key
OpenAI Authenticator
Loop End
Loop 10 times
Counting Loop Start
LLM Prompter
Constant Value Column
Changing model temperature via flow variable.Right-click the node >"Configure flow variables"
OpenAI LLM Connector
OpenAIAPI Key
Credentials Configuration
Math Formula (Variable)
To open the view, hover over the node and click the lens icon.
Table View

Nodes

Extensions

Links