Working with Data Channels

Data Channels in Kosmoy Studio are a crucial element for enabling your AI Assistants to effectively utilize your data, especially in Retrieval Augmented Generation (RAG) applications. They go beyond simply providing access; they create a meaningful association between a data source and a specific business objective. This allows your AI Assistants to understand the purpose of the data and use it appropriately.

Data Channel Concepts

  • Links Data to Purpose: A Data Channel connects a specific database to a defined business objective, providing context for AI Assistants.
  • Facilitates AI Assistant Data Retrieval: Data Channels streamline the process of AI Assistants retrieving relevant information from your data sources.
  • One-to-One with Database Types: Each Data Channel type corresponds directly to a supported database type. Currently, Kosmoy Studio supports Vector Data Channels and plans to support SQL Data Channels, No-SQL Data Channels, Graph Data Channels and more in the future.

Creating a Data Channel

The process of creating a Data Channel involves selecting the data source and defining its intended use. The specific steps may vary depending on the Data Channel type. Here’s a general outline:

  1. Navigate to Data Channels: From the Kosmoy Studio home page, click on the “Data Management” menu in the left-hand navigation bar, then select “Data Channels”.

  2. Add a New Data Channel: Click the ”+ ADD” button located in the upper right corner of the Data Channels section.

  3. Select Data Channel Type: Choose the appropriate Data Channel type based on your data source.

    • Currently Supported: Vector Data Channel (for Vector Databases)
    • Future Support: SQL Data Channel, No-SQL Data Channel, Graph Data Channel, and others.
  4. Configure Data Channel: Follow the specific configuration steps for the selected Data Channel type, as detailed in the subsections below.

  5. Name and Describe the Data Channel: Give your Data Channel a unique name and an optional description that reflects its purpose. The description provided here is what the AI Assistant will see and use to determine the relevance of the data.

  6. Review and Create: Review the Data Channel configuration and click “Create” to create the Data Channel.

Data Channel Creation Workflows

Creating a Vector Data Channel

Follow these steps to create a Vector Data Channel:

  1. Select Database Type: Choose “Vector” as the database type.
  2. Select Target Vector Database: Select a previously registered Vector Database from the dropdown menu.
  3. Select Target Collection: Choose a specific Collection within the selected Vector Database.
  4. Define Retrieval Strategy: Select the desired retrieval strategy: “Similarity Search” or “Maximal Marginal Relevance (MMR)”.
  5. Select Embeddings Model: Choose a pre-registered embeddings model from the dropdown menu. This model will be used for any retrieval operations if applicable.
  6. Name and Describe the Data Channel: Give your Data Channel a unique name and a clear description. This description is crucial, as it will be used by the AI Assistant to determine the business objective and relevance of the data. For example: “Product descriptions and specifications for answering customer questions via RAG” or “Knowledge base articles to enhance the AI Assistant’s responses in a RAG pipeline.”
  7. Review and Create: Review the Data Channel configuration and click “Create”.

Data Channel Cards

The Data Channels section displays each created channel as a card. Each card shows:

  • Data Channel Type Icon: An icon representing the type of Data Channel (e.g., Vector, SQL).
  • Data Channel Name: The name you assigned to the Data Channel.
  • Description: The description you provided, including the usage purpose.
  • Edit Icon (Pencil): Click this icon to update the Data Channel’s name, description, or usage purpose (only if the Data Channel is not in use).
  • Delete Icon (Trash Bin): Click this icon to remove the Data Channel (only if the Data Channel is not in use).

Data Channel Usage Restrictions

You cannot edit or delete a Data Channel if it is currently referenced by other entities within Kosmoy Studio. This includes being used in:

  • Assistants
  • Any other Kosmoy Studio component that references Data Channels.

Before attempting to edit or delete a Data Channel, ensure it is not actively used in any of these areas.

Updating a Data Channel

You can update the name, description and usage purpose of a registered Data Channel, provided it is not currently referenced by any other component.

  1. Navigate to Data Channels: Go to “Data Management” > “Data Channels”.
  2. Locate the Data Channel Card: Find the card for the Data Channel you want to update.
  3. Click the Edit (Pencil) Icon: This will open the update dialog.
  4. Modify Name, Description and/or usage purpose: Update the Data Channel’s information as needed. Remember that the description is used by the AI Assistant, so make sure it accurately reflects the intended use.
  5. Click “Save”: Save the changes.

Removing a Data Channel

You can remove a registered Data Channel if it’s no longer needed. However, you cannot delete a Data Channel that is currently referenced by any other component.

  1. Navigate to Data Channels: Go to “Data Management” > “Data Channels”.
  2. Locate the Data Channel Card: Find the card for the Data Channel you want to remove.
  3. Click the Delete (Trash Bin) Icon: This will trigger a confirmation prompt.

If you attempt to delete a Data Channel that is currently in use, a modal will appear, preventing the deletion and explaining that the Data Channel is in use.

  1. Confirm Deletion: Confirm that you want to delete the Data Channel.

Warning: Deleting a Data Channel is a permanent action and cannot be undone. Ensure that the Data Channel is not being referenced by any other component before proceeding.

Using Data Channels

Data Channels are primarily used when configuring AI Assistants. When building an Assistant, you can connect it to one or more Data Channels, giving the Assistant the ability to access and utilize the data within those channels to fulfill its designated purpose. The AI Assistant will use the Data Channel’s description to understand the context and appropriate use of the data, particularly in RAG applications.