Documents are reusable. Upload once via
/v1/files, then attach to any
scenario via /v1/scenarios/{id}/documents/{fileId}/attach. Switch between
LLM-decides retrieval (rag_mode: "auto") and forced retrieval on
every turn (rag_mode: "always") with a single flag.When to use this
If your scenario needs the AI to answer from your data — product docs, an FAQ, a JD, a knowledge base, a brand book — rather than only its training knowledge, attach documents to the scenario. WaterrAI chunks, embeds, and indexes them at upload; at meeting time the persona retrieves the relevant passages and grounds its responses on them.The two modes
The single flag that matters israg_mode on the scenario:
auto is what most enterprise voice platforms (Tavus, Retell) ship by default.
always is the mode that makes a difference when accuracy matters more than
conversational fluidity.
Build sequence
Step 1 — Upload a document
Documents are uploaded through the existing Files API. Supported types today:pdf, docx, doc, txt, md, csv. Max 50 MB per file. Ingestion
is async — typically 30 s for a single PDF, up to a few minutes for large
DOCX/CSV.
201 Created):
GET /v1/files/{id} until processing_status === "completed" or
subscribe to the file.indexed webhook.
Step 2 — Attach to a scenario
The same document can power any number of scenarios. Attachment is idempotent.201 Created):
Knowledge-only vs. presentable
Every attached document is RAG-eligible by default — the bot can ground answers on it as soon as you setrag_mode != "off". Presenting the document
on screen mid-call is a separate, opt-in capability:
Use
false for FAQs, pricing sheets, policies, internal handbooks — anything
you want the bot to know but not show. Use true for pitch decks,
brochures, demo slides where visual sharing is the point.
To detach:
Step 3 — Turn RAG on
That’s it. Create a meeting on this scenario and the persona will retrieve
from your attached documents.
Mode semantics in detail
auto — LLM-decides retrieval
At meeting init we register one tool on the LLM:
tool_call, the meeting service runs the search
internally and returns the top-k chunks as the tool result. The persona
prompt is automatically augmented with a one-line instruction explaining
when to call the tool — you don’t have to write it yourself.
On Gemini Live models the tool is registered with behavior=NON_BLOCKING and
scheduling=WHEN_IDLE so audio output keeps flowing while retrieval runs.
always — forced retrieval every turn
Before each LLM response, the meeting service:
- Takes the participant’s last utterance (or, if none, the current persona prompt) as the query.
- Runs
search_knowledge_base(query, top_k=rag_top_k)against the attached documents. - Injects the resulting chunks as a system-role message into the LLM context immediately before the assistant turn:
Gemini Live fast path (automatic)
When a scenario runs on Gemini Live (gemini-live-2.5-flash-native-audio),
WaterrAI transparently routes retrieval through Vertex AI’s managed RAG
Engine instead of our default Pinecone pipeline. You don’t configure
anything — the routing is automatic.
What you get:
- ~50 ms retrieval latency instead of ~150 ms (no webhook round-trip; retrieval happens inside the same Vertex datacenter as the Live session).
- No audio gap during retrieval — Vertex hands chunks to the model in-line with generation.
groundingMetadataon every response — Gemini returns exactly which span of which chunk grounded which token of the answer, surfaced in the meeting analysis with one-click jump-to-source.
- When you upload a file via
POST /v1/files, we index it in Pinecone (the universal path) and mirror the extracted text into your workspace’s VertexRagCorpusin the background. - At meeting init, if the scenario uses Gemini Live,
rag_mode = "auto", and all attached files have mirrored, we attachTool(retrieval=Retrieval(vertex_rag_store=...))to the Live session. - Otherwise —
rag_mode = "always", non-Gemini model, or any file not yet mirrored — we fall back to the function-call path against Pinecone. No retrieval is dropped; only the backend changes.
backend: "vertex_rag" | "pinecone" field on the
GET /meetings/{id}/retrievals response.
The fast path is currently used only with rag_mode = "auto" —
rag_mode = "always" always uses Pinecone so we can fully control the
pre-turn injection. This is a deliberate v1 choice; the Vertex path may
expand to always mode in a later release.
What’s stored in the meeting
Every retrieval — whether triggered byauto or always — is logged on the
meeting:
API summary
Files (reused from the existing Files API):
Scenario attachments:
Scenario fields:
Meeting introspection:
Limits
Comparison with other platforms
Worked example — a support agent
rag_mode: "auto" instead — the LLM
will call search_knowledge_base only when relevant, keeping latency low on
ordinary turns.
