
Overview
The Text generation block generates text using a Palmyra model. Use it for text completions, summaries, creative writing, and more. You provide a prompt, and the model generates a response based on your instructions. You can control the creativity of the output using the temperature setting, and limit the length with the max output tokens field.Common use cases
- Generating summaries or explanations
- Creative writing such as stories, marketing copy, and abstracts
- Expanding or rewriting text
- Answering questions based on a prompt
How it works
- Prompt: Enter the text or instructions for the model.
- Model: Select the model to use for generation. Learn more about the suite of Palmyra models.
- Temperature: Adjusts randomness and creativity. A higher temperature value like 0.7-1.0 makes the output more creative, while a lower temperature value like 0.0-0.3 makes it more deterministic.
- Max output tokens: Sets the maximum length of the generated text.
Examples
Content creation workflow
This example shows a marketing workflow where user input is transformed into professional marketing copy. Blueprint Flow:- UI Trigger → Marketing team submits product details through form
- Text generation → Creates product description based on input
- Set state → Stores generated content for review and approval in the interface
- Prompt: “Create a compelling product description for a @ that highlights its @. Target audience: @. Tone: professional but approachable.”
- Model:
palmyra-x5
- Temperature:
0.7

Customer support response system
This example demonstrates an automated support system that generates personalized responses based on customer inquiries. Blueprint Flow:- UI Trigger → Customer submits support ticket
- Classification → Categorizes the issue type
- Text generation → Creates personalized response based on category
- Set state → Stores response for customer to display in the interface
- Prompt: “Generate a helpful and empathetic response for a customer unable to log into their @. Address common login troubleshooting steps like password reset, browser cache clearing, and two-factor authentication issues. Include links to our password reset tool and support documentation. If these steps don’t resolve the issue, provide instructions for escalating to our technical support team.”
- Model:
palmyra-x5
- Temperature:
0.4

Fields
Name | Type | Control | Default | Description | Options | Validation |
---|---|---|---|---|---|---|
Prompt | Text | Textarea | - | - | - | - |
Model | Model Id | - | palmyra-x5 | - | - | - |
Temperature | Number | - | 0.7 | - | - | Range: 0 to 1 |
Max output tokens | Number | - | 1024 | - | - | Range: 1 to 16384 |
End states
Below are the possible end states of the block call.Name | Field | Type | Description |
---|---|---|---|
Success | - | success | If the function doesn’t raise an Exception. |
Error | - | error | If the function raises an Exception. |
@{result}
.