ngx-prompt-kit

Source

Citation pill for RAG answers. Hover the chip to preview the title + description in a hover card.

Examples

Inline citation chip

Hover the chip to preview the source. Click to open in a new tab.

Vector databases use approximate nearest neighbor search to scale to millions of embeddings 1 while keeping query latency under ~10ms.

With favicon and custom label

Set [showFavicon]=true to fetch the site's favicon next to the label.

Installation

Add the source component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:source

It is built on spartan/ui, so add these helm components too: hover-card.

ng g @spartan-ng/cli:ui hover-card

Component API

PkSource

PropTypeDefaultDescription
hrefstring — Required URL. The hostname is auto-extracted as the default label.

PkSourceTrigger

PropTypeDefaultDescription
labelstring | number — Override the default (domain) label.
showFaviconboolean false Show the site favicon next to the label.
classstring — Extra classes for the chip.

PkSourceContent

PropTypeDefaultDescription
titlestring — Card title (required).
descriptionstring — Card description (required).
classstring — Extra classes for the hover card.