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:
- OpenAI o3-mini
- OpenAI o1
- OpenAI o1-mini
- OpenAI o1-preview
- DeepSeek R1
- Gemini 2.5 Pro Preview 03-25
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
and you can see the purpose of each role below:
- System - This role supplies the overarching instructions and policies that guide how the assistant should respond, setting the tone, style, and boundaries of the conversation.
- User - This is the role that represents the end-user’s inputs, questions, or prompts, serving as the catalyst for the conversation.
- Assistant - This role is responsible for generating responses based on both the system’s guidelines and the user’s input, aiming to be helpful, context-aware, and accurate.
- Messages - These are the individual dialogue entries exchanged between the system, user, and assistant, collectively forming the conversation’s context and history. Be careful to prune long chat histories, as this can increase token counts pretty quickly.
System & User - Using Jinja Templating for Dynamic Inputs
This example demonstrates how you can use variables from other blocks to create dynamic prompts. The model will receive the final rendered text after Jinja processes the template.Using Messages to share chat history with the LLM
This example shows multiple back-and-forth messages, which can be passed intoMessages
to build on context of a conversation, 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.