githubEdit

Save & Contribute Insights

Insights are a durable knowledge artifacts that was captured from a conversation.

Insight are durable knowledge artifacts captured from conversations and related sources. Each insight (also referred to as a note) contains summarized understanding, provenance, and links to underlying messages and document references.

Create an Insight from a Message

Often, outputs of Interact with Bot are highly valuable as input for further conversations. Saving these pieces of knowledge as insights in your system makes them easily reusable.

Here we need to provide a specific messageId of the response of the LLM that we want so store. This messageId is being sent in the Interact with Bot step.

Generate Chat Note

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
convo_idstringRequired
latest_message_idstringRequired
insightsGraphTypeany ofOptional
string ยท enumOptionalPossible values:
or
nullOptional
is_pinany ofOptional
booleanOptional
or
nullOptional
parent_pathstringOptionalDefault: root
is_include_chat_historyany ofOptionalDefault: true
booleanOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
_idstringOptional
createdAtstring ยท date-timeOptional
modifiedAtstring ยท date-timeOptional
summarystringRequired
userIdstringRequired
fromUserIdany ofOptional
stringOptional
or
nullOptional
latestMessageCreatedany ofOptional
string ยท date-timeOptional
or
nullOptional
isEditedbooleanOptionalDefault: false
titlestringOptionalDefault: New Note
tokenCountintegerOptionalDefault: 0
insightsGraphTypeany ofOptional
string ยท enumOptionalPossible values:
or
nullOptional
modelany ofOptional
string ยท enumOptionalPossible values:
or
string ยท enumOptionalPossible values:
or
string ยท enumOptionalPossible values:
or
nullOptional
isContributedany ofOptionalDefault: false
booleanOptional
or
nullOptional
vectorDataany ofOptionalDefault: []
number[]Optional
or
nullOptional
messageIdany ofOptionalDefault: ""
stringOptional
or
nullOptional
doc_refany ofOptional
or
nullOptional
web_refany ofOptional
or
nullOptional
web_pro_refany ofOptional
or
nullOptional
webSearchQueryany ofOptional
stringOptional
or
nullOptional
is_web_pro_rbooleanOptionalDefault: false
webSearchConfigany ofOptional
or
nullOptional
updateTypeany ofOptionalDefault: manual
string ยท enumOptionalPossible values:
or
nullOptional
pathany ofOptional
stringOptional
or
nullOptional
lastGeneratedContentAtany ofOptional
string ยท date-timeOptional
or
nullOptional
isIncludeChatHistoryany ofOptionalDefault: true
booleanOptional
or
nullOptional
mediaUrlsany ofOptional
or
nullOptional
post
/cortex/notes/generate

Create a new Insight

Creating fully new Insights from knowledge retrieved programmatically is another use case that can be handled by API. In this case, a new insight is added based on a title and summary in a given path, where root, again, is the base folder.

Add Chat Note Manual

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
titleany ofOptional
stringOptional
or
nullOptional
summaryany ofOptional
stringOptional
or
nullOptional
parent_pathany ofOptionalDefault: root
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
_idstringRequired
createdAtstring ยท date-timeRequired
modifiedAtstring ยท date-timeRequired
titlestringRequired
isEditedbooleanOptionalDefault: false
post
/cortex/notes/add-note

Contribute Insights to a Knowledgebase

Going one step further, insights can also be contributed and therefore stored in Knowledgebases. The large difference here is that, upon using as part of a Create a Dataroom, Insights are pulled into the context in full, while Knowledgebases are used for RAG and only relevant chunks of data are being added to the context.

Save Insights To Knowledge Base

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
time_zoneany ofOptionalDefault: 2
numberOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/cortex/notes/save-insights-to-knowledge-base

No content

Last updated