@{result}
Click the Build an agent button
Create a new agent
Return to the Agent Builder interface
Click the Preview tab
Copy and paste the example customer review
Click Draft response
Inspect the agent's blueprint
UI Trigger
Set state to show the progress message
progress_message
value for the agent state to show that it is generating a response.Classification
Packaging
, Pricing
, Quality
, Delivery
, or Empty
.The agent determined the review fit into the Quality
category. Classification blocks are built-in blocks that use a Palmyra model to classify the input based on a set of user-defined categories.Text generation
Set state for the response
@{result}
environment variable so it could use it in the UI.Set state to clear the progress message
progress_message
value in the state to remove the loading message from the UI.I like the style but it's a lot more expensive than other brands without any difference in quality.
Click Draft response, and navigate back to the Blueprint view. You’ll see that the agent took a different path through the blueprint, this time selecting the Pricing
category and drafting a response using a pricing-related prompt.
review_response
state variable.
UI Trigger
Customer review input
customer_review
state variable. The blueprint uses this value in the Classification block.Progress message
progress_message
state variable to the user. The blueprint sets this value after the user clicks Generate response.Review response
review_response
state variable.review_response
contains a value, the section that had the message “The response will be shown here” disappears.review_response
.Clear progress message
progress_message
state variable to an empty string to clear the loading message from the UI.@{result}
variable. Once the text generation block has finished, it passes its result to the next block in the blueprint, which is the Set state block. The Set state block sets the review_response
state variable with the @{result}
from the text generation block.
Learn more about all available variables in Using Data from Previous Blocks.
Open the Classification block
Add a new category
Sizing
with the value:Add a new text generation block
Command + c
(on Mac) or Ctrl + c
(on Windows) to copy the block.Command + v
(on Mac) or Ctrl + v
(on Windows) to paste the block.Edit the new text generation block
Draft sizing response
Connect the new text generation block to the rest of the blueprint
Add a new Select input component
Discount %
0
, 5
, 10
, 15
(the keys and values should be the same)discount
Move the component above the Draft response button
Edit the Draft packaging response text generation block
discount
state variable and add a discount to the response if there is one. For example, add the following to the prompt: