Version: Latest

Flow Builder — System flows

In an ideal conversation, known as the "happy path," the assistant asks for information, and the user provides the correct response, allowing the conversation to flow smoothly. But in reality, conversations don’t always follow that perfect path. This is where system flows, also called patterns, come in.

System flows are pre-built flows available out of the box, designed to handle conversations that go off track. For example, they help when:

  • The assistant asks for information (like an amount of money), but the user responds with something else.
  • The user interrupts the current flow and changes the topic.
  • The user changes their mind about something they said earlier.

System flows can be found in the System flows tab of the Flows page.

image
Customizing system flows to fit your business needs

The default version of system flows is always included in your assistant model out of the box. While you can't disable them—since they are essential for the smooth functioning of your assistant—you can fully customize them to fit your specific business needs and conversation design best practices.

Complete list of system flows

There are 14 system flows in total:

  1. pattern_chitchat — Handles off-topic interactions that don’t disrupt the main conversation.
  2. pattern_clarification — Manages ambiguous requests that could match multiple flows.
  3. pattern_correction — Handles user input changes or corrections to previous errors.
  4. pattern_human_handoff — Switches users to a human agent when their request can't be handled by the assistant.
  5. pattern_internal_error — Informs users about internal errors within the assistant.
  6. pattern_cancel_flow — Triggers when a flow is canceled by the user.
  7. pattern_code_change — Cleans the stack after an assistant update.
  8. pattern_skip_question — Manages user intents to skip questions or steps in a flow.
  9. pattern_continue_interrupted — Handles situations where users switch between different flows mid-conversation.
  10. pattern_cannot_handle — Addresses scenarios where command generation fails.
  11. pattern_session_start — Initiates the conversation and starts the session.
  12. pattern_search — Handles knowledge-based questions and searches.
  13. pattern_completed — Asks if the user needs further assistance after completing their task or abandoning the chat.
  14. pattern_restart — Restarts the conversation and session.

Learn more about system flow types and popular modifications

Modifying system flows

Let’s modify a system flow using the example of pattern_completed—a flow that asks if the user needs more help after achieving their goals or abandoning the conversation.

  1. By default, this flow consists of only one step—a message asking, "What else can I help you with?"

    image
  2. If we want the assistant to ask a different question depending on which flow the pattern follows, we can add a Logic branch before the message.

    image
  3. In the first logic condition, we can select the context "previous flow name" and specify that the previous flow shouldn’t be the one that greets the user. If the user has completed their task in any other flow, the default "What else can I help you with?" message is appropriate, so let's keep it as is.

    imageimage
  4. For the Else branch, we can add a more relevant message for a first interaction, such as "What can I help you with?"

    image
  5. After customizing a system flow, make sure to re-train your assistant and test the result on the Try your assistant page.

Modifying system flow primitives

If the system flow uses default primitives (actions, messages, slots, etc.) that need to be modified, you can create new ones and simply replace the steps in the flow diagram.

Resetting to default

After customizing a system flow, you will see the "Customized" label next to it. If you want to cancel your updates and reset a system flow to its default configuration, simply hover over it in the table and click the "Reset to default" button.

image

Enabling Enterprise search policy via pattern_search

You can enable the Enterprise search policy in Studio and integrate knowledge base document search by modifying assistant configuration and pattern_search.

  1. Log in with a developer role to access Assistant configuration.

    image
  2. Go to the "System flows" tab and open pattern_search to modify it.

    image
  3. Delete the message and add the custom action step instead. In the right panel, select the action named action_trigger_search.

    image
  4. Go to the Assistant settings page to modify the configuration.

    image
  5. In the config.yml field, add Enterprise Search Policy and specify the type of your vector store.

    image
  6. In the endpoints.yml, set up the connection to your vector store. Click "Save".

    image
  7. Train your assistant and test it on the Try your assistant page. You will be able to see the answers generated by the Enterprise search.