LLM Reasoning Block
Generate text using a reasoning model
The LLM Reasoning block integrates reasoning models into Scout workflows, enabling dynamic text generation with enhanced reasoning capabilities.
Configuration
Select the reasoning model to use for generating text. The default model is o1
. Available models include:
- deepseek-r1
- o1
- o1-mini
- o1-preview
The format of the response. The default is text
. Options include:
- text: For plain text outputs.
- json_object: For structured JSON outputs.
Reducing reasoning effort can result in faster responses and fewer tokens used. The default value is low
. Options include:
- low
- medium
- high
Upper bound for number of tokens to generate. This includes the visible output tokens and reasoning tokens. The default value is 5000
, with a minimum of 1000
.
Messages to be sent to the model. This input supports Jinja templating for dynamic message construction.
Each message is defined with a role
(such as system
, user
, or assistant
) and content
.
Below are examples of how to structure the input:
Example 1: Basic Chat Interaction
This is a simple conversation where the user asks a question.Example 2: Using Jinja Templating for Dynamic Inputs
This example demonstrates how you can use variables to create dynamic prompts. The model will receive the final rendered text after Jinja processes the template.Example 3: List of Messages Basic Multi-Step Conversation
This example shows multiple back-and-forth messages, which can be passed intoList of Messages
to build on context of a conversation. Notice how the conversation context builds on each message, which can make subsequent responses from the LLM more relevant and refined:List of Messages Example
Outputs
The block outputs generated text or a JSON object based on the selected response format, along with detailed token usage information.
Usage Context
Use this block to integrate AI-generated text with reasoning capabilities into your workflow. It is particularly useful for tasks that require complex reasoning and decision-making processes, enhancing the workflow’s ability to handle nuanced and context-sensitive scenarios.
Best Practices
- Select the appropriate model for your use case to balance accuracy and performance. Different models may offer varying levels of reasoning capabilities and efficiency.
- Adjust reasoning effort to optimize for speed and token usage. Lower reasoning effort can lead to faster responses but may reduce the depth of reasoning.
- Ensure that prompt items are well-structured and clear to achieve the desired output. Clear and concise prompts help the model generate more accurate and relevant responses.