This avoids building a long fixed sequence of "Ask a question" nodes and makes the conversation more natural because the agent can reuse information the user has already provided.
kind: AdaptiveDialog
inputs:
- kind: AutomaticTaskInput
propertyName: Department
description: The department that the purchase relates to, for example Finance, HR, or IT. Use the department already mentioned by the user if available.
shouldPromptUser: true
- kind: AutomaticTaskInput
propertyName: PurchaseType
description: The type of purchase the user is asking about, for example Software, Consulting, Equipment, or another purchase category. Use the purchase type already mentioned by the user if available.
shouldPromptUser: true
- kind: AutomaticTaskInput
propertyName: Amount
description: The purchase amount in CHF. Use the amount already mentioned by the user if available.
shouldPromptUser: true
modelDescription: |
Use this topic when the user asks about purchase approvals,
purchase approval requirements, approval thresholds,
or who needs to approve a purchase.
The correct answer may depend on the department,
purchase type, and purchase amount.
Use information already provided by the user whenever possible.
Ask only for missing information that is necessary to determine
the correct approval requirements.
beginDialog:
kind: OnRecognizedIntent
id: main
intent: {}
actions:
- kind: SearchAndSummarizeContent
id: npDxmT
userInput: "=Concatenate(\"Find the applicable purchase approval requirements. Department: \", Topic.Department, \". Purchase type: \", Topic.PurchaseType, \". Amount: \", Text(Topic.Amount), \" CHF.\")"
inputType:
properties:
Amount:
displayName: Amount
description: The purchase amount in CHF. Use the amount already mentioned by the user if available.
type: Number
Department:
displayName: Department
description: The department that the purchase relates to, for example Finance, HR, or IT. Use the department already mentioned by the user if available.
type: String
PurchaseType:
displayName: Purchase Type
description: The type of purchase, for example Software, Consulting, Equipment, or another purchase category. Use the purchase type already mentioned by the user if available.
type: String
outputType: {}