Chat

How grounded chat works today, and exactly what's exposed to the public API versus the dashboard.

Dashboard chat (session-authenticated)

POST/kb/:id/chat

The dashboard's chat runs through this endpoint, authenticated by session cookie, not an API key. On every message: the query is embedded with the same model the knowledge base was built with, a pgvector similarity search scoped to your organization and that knowledge base pulls the top candidates, and the assembled context is sent to the LLM with a system prompt that requires inline citation markers tied to real chunk IDs. The response streams back over Server-Sent Events as it's generated.

Citation verification isn't optional

After the model finishes generating, every citation marker in its output is checked against the chunk IDs that were actually placed in context for that specific request. A citation that doesn't resolve is stripped — the model claiming a source it wasn't given is treated as a bug to catch, not a UI detail to gloss over. See Citations for the shape this produces.

Public API (not yet available)

Programmatic chat via API key — POST /v1/knowledge-bases/:id/chat — isn't shipped yet. Today's public API surface is read-only (see Documents). If your integration needs programmatic chat, that's worth telling us — it's the next thing on the public-API roadmap.