Wiring RAG Into Your AI Voice Agent: 5-Step Tutorial for Quebec SMBs (May 2026) | Agent IA Vocal
    Back to blog
    Tutoriel7 min readMay 23, 2026

    Wiring RAG Into Your AI Voice Agent: 5-Step Tutorial for Quebec SMBs (May 2026)

    On May 12, 2026 ElevenLabs shipped the typed RAG API. Here is the 5-step tutorial to wire your FAQ into your AI voice agent for a Quebec SMB.

    MA

    Masdouk Adelakoun

    Cofondateur & CTO

    Wiring RAG Into Your AI Voice Agent: 5-Step Tutorial for Quebec SMBs (May 2026)

    A dental clinic in Laval was getting the same six questions every day: "Do you accept Desjardins insurance, and does the Croix Bleue plan cover cleanings?" One receptionist had eventually typed up a 47-page Word document with everything — fees, insurance lists, hours, cancellation policies, services offered by each hygienist. Nobody read it but her. On May 12, 2026, ElevenLabs shipped its typed RAG chunk listing and file document updates APIs — the missing pieces that finally let an AI voice agent read that document instead of the human, without having to rewrite it as a prompt.

    This tutorial walks through the five steps TECHMA follows to wire that knowledge base into an AI voice agent that's already in production. Budget 90 minutes for a clean first deployment, and a Friday afternoon for the update loop. By the end, your FAQ answers itself — in Quebec French — without touching the main system prompt.

    Step 1 — Prepare the source documents (PDF, .md, .docx, URL)

    The golden rule isn't "the bigger, the better." An AI voice agent on a non-enterprise ElevenLabs account caps at 20MB and 300,000 characters across the entire knowledge base. That's plenty for a Quebec SMB — roughly 150 pages of dense FAQ, or three long SOPs plus two pricing grids.

    Don't upload the scanned PDF of your 2019 brochure. Re-export it as .md or .txt with clear headings (## Pricing, ## Insurance, ## Hours). ElevenLabs' chunking engine respects sections — a well-titled document is two to three times more accurate than a wall of text. For the dental clinic, we split the 47-page Word file into six thematic .md files.

    Before clicking "upload," scrub every document: no health insurance numbers, no patient names, no personal employee addresses. The knowledge base lives in the model's context — if sensitive data ends up there, you're transferring personal information to a US subprocessor, and Quebec's Commission d'accès à l'information takes a dim view. We cover this in depth in our 9-step protocol for Law 25 compliance.

    Step 2 — Upload and index in ElevenLabs

    Two paths. Fastest: Dashboard → Agents → [your agent] → Knowledge Base → Add Document. Drag the file in, ElevenLabs starts indexing, you see a progress bar. A 30KB .md file takes two to three minutes. An 8MB image-heavy PDF can climb to eight minutes. As long as the status reads indexing, the content is not queryable yet.

    The other path, which we use at TECHMA when a client has 12 documents to push: the API. A POST /v1/convai/knowledge-base with the file as multipart, then a POST /v1/convai/knowledge-base/document/{doc_id}/rag-index to force index computation with the chosen embedding model. ElevenLabs' Compute RAG Index documentation lists the exact parameters. This route scripts what would otherwise be twenty minutes of click-and-drag.

    To confirm a document is ready, call GET /v1/convai/knowledge-base/document/{doc_id}/rag-index. Status succeeded? Move to Step 3. Status failed? Nine times out of ten, it's a badly OCR'd PDF or a .docx with embedded objects (pasted Excel charts, locked form fields). Re-exporting as .md fixes it.

    Step 3 — Configure RAG parameters (without firing blindly)

    In the agent configuration, under Knowledge Base, toggle Use RAG on. Three settings actually matter; the rest of the defaults work for 80% of cases.

    Embedding model: e5_mistral_7b_instruct is the default. For a Quebec SMB with French documents, it's fine — but multilingual-e5 noticeably improves recall on French/English mixed queries, typical in a Montreal practice where the patient switches languages mid-sentence. Turn it on if more than 20% of your calls are bilingual.

    Max document chunks: how many chunks the engine injects into context per query. Default is 5. For a SMB, drop it to 3 — the agent answers faster and hallucinates less. Past 7, you drown the model in extracts that contradict each other.

    Max vector distance: relevance threshold. 0.7 is strict (the agent will say "I don't know" more often), 0.9 is loose (it'll try to answer even tangential questions). Start at 0.75 and tune after 50 test calls. The three parameters are documented on the ElevenLabs RAG page.

    Step 4 — Tune the system prompt to actually use the base

    A knowledge base that's plugged in but never referenced in the prompt is like a library no one has the address for. Four lines do it:

    "You have access to a knowledge base containing fees, accepted insurance, hours, and clinic policies. Answer using this base. If the information isn't there, say so and offer to transfer to the receptionist."

    The "if the information isn't there" clause is what stops hallucinations. A poorly framed AI voice agent will invent a fax number, a cancellation policy, a fee. With this instruction, it politely declines and escalates to a human — exactly the behavior we dissected in our 7-step anti-hallucination protocol.

    Avoid the opposite trap too: don't write "Answer ONLY from the base." The agent would lose the ability to greet, ask for the patient's name, or book an appointment. The base covers the FAQ; the prompt covers the conversation. That split is what separates a rigid robot from a useful AI voice agent.

    Step 5 — Test and wire the update loop

    Run ten test calls covering the most frequent questions — for our clients, we pull the list straight from conversation tagging, which already isolates recurring topics. For each call, note: is the answer correct, complete, in good French? If not, did the relevant chunk even exist in the source document?

    The file document updates release ElevenLabs shipped on May 12, 2026, changes the maintenance loop. Before, editing a document meant deleting and re-uploading — losing the ID, re-wiring the agent reference, and waiting for a full re-index. Now, a PATCH /v1/convai/knowledge-base/document/{doc_id} replaces the content while keeping the ID. The index recomputes in the background. For a dental clinic that updates its fee schedule every insurance hike, it's the equivalent of keeping the same book, just with reprinted pages.

    Wire the typed RAG chunk listing (the other May 12 update) into an internal dashboard. GET /v1/convai/knowledge-base/document/{doc_id}/chunks now returns clean JSON: chunk ID, content, position in the document, embedding score. For a SMB that already wired MCP to its CRM, this is trivial to ingest — and it lets you see, in real time, which chunks the agent retrieves most often. You know which section of your FAQ gets the most traffic, and therefore which one to refine first.

    What about cost?

    The question comes up at every consultation: how much does this cost? For a Quebec SMB in May 2026, the math is simpler than people expect. The knowledge base itself is included in the ElevenLabs agent plan — no per-byte storage surcharge. What costs you is inference: every time the agent retrieves chunks and injects them into the model's context, you pay a few extra tokens per call. For a dental clinic taking 200 calls a month, the bill lands somewhere between $18 and $25 a month. Compare that to the 14 to 19 hours the receptionist used to spend repeating the same answers — that's the order of magnitude TECHMA uses to size ROI for clients.

    Quick honest caveat: the math changes if you leave max document chunks at 10 or more, or if your base holds redundant documents. That's precisely what we fix in the post-deployment audit — the second wave, generally between day 14 and day 21 after going live. It's also the moment we tag low-confidence answers and feed them back into the knowledge base, closing the loop the way a real subject-matter expert would.

    One more thing worth saying out loud: this tutorial is the conceptual map. The actual integration — the API calls, the indexing checks, the prompt edits, the test calls, the Loi 25 audit on every document — is what TECHMA's team handles for the SMB. We don't sell self-service. We deliver the wired-up result, with the documentation that lets your receptionist edit the knowledge base herself afterward.

    90 minutes, and your FAQ answers itself

    Recap. A clean .md (Step 1), an upload (Step 2), three settings — embedding model, max chunks, vector distance (Step 3), four lines in the prompt (Step 4), ten test calls plus the update loop (Step 5). 90 minutes the first time, 15 minutes per update after.

    The next layer, which we'll cover in a separate tutorial, is smart routing: when the AI voice agent detects the base doesn't cover the question, it escalates to a human — but not just any human. The right human. With the right context. Without repeating the call history. That's where TECHMA spends time with clients, because the agent-to-human handoff is the seam where 67% of Quebec SMBs abandon their AI voice agent at the 30-day mark.

    If you'd like us to look at your current FAQ — the one in the receptionist's drawer or in a shared Google Drive — and quantify how much time it could win back every week, take 20 minutes with a TECHMA team member. No charge for the conversation. We'll tell you straight whether RAG is the right tool for your case, or whether the lever to pull is somewhere else.

    Share