Version: Latest

Writing Flow Descriptions in CALM

Writing clear flow descriptions is critical in Rasa Pro CALM (Conversational AI with Language Models) approach. Concise and precise descriptions help large language models (LLMs) identify and execute the correct flows, ensuring smooth and accurate conversations.

Flow descriptions are key to making CALM reliable and efficient, reducing errors in flow selection while creating better conversational experiences. This guide explains how to write effective flow descriptions that maximize performance.

How to Write Flow Descriptions

Focus on User Intent

Write descriptions based on what the user is trying to achieve, not on technical implementation details. A good flow description captures the user’s goal clearly, making it easier for the LLM to match user inputs to the appropriate flow.

Example:
Update contact details like phone, email, or mailing address.

Avoid Redundancy

Avoid generic phrases like “This flow is about…” or “Guides users through…” as these add no value and create ambiguity across flows. Focus on unique and specific keywords while avoiding unnecessary filler text.

Be Concise but Informative

Descriptions should be brief but packed with context. Avoid overly detailed narratives while ensuring that the intent and key actions are clear.

Optimal Length: A single sentence or two summarizing the intent and main actions.

Adapt for Complexity

For flows with high overlap or multiple triggers, incorporate indirect cues, such as user states or related actions. However, prioritize simplicity in default descriptions.

Consistency Matters

Maintain consistent terminology across flow descriptions. For example, if “user” is the standard term in your prompt templates, do not switch to “customer.” Consistency improves clarity and reinforces the LLM understanding.

Descriptions Are Not Final

Flow descriptions are dynamic and should evolve based on real-world interactions. In a Conversation-Driven Development (CDD) workflow, analytics or user feedback may highlight issues with flow retrieval. If flows are being skipped, misaligned, or triggered incorrectly, refine the description to resolve the issue.

Example Problem: A “change contact information” flow is triggered instead of a “forgot password” flow due to vague or overlapping descriptions.
Solution: Adjust the description to emphasize unique user intent or context.

Revised Description:
Reset your account password by verifying your email or phone. Triggered when users mention login issues.

Example Comparison

  • Less Effective: Guide users to update and confirm contact details.
  • Effective: Update contact details like phone, email, or mailing address.

Conclusion

Writing effective flow descriptions in CALM ensures LLMs perform optimally by reducing flow selection errors and enabling seamless conversations. By focusing on user intent, eliminating redundancy, and maintaining clarity, your assistant becomes more efficient and user-friendly. Flow descriptions should be reviewed and refined regularly as part of your iterative CDD process to adapt to evolving user needs.