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

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

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 suit your specific business needs and conversation design best practices.

Editing system flow texts

To change the default text used in a system flow, you can override the message with a new one. Here's how:

  1. Select the step in a system flow you want to customize.

    image
  2. Click on the message name in the right panel and choose the "Create message" option.

    image
  3. In the modal that opens, specify the new message name and text, then click Save.

    image
  4. The message is now replaced.

    image

Overriding system flow logic

You can modify system flows just like custom ones by adding or removing steps. Let’s walk through an example of modifying the pattern_completed—a system flow that asks if the user needs more help after completing their goals or ending a conversation.

  1. By default, the pattern_completed has one step—a message that asks, "What else can I help you with?" This message will be presented to the user after each flow ends unless there are specific links to other flows. However, after some flows, such as a greeting, we may want to skip this question, especially when the assistant hasn't provided any help yet.

    image
  2. To reconfigure the system flow so that the question is skipped after specific flows, we can add a Logic branch before the message to specify those flows.

    image
  3. In the first logic branch, select the context "previous flow name" and specify that the previous flow shouldn't be the one that greets the user.

    imageimage
  4. For the Else branch, which now handles the case after the "greet" flow, we want the assistant to remain silent and wait for the next question from the user, so we leave it empty.

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

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.