Skip to main content

Adding Data to Your Knowledge Store via Narratives

Once you have created a Knowledge Store, the next step is to add data to it so assistants can use it.

A Narrative is the process that adds data to a Knowledge Store. It transforms your raw data, whether from database tables or uploaded documents, into searchable content that assistants can reference when answering questions.

Data Studio supports both structured data, such as SQL tables, called SQL Narratives, and unstructured data (such as PDFs), called Document Narratives.

Understanding Narratives

Understanding SQL Narratives

A SQL Narrative tracks a source table in your database.

When rows in that table are added or changed:

  1. The Narrative runs the configured SQL query against the updated row.

  2. The results of that query are inserted into the Narrative Template, which converts the row into readable text.

  3. That text is processed and stored in the Knowledge Store so it can be searched when you ask questions to an assistant.

Understanding Document Narratives

A Document Narrative tracks a Document Store.

When files are added or removed:

  1. The Narrative filters documents using the selected tag (if one is configured).

  2. The selected documents are processed using the chosen parser.

  3. The parser breaks each document into smaller sections and prepares them for search.

  4. A summary may be generated to capture the key themes of the document.

  5. The processed content is added to the Knowledge Store.

This allows assistants to answer questions about document collections such as contracts, research reports, or SEC filings.

The Summarization Prompt is especially important for document narratives. It helps guide the assistant to focus on the types of information you are most likely to ask about.

Creating a Narrative

  1. Click the Management icon in the application menu.

  2. Under AI Assistants, click Knowledge Stores.

  3. Navigate to the tab of the type of knowledge store you’d like to add a narrative to.

  4. In the row of the knowledge store you’d like to add a narrative to, click the menu generated description: icon verticaldotsicon.

  5. Click +New Narrative.

  6. Provide the following information:

    Narrative Name

    Required— Unique identifier of Narrative.

    Description

    Optional— A description of the Narrative.

    Max Failed Records

    Required— Maximum number of records that can fail processing before the Narrative enters an error state.

    (Document Only) Document Store

    Required— Select the document store that will be the source of documents for this narrative.

    (Document Only) Tag Filter

    Required— Select a tag to be used to filter the documents on the Document Store that should be indexed by this Narrative.

    (Document Only) Summarization Prompt

    Optional— Provide an optional prompt to guide the system when generating the document summary.

    (Document Only) Summarization Chunk Limit

    Required— Specifies the maximum number of document chunks to use when generating the summary. A value of 0 uses all available chunks.

    (Document Only) Parser

    Required— Select the parser to be used to process the documents. IntelliSense is best suited for mixed media, StructuredRead is best suited for text-heavy documents.

    (SQL Only) Table Name

    Required— Name of the structured SQL table that the Narrative should be creating vectors for.

    (SQL Only) SQL Query

    Required— SQL Query used to get information to populate Narrative Template.

    (SQL Only) Narrative Template

    Required— A text template that utilizes the fields returned from a user's query. The template will be populated with data and then converted into a searchable format.

  7. Click Submit.

If you created a document-based narrative, you will have to upload or synchronize your documents into a Document Store before configuring any assistants. For SQL-based assistants, proceed to Configuring your Assistants.

Editing an Existing Narrative

  1. Click the Management icon in the application menu.

  2. Under AI Assistants, click Knowledge Stores.

  3. Navigate to the tab of the type of knowledge store you’d like to edit a narrative of.

  4. Use the + icon to expand the knowledge store.

  5. In the row of the narrative you’d like to edit, click the menu generated description: icon verticaldotsicon.

  6. Click Edit Narrative.

  7. Modify the fields you would like to change.

  8. Click Submit.

Deleting a Narrative

  1. Click the Management icon in the application menu.

  2. Under AI Assistants, click Knowledge Stores.

  3. Navigate to the tab of the type of knowledge store you’d like to edit a narrative of.

  4. Using the + icon to expand the knowledge store.

  5. In the row of the narrative you’d like to edit, click the menu generated description: icon verticaldotsicon.

  6. Click Delete Narrative. A confirmation box appears.

  7. Click Delete.

Deleting a Narrative is a permanent action and cannot be reversed.

FeedbackOpens in a new tab