Riven Grounding
LiveRetrieval and citation: decides when an answer needs sources, finds them, and binds each claim to something a reader can check.
Grounding is what turns a plausible answer into a checkable one. It runs between the question and the model: retrieve relevant passages, put them in front of the model, and attach the citations to the claims they support.
When it engages#
Not every question needs the web. Asking to rewrite a paragraph does not; asking what happened this week does. Grounding classifies the request and only pays the retrieval cost when currency or verifiability is actually at stake — which is why some answers carry citations and others do not.
How retrieval works#
- Rewrite the user's question into retrieval queries, using thread context so follow-ups do not need restating.
- Search the Web Index both semantically and lexically, then merge the result sets.
- Rerank passages for relevance and source quality, and drop near-duplicates so one story does not crowd out the rest.
- Assemble a bounded evidence set that fits the context budget, preferring diverse sources over many passages from one page.
- Generate the answer against that evidence, binding each citation to the passage it came from.
Citation integrity#
A citation points at a passage the platform actually retrieved, not at a URL the model produced from memory. If retrieval turns up nothing usable, the honest outcome is an answer that says so — a fabricated source is a worse failure than an admitted gap.
Using it yourself#
Research-tier models reach grounding directly: pin riven-research (or a Perplexity sonar model) and answers come back web-grounded with sources. For a fully custom pipeline, embed your own corpus with riven-embed and supply passages yourself — see API reference → Embeddings.
curl https://api.rivenai.io/v1/chat/completions \
-H "Authorization: Bearer $RIVEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "riven-research",
"messages": [{"role": "user", "content": "What changed in EU AI regulation this month?"}]
}'