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:
-
The Narrative runs the configured SQL query against the updated row.
-
The results of that query are inserted into the Narrative Template, which converts the row into readable text.
-
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:
-
The Narrative filters documents using the selected tag (if one is configured).
-
The selected documents are processed using the chosen parser.
-
The parser breaks each document into smaller sections and prepares them for search.
-
A summary may be generated to capture the key themes of the document.
-
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
-
Click the Management icon in the application menu.
-
Under AI Assistants, click Knowledge Stores.
-
Navigate to the tab of the type of knowledge store you’d like to add a narrative to.
-
In the row of the knowledge store you’d like to add a narrative to, click the menu
icon. -
Click +New Narrative.
-
Provide the following information:
Narrative NameRequired— Unique identifier of Narrative.
DescriptionOptional— A description of the Narrative.
Max Failed RecordsRequired— Maximum number of records that can fail processing before the Narrative enters an error state.
(Document Only) Document StoreRequired— Select the document store that will be the source of documents for this narrative.
(Document Only) Tag FilterRequired— Select a tag to be used to filter the documents on the Document Store that should be indexed by this Narrative.
(Document Only) Summarization PromptOptional— Provide an optional prompt to guide the system when generating the document summary.
(Document Only) Summarization Chunk LimitRequired— Specifies the maximum number of document chunks to use when generating the summary. A value of 0 uses all available chunks.
(Document Only) ParserRequired— 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 NameRequired— Name of the structured SQL table that the Narrative should be creating vectors for.
(SQL Only) SQL QueryRequired— SQL Query used to get information to populate Narrative Template.
(SQL Only) Narrative TemplateRequired— 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.
-
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
-
Click the Management icon in the application menu.
-
Under AI Assistants, click Knowledge Stores.
-
Navigate to the tab of the type of knowledge store you’d like to edit a narrative of.
-
Use the + icon to expand the knowledge store.
-
In the row of the narrative you’d like to edit, click the menu
icon. -
Click Edit Narrative.
-
Modify the fields you would like to change.
-
Click Submit.
Deleting a Narrative
-
Click the Management icon in the application menu.
-
Under AI Assistants, click Knowledge Stores.
-
Navigate to the tab of the type of knowledge store you’d like to edit a narrative of.
-
Using the + icon to expand the knowledge store.
-
In the row of the narrative you’d like to edit, click the menu
icon. -
Click Delete Narrative. A confirmation box appears.
-
Click Delete.
Deleting a Narrative is a permanent action and cannot be reversed.