knowhere icon indicating copy to clipboard operation
knowhere copied to clipboard

[Feature]: Inline Source Chips: Replace Inline Text Citations with Clickable Chunk-Linked Chips

Open kaiyu96 opened this issue 5 months ago • 1 comments

Problem statement

The Knowhere Notebook Assistant currently appends source links at the end of each response. Within the response body, referenced chunks are represented only as plain text placeholders (e.g., [Source 1], [Source 2]), which carry no navigational value — users cannot click them to jump to the relevant chunk, and they provide no visual indication of what document is being cited.

This creates a friction-heavy reading experience:

  • Users must cross-reference between the response body and the source list at the bottom to understand what evidence supports each claim
  • The plain-text citation markers are visually noisy but functionally useless — they occupy space without enabling any action
  • For long responses with multiple sources, the disconnect between inline mentions and the appended link list makes it difficult to trace specific statements back to their source chunks
  • The current pattern discourages source verification, which undermines trust in the assistant's answers
Image

Affected area

Other

Proposed solution

Replace the plain-text inline source markers in the response body with clickable source chips, and remove the redundant source link list at the bottom of each answer.

Chip behavior and design spec:

  • Each chip uses the existing Figma Chip component (no icon variant) as the visual primitive

  • Chip label displays the document filename (e.g., spacex_s1_p1-136.pdf)

  • Chip max-width is 250px; labels exceeding this width are truncated with an ellipsis (…)

  • On hover: chip background highlights, cursor changes to pointer (cursor: pointer), and a Figma Tooltip component appears showing the full, untruncated source label

  • On click: navigates directly to the corresponding parsed chunk in the Playground viewer

Image

Alternatives considered

No response

Compatibility and migration notes

No response

Additional context

No response

kaiyu96 avatar Jun 12 '26 07:06 kaiyu96

Inline source chips will be much more useful if they are backed by stable chunk ids rather than just display text offsets. The design should define what happens when a chunk is deleted/reparsed, how hover/click previews map to the source panel, and how chips appear in copied/exported answers. A small fixture with repeated citation text from two different chunks would catch the common ambiguity.

hiSandog avatar Jul 03 '26 09:07 hiSandog