Skip to main content

Chat Data Sources

Data sources define which information a chat message can use. They are stored in one data_sources list instead of separate fields for focus, selected clusters, and external sources.

This gives the frontend, workflows, GraphQL, and the AI service one source of truth. It also makes source selections easier to extend, validate, display, and carry into follow-up messages.

Set data sources​

In chat, use the source controls next to the prompt to select highlights, files, surveys, records, Google Drive, Confluence, or web search. Starting a chat from selected highlights or clusters sets that selection automatically.

In a workflow, open a Chat step and use the same source controls. You can also choose whether the workflow should apply focus suggestions automatically.

If no source is selected, chat uses all highlights in the teamspace. Selecting another source does not also select highlights; add highlights explicitly when both are needed.

How sources are represented​

Each item has a kind and, except for web search, kind-specific data. A message should contain at most one item of each kind.

KindDataMeaning
highlightsA focus query, cluster IDs, or highlight IDsThe highlight scope
filesFile IDsUploaded files
surveysSurvey IDsSelected surveys
recordingsRecord IDsSelected records
googleDriveResource IDsSelected Google Drive resources
confluenceResource IDsSelected Confluence resources
webNo dataWeb search is enabled

Highlights support three scopes:

  • focusQuery: a tag, date, metadata, or text search. An empty value means all teamspace highlights.
  • selectedClusters: use the selected clusters exactly as they are.
  • selectedHighlights: use the selected highlights exactly as they are.

For example, this selects highlights tagged billing and enables web search:

[
{
"kind": "highlights",
"data": {
"scope": {
"kind": "focusQuery",
"focusQuery": "tag:billing"
}
}
},
{ "kind": "web" }
]

Writers replace an existing item of the same kind and keep unrelated items. Readers look up the item by kind, then interpret its matching data shape. Fixed highlight and cluster selections are used as selected and are not narrowed by an extra search term.

Uploaded file metadata and chat mode remain separate message properties. The files data source says that the uploaded files are part of the active source selection.

Defaults and follow-up messages​

Both a missing data_sources value and an empty list mean that the current message has no explicit source selection. The AI service then creates the default highlights source with an empty focus query, which means all highlights in the teamspace. Legacy fields are not used to build this fallback.

The AI service then carries eligible sources from the immediately previous message in the same chat:

  • Files, surveys, records, Google Drive, Confluence, and web search carry forward.
  • A manual selection of highlights carries forward.
  • A focus query and selected clusters do not carry forward through source inheritance.

The current message wins when it sets the same kind. Inherited sources only fill missing kinds, except that an inherited manual highlight selection replaces a broad or default focus query. The resolved list is saved on the message so the same rules can be applied to the next follow-up.

Prompt templates, prompt suggestions, links, and workflows use the same shape. When a runtime selection is combined with configured sources, it replaces configured items of the same kind and preserves the other kinds. An explicit empty override clears the configured selection.