Repository navigation
[Docs] Add tag how-to guides and restructure the Tags concept page #1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lisa-tarbo
wants to merge
2
commits into
main
Choose a base branch
from
new-pages-on-tags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,53 @@ | ||
| # Tags | ||
|
|
||
| Tags are labels applied to chats and messages to categorize and organize interactions. | ||
| For instance, tags can be used to mark messages that require follow-up or to segment participants based on their interactions. | ||
|
|
||
| Create tags from **Manage Tags** in the team sidebar. | ||
| The link appears only if you have permission to add tags. | ||
|
|
||
|  | ||
|
|
||
| To add a tag, use the **Add new** button and enter a name. | ||
| A tag name can be at most 100 characters long. | ||
|
|
||
| ## Types Of Tags | ||
|
|
||
| There are three types of tags. | ||
|
|
||
| ### System tags | ||
| These are tags generated by the system, such as those used in [multi-prompt architectures](../how-to/workflow_cookbook.md#split-a-chatbot-into-multiple-smaller-chatbots) to differentiate between parent and child chatbots. | ||
|
|
||
| ### Session tags | ||
| These tags are added to [sessions](sessions.md), either manually, by pipeline nodes, or automatically by [tag rules](evaluations/tag_rules.md). | ||
| Tagged sessions can be found with the **Tags** filter on the [sessions list](sessions.md#tags-on-the-sessions-list). | ||
|
|
||
| ### Message tags | ||
| These tags are added to specific messages within a participant session, either manually, by pipeline nodes, or automatically by [tag rules](evaluations/tag_rules.md). | ||
| Pipeline nodes add message tags in these ways: | ||
|
|
||
| - The **Message Tag** field adds a tag to the node's output message. | ||
| Many nodes have this field, such as the LLM, Render a Template, and Python nodes. | ||
| Check a node's settings to see whether it has one. | ||
| - A router's **Tag Output Message** setting tags the router's output message. | ||
| See [Route Tagging](../how-to/routers/index.md#route-tagging-tracing-observability). | ||
| - The Python node's `add_message_tag` function adds tags from code. | ||
|
|
||
| ## Tags in a Session | ||
| Tags are labels you attach to messages and sessions. | ||
| They help you find the conversations and replies that matter without reading every chat. | ||
|
|
||
| ## What you can do with tags | ||
|
|
||
| - **Review the replies on one topic.** | ||
| Set the [node](pipelines/nodes.md) that writes your clinic referrals to tag its replies `clinic-referral`. | ||
| Then read the tagged replies together to check the advice is safe and clear. | ||
| See [Tag a Node's Output Messages](../how-to/tag_node_output.md). | ||
| - **See which path a router chose.** | ||
| Tag each route of a [router](pipelines/router_nodes.md), then find the messages that fell back to the default route. | ||
| See [Tag a Router's Route](../how-to/routers/tag_router_routes.md). | ||
| - **Flag a message or conversation yourself.** | ||
| Mark a complaint, or a session that needs a person to follow up. | ||
| See [Create and Manage Tags](../how-to/manage_tags.md#how-do-i-tag-a-message-or-session-by-hand). | ||
| - **Let an evaluation flag problems for you.** | ||
| A tag rule can add a tag to the sessions or messages that score badly, so you review only those. | ||
| See [Tag Rules](evaluations/tag_rules.md). | ||
| - **Tag with your own rules (advanced).** | ||
| A [Python node](pipelines/nodes.md#python-node) can add tags from code. | ||
|
|
||
| After you tag, use the **Tags** filter on the sessions list to see only the conversations you want. | ||
| See [Tags on the Sessions List](sessions.md#tags-on-the-sessions-list). | ||
|
|
||
| ## Message tags and session tags | ||
|
|
||
| A message tag labels one message, either a participant's message or the chatbot's reply. | ||
| A session tag labels a whole conversation, such as its outcome or topic. | ||
| Use a message tag when you want to find a specific message, and a session tag when you want to describe the conversation. | ||
|
|
||
| ## Tags in a session | ||
|
|
||
| Open a session to see its tags and the tags on each message. | ||
| Session tags appear in the **Tags** bar at the top. | ||
| Session tags appear in the **Tags** tile of the session summary at the top. | ||
| Message tags appear beside each message's timestamp. | ||
| Hover over a tag to see who added it, for example "Added by Participant". | ||
| To add tags to a message, click the pencil icon (:fontawesome-solid-pencil:) beside its tags. | ||
|
|
||
| To find sessions by tag, see [Tags on the Sessions List](sessions.md#tags-on-the-sessions-list). | ||
|
|
||
|  | ||
|
|
||
| ## System tags | ||
|
|
||
| OCS adds some tags itself, called system tags. | ||
| For example, each chatbot reply carries a version tag such as `v3`, or `v3-unreleased` for an unpublished version. | ||
| Router [route tags](../how-to/routers/tag_router_routes.md) are system tags too. | ||
| System tags appear in a different color, and you cannot select, edit or delete them yourself. | ||
|
|
||
| ## See also | ||
|
|
||
| - [Sessions](sessions.md) | ||
| - [Tag Rules](evaluations/tag_rules.md) | ||
| - [Python Node utility functions](../tech-hub/python_node.md#utility-functions) | ||
| - [Create and Manage Tags](../how-to/manage_tags.md) | ||
| - [Python node utility functions](../tech-hub/python_node.md#utility-functions) `add_message_tag` and `add_session_tag` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Create and Manage Tags | ||
|
|
||
| This guide shows you how to create tags, rename or delete them, and add them to a message or session by hand. | ||
| For background on what tags are for, see [Tags](../concepts/tags.md). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - The **Super Admin** role, if you want to create, rename or delete tags. | ||
| The **Manage Tags** link appears in the team sidebar only for this role. | ||
| See [User Groups](../concepts/team/groups.md) for what each role can do. | ||
| - A [session](../concepts/sessions.md) with messages, if you want to tag by hand. | ||
|
|
||
| ## How do I create a tag? | ||
|
|
||
| 1. Select **Manage Tags** in the team sidebar. | ||
| 2. Click **Add new**. | ||
| 3. Enter a name of up to 100 characters. | ||
| 4. Click **Create**. | ||
|
|
||
| Tag names must be unique within your team. | ||
|
|
||
|  | ||
|
|
||
| ## How do I rename or delete a tag? | ||
|
|
||
| On the **Manage Tags** page, find the tag's row. | ||
| Click the pencil icon (:fontawesome-solid-pencil:) to rename the tag or the trash can icon (:fontawesome-solid-trash:) to delete it. | ||
| System tags have neither action, because OCS manages them. | ||
|
|
||
| Deleting a tag removes it from every message and session that carries it. | ||
| OCS blocks the deletion if an evaluator's [tag rule](../concepts/evaluations/tag_rules.md) uses the tag. | ||
| Remove the tag from the rule first. | ||
|
|
||
| ## How do I tag a message or session by hand? | ||
|
|
||
| 1. Open a session from **All Sessions**. | ||
| 2. To tag a message, hover over it and click the pencil icon (:fontawesome-solid-pencil:) beside its tags. | ||
| To tag the whole session, click **Add tag** in the **Tags** tile of the session summary. | ||
| 3. Select one or more tags from the list. | ||
| To create a new tag here, type its name. | ||
| Only a **Super Admin** can create a tag here. | ||
| Other roles can select existing tags, and **Chat Viewer** cannot change tags. | ||
| 4. Click outside the list to close it. | ||
| Each tag is saved as soon as you select it. | ||
|
|
||
| The tags appear on the message or in the session summary. | ||
| See [Tags in a session](../concepts/tags.md#tags-in-a-session). | ||
|
|
||
| ## See also | ||
|
lisa-tarbo marked this conversation as resolved.
Resolved
|
||
|
|
||
| - [Tags](../concepts/tags.md) | ||
| - [Tag a Node's Output Messages](tag_node_output.md) | ||
| - [Chat Sessions](../concepts/sessions.md#tags-on-the-sessions-list) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,34 @@ | ||
| # Configuration for Router Nodes | ||
|
|
||
| This page covers the configuration steps that apply to all router node types. For a conceptual overview of how routers work, see [Router Nodes in Pipelines](../../concepts/pipelines/router_nodes.md). | ||
| This page covers the configuration steps that apply to all router node types. | ||
| For a conceptual overview of how routers work, see [Router Nodes in Pipelines](../../concepts/pipelines/router_nodes.md). | ||
|
|
||
| Both LLM Routers (intent-based) and Static Routers (data-based) share the same core configuration pattern for directing conversation flow. You find these settings in the Advanced Settings of the node. | ||
| Both LLM Routers (intent-based) and Static Routers (data-based) share the same core configuration pattern for directing conversation flow. | ||
| You find these settings in the Advanced Settings of the node. | ||
|
|
||
| For router-specific configuration, see: | ||
|
|
||
| 1. [LLM Router Configuration](llm_router.md) | ||
| 2. [Static Router Configuration](static_router.md) | ||
|
|
||
| ## The Default Output | ||
| Every router needs a "safety net" so the conversation never reaches a dead end. This is called the Default Output. | ||
|
|
||
| Every router needs a fallback output so the conversation always continues. | ||
| This is called the Default Output. | ||
|
|
||
| - The Indicator: The default output is marked with a blue asterisk (*) in the node configuration. | ||
| - The Logic: If the router cannot find a match for your configured outputs, or if a technical error occurs — including when an LLM Router's model returns no classification at all — the message is automatically directed to the downstream node connected to this Default Output. | ||
| - The Logic: If the router cannot find a match for your configured outputs, or if a technical error occurs, the message goes to the Default Output. | ||
| The message is automatically directed to the downstream node connected to it. | ||
| This includes when an LLM Router's model returns no classification at all. | ||
| - Customization: You can change the Default Output by clicking the blue * next to a different output keyword in your output list. | ||
|
|
||
| <a id="route-tagging-observability"></a> | ||
|
|
||
| ## Route Tagging & Tracing (Observability) | ||
| To understand how participants move through your chatbot, you can enable Output Message Tagging. This is useful for debugging and analyzing routing performance. | ||
|
|
||
| - [Tagging](../../concepts/tags.md): Toggle the **Tag Output Message** flag within the Router node settings. Tags longer than 100 characters are cut to 100 characters when saved. | ||
| - [Tracing](../../concepts/tracing.md): Configure this for path-level analysis for debugging. | ||
|
|
||
| ### Tag naming convention | ||
| To keep [system tags](../../concepts/tags.md#system-tags) organized, OCS follows this naming convention: | ||
|
|
||
| ```text | ||
| <node_name>:<route_name> | ||
| ``` | ||
| To understand how participants move through your chatbot, you can enable Output Message Tagging. | ||
| This is useful for debugging and analyzing routing performance. | ||
|
|
||
| Example: If you have a Router node named `support_triage` and it selects the output keyword `BILLING`, the resulting tag is: | ||
| `support_triage:BILLING` | ||
|
|
||
| If the router falls back to its [Default Output](#the-default-output) — because nothing matched, or an error occurred — OCS appends `:default` to the tag, making the full form `<node_name>:<route_name>:default`. For example, `support_triage:GENERAL:default`. This makes fallback routes easy to filter for separately when reviewing tags. | ||
|
|
||
| Ensure your `node_name` is descriptive (for example, `intent_classifier`) so tags are easy to interpret. | ||
| - [Tagging](tag_router_routes.md): Toggle the **Tag Output Message** flag within the Router node settings. | ||
| The guide covers the tag naming rules, including the `:default` suffix. | ||
| - [Tracing](../../concepts/tracing.md): Configure this for path-level analysis for debugging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Tag a Router's Route | ||
|
|
||
| This guide shows you how to tag a router's output message with the route it chose. | ||
| Route tags help you review how participants move through your chatbot. | ||
| This applies to both the **LLM Router** and **Static Router** nodes. | ||
|
|
||
| For background on message tags, see [Tags](../../concepts/tags.md#message-tags-and-session-tags). | ||
|
|
||
| For example, a router named `health_triage` sends questions about symptoms down a `CLINIC` route. | ||
| With tagging on, each of those messages carries the tag `health_triage:CLINIC`. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A chatbot with a [router node](../../concepts/pipelines/router_nodes.md). | ||
|
|
||
| ## How do I turn on route tagging? | ||
|
|
||
| 1. Open your chatbot and view the **Pipeline** workflow. | ||
| 2. Click the node edit button (or the **Advanced** link) to open the router node's settings. | ||
| 3. In the **Advanced Settings**, turn on **Tag Output Message**. | ||
| It is in the same place for the **LLM Router** and the **Static Router**. | ||
| 4. Close the settings dialog to save your changes. | ||
|
lisa-tarbo marked this conversation as resolved.
Resolved
|
||
| 5. [Create and publish a version](../../tutorials/versioning_steps.md) of your chatbot. | ||
|
|
||
| ## What is the name of a route tag? | ||
|
|
||
| OCS builds the tag name as `<node_name>:<route_name>`. | ||
| For the router above, a message routed to `CLINIC` gets `health_triage:CLINIC`. | ||
| Use a descriptive node name, such as `symptom_router`, because the node name is part of every tag. | ||
|
lisa-tarbo marked this conversation as resolved.
Resolved
|
||
|
|
||
|
lisa-tarbo marked this conversation as resolved.
Resolved
|
||
| If the router falls back to its [Default Output](index.md#the-default-output), OCS adds `:default` to the end. | ||
| For example, if the Default Output is `GENERAL`, the tag is `health_triage:GENERAL:default`. | ||
| This makes fallback routes easy to filter for when you review tags. | ||
|
|
||
| Tags longer than 100 characters are cut to 100 characters when saved. | ||
| Route tags are [system tags](../../concepts/tags.md#system-tags), so you cannot edit or delete them in **Manage Tags**. | ||
|
|
||
| ## Expected outcome | ||
|
|
||
| Open a session after the router handles a message. | ||
| The router's output message carries the route tag. | ||
| To list sessions with the tag, see [Tags on the Sessions List](../../concepts/sessions.md#tags-on-the-sessions-list). | ||
|
|
||
| ## Common issues | ||
|
|
||
| - **A router tag is missing.** | ||
| Check that **Tag Output Message** is turned on for that router. | ||
| - **Filtering by `:default` misses some fallback messages.** | ||
| A long node or route name can push the tag past 100 characters, and the cut removes `:default`. | ||
| Shorten the node or route names so the full tag fits. | ||
|
|
||
| ## See also | ||
|
|
||
| - [Router Nodes](index.md) | ||
| - [Tags](../../concepts/tags.md) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Tag a Node's Output Messages | ||
|
|
||
| Many nodes have a **Message Tag** field. | ||
| This guide shows you how to use it to make a node automatically tag every message it produces with a [message tag](../concepts/tags.md#message-tags-and-session-tags). | ||
|
|
||
| Use it when you want to find the messages a node produces, without tagging each by hand. | ||
| The tag applies to every message the node produces, so it works best on a node with a single purpose. | ||
| For example, an LLM node only advises participants to visit the clinic and explains how to book. | ||
| Tag its replies `clinic-referral`. | ||
| Every message with that tag is a referral, so you can review them together to check that the advice is safe and clear. | ||
| To tag a single message yourself, see [Create and Manage Tags](manage_tags.md#how-do-i-tag-a-message-or-session-by-hand). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A chatbot with an [LLM node](../concepts/pipelines/nodes.md#llm-node), a [Render a Template node](../concepts/pipelines/nodes.md#render-a-template-node) or a [Python node](../concepts/pipelines/nodes.md#python-node). | ||
| - A published version of the chatbot and a channel to chat through, such as a [public link](channels/deploy_public_link_channel.md#add-a-public-link). | ||
|
|
||
| ## How do I add a tag to a node's output? | ||
|
|
||
| The **Message Tag** field tags only the output of the node that has it. | ||
| These steps use the LLM node. | ||
| The field works the same way on the Render a Template and Python nodes, so the steps apply to them too. | ||
|
|
||
| 1. Open your chatbot and view the **Pipeline** workflow. | ||
| 2. Click the node edit button (or the **Advanced** link) to open its settings. | ||
| 3. Find the **Message Tag** field and enter `clinic-referral`. | ||
| If the tag does not exist yet, OCS creates it for you. | ||
| 4. Close the settings dialog to save your changes. | ||
| 5. [Create and publish a version](../tutorials/versioning_steps.md) of your chatbot. | ||
|
|
||
| To tag only some of a Python node's messages, or to tag a session, use the node's code instead. | ||
| See [Python node utility functions](../tech-hub/python_node.md#utility-functions) for `add_message_tag` and `add_session_tag`. | ||
|
|
||
| ## How do I see the tag on the chatbot's reply? | ||
|
|
||
| 1. Open the chatbot through your channel and send a test message. | ||
| For example: `I have had a cough for two weeks. Should I see someone?` | ||
| 2. Select **All Sessions** in the left menu and find the participant who sent your test message. | ||
| 3. Click the view icon on the session to open the **Session Transcript**. | ||
| 4. Find the chatbot's reply. | ||
|
|
||
| ## Expected outcome | ||
|
|
||
| The tag `clinic-referral` appears on the chatbot's reply. | ||
| Your own message does not have the tag, because only the node's reply is tagged. | ||
|
|
||
| ## Common issues | ||
|
|
||
| - **The tag is missing from the reply.** | ||
| Check that you saved the node settings and published a new version, and that you chatted with the published version. | ||
|
|
||
| ## See also | ||
|
|
||
| - [Tags](../concepts/tags.md) | ||
| - [Create and Manage Tags](manage_tags.md) | ||
| - [Tag a Router's Route](routers/tag_router_routes.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.