Retrieval and grounding
Index the right corpus
Start with the developer index. Fetch linked guides, the OpenAPI contract, the SDK reference, and the context pack. Chunk by heading and retain each document's canonical URL, title, section, release status, and retrieval time.
Do not ingest internal source trees, credentials, customer records, or unpublished role material.
Route questions before retrieval
Separate static truth from live truth
Static documentation can define what availableLiquidity means. Only a current API response can
state its present value. Keep these as separate citations in the prompt, and attach freshness block
evidence to live state.
Minimal retrieval record
{
"sourceUrl": "https://docs.torq.finance/developers/canonical-state",
"section": "Completion contract",
"retrievedAt": "2026-08-09T00:00:00Z",
"releaseStatus": "private_preview",
"content": "..."
}Timestamps remain ISO in machine records. Product-facing calendar dates use Torq's platform date format.
Citation contract
Require the model to return the exact Torq source URL for factual claims and the resource ID plus freshness evidence for current-state claims. If a claim has no source, present it as an open question, not a fact.