responses that are defined in the domain, but
are not part of any flow. This can be helpful for handling chitchat, contextual
questions, and high-stakes topics, effectively. To enhance its performance and tailor
it to meet specific requirements, you can customize the policy’s prompt and
add example conversations.
Adding the Intentless Policy to your bot
To addIntentlessPolicy to your bot, add it to your config.yml:
- Rasa Pro <=3.7.x
- Rasa Pro >=3.8.x
config.yml
Customizing the Prompt Template
You can change the prompt template used to generate a response by setting theprompt property in the config.yml:
- Rasa Pro <=3.7.x
- Rasa Pro >=3.8.x
config.yml
conversations: A list of example conversations between a user and the AI that are fetched from the stories.current_conversation: The current conversation with the user.responses: A list of example responses that the assistant can send.
Steering the Intentless Policy
The Intentless Policy can often choose the correct response in a zero-shot fashion. That is, without providing any example conversations to the LLM. However, you can improve the performance of the policy by adding example conversations. To do this, add end-to-end stories todata/e2e_stories.yml to your training data.
These conversations will be used as examples to help the Intentless Policy learn.
data/e2e_stories.yml
Chitchat
In an enterprise setting it may not be appropriate to use a purely generative model to handle chitchat. Teams want to ensure that the assistant is always on-brand and on-message. Using the Intentless Policy, you can define vetted, human-authoredresponses
that your assistant can send.
Because the Intentless Policy leverages LLMs and considers the whole context of the conversation
when selecting an appropriate response, it is much more powerful
than simply predicting an intent and triggering a fixed response to it.
High-stakes Topics
For dealing with high-stakes topics, the Intentless Policy serves as a robust alternative to the Enterprise Search Policy. For example, if users have questions about policies, legal terms, or guarantees, like: “My situation is X, I need Y. Is that covered by my policy?” In these cases the EnterpriseSearchPolicy’s RAG approach is risky. Even with the relevant content present in the prompt, a RAG approach allows an LLM to make interpretations of documents. Even with the relevant content present in the prompt, a RAG approach allows an LLM to make interpretations of documents. The answer users get will vary depending on the exact phrasing of their question, and may change when the underlying model changes. For high-stakes topics, it is safest to send a self-contained, vetted answer rather than relying on a generative model. The Intentless Policy provides that capability in a CALM assistant. Note that conversation design is crucial in these cases, as you want your responses to be self-contained and unambiguous rather than just “yes” or “no”.Enabling the Intentless Policy
In Rasa, knowledge-based questions are directed to the defaultpattern_search flow.
By default it responds with utter_no_knowledge_base which denies the request.
However, you can customize it to initiate the action_trigger_chitchat
that triggers the Intentless Policy.
flows.yml
When overwriting
pattern_search, you can choose either the Intentless Policy or the
Enterprise Search Policy for handling knowledge-based questions. Both policies
cannot be active simultaneously.Interjections
When a flow reaches acollect step and your assistant asks the user for information,
your user might ask a clarifying question, refuse to answer, or otherwise interject in
the continuation of the flow.
In these cases, the Intentless Policy can contextually select appropriate responses,
while afterwards allowing the flow to continue.