Meta tags:
description= Learn how to configure and use the query tool to enhance your AI assistants with custom knowledge bases.;
Headings (most frequently used words):
the, using, query, tool, option, knowledge, for, bases, step, dashboard, recommended, api, to, configuration, your, assistant, base, what, is, how, configure, advanced, options, best, practices, benefits, of, upload, files, create, attach, multiple, description, system, prompt, integration, custom,
Text of the page (most frequently used words):
the (68), tool (60), #knowledge (39), your (34), query (34), assistant (24), custom (20), and (19), call (19), for (18), using (18), you (17), api (17), quickstart (17), base (15), bases (15), tools (14), support (13), vapi (13), information (12), configuration (12), file (12), option (12), system (11), use (11), product (11), dashboard (11), when (10), description (10), with (9), server (9), files (9), prompt (9), name (9), search (9), configure (8), documentation (8), openai (8), step (8), calls (8), create (7), can (7), examples (7), model (7), data (7), upload (7), voice (7), management (7), overview (7), retrieval (6), page (6), troubleshooting (6), contains (6), google (6), assistants (6), recommended (6), web (6), this (5), about (5), need (5), integration (5), specific (5), what (5), provider (5), select (5), that (5), how (5), speech (5), phone (5), sip (5), best (4), practices (4), ensure (4), after (4), accuracy (4), add (4), instructions (4), any (4), billing (4), from (4), content (4), messages (4), guide (4), multiple (4), advanced (4), via (4), header (4), attach (4), ids (4), plan (4), voices (4), chat (4), rejection (4), multilingual (4), scheduling (4), handoff (4), sms (4), streaming (4), troubleshoot (4), number (4), cli (4), new (4), built (3), control (3), test (3), update (3), help (3), users (3), code (3), technical (3), questions (3), pricing (3), ask (3), are (3), must (3), instruct (3), field (3), fileids (3), guides (3), details (3), authorization (3), bearer (3), your_api_key (3), https (3), location (3), curl (3), alternatively (3), click (3), navigate (3), type (3), based (3), understanding (3), static (3), compliance (3), authentication (3), enterprise (3), testing (3), agents (3), triage (3), squads (3), widget (3), errors (3), voicemail (3), hooks (3), sdk (3), inbound (3), transcriber (3), variables (3), llms (3), next (2), own (2), helpful (2), steps (2), enhance (2), user (2), queries (2), performance (2), clear (2), structured (2), always (2), include (2), understand (2), descriptive (2), names (2), topics (2), subscription (2), plans (2), find (2), features (2), specifications (2), relevant (2), function (2), customer (2), accurate (2), before (2), explicitly (2), not (2), feature (2), knowledgebases (2), single (2), options (2), see (2), below (2), patch (2), request (2), toolids (2), will (2), want (2), creating (2), comprehensive (2), service (2), company (2), offerings (2), form (2), responses (2), response (2), access (2), benefits (2), retrieve (2), status (2), website (2), consent (2), recording (2), deepgram (2), azure (2), cartesia (2), playht (2), elevenlabs (2), core (2), models (2), faq (2), ivr (2), navigation (2), environments (2), dev (2), uat (2), prod (2), debugging (2), prompting (2), boards (2), developing (2), locally (2), spam (2), events (2), setting (2), urls (2), webhooks (2), property (2), order (2), clinic (2), passing (2), between (2), lead (2), qualification (2), appointment (2), migrate (2), variable (2), substitution (2), session (2), compatibility (2), non (2), end (2), reasons (2), forwarding (2), transfer (2), outbound (2), telnyx (2), twilio (2), telephony (2), free (2), agent (2), tts (2), keywords (2), argument (2), encryption (2), aliases (2), client (2), side (2), fallback (2), background (2), configurations (2), composer (2), introduction (2), integrations (2), pre (2), release (2), sdks (2), mcp (2), reference (2), index (2), level (2), txt (2), implement, full, over, document, previous, edit, yes, was, following, these, effectively, making, more, informative, responsive, optimal, keep, individual, under, 300kb, they, contain, well, various, retrieves, correctly, thoroughly, refresh, changes, regularly, explicit, clearly, their, purpose, separate, distinct, improve, organize, topic, docs, most, current, example, replace, actual, products, our, providing, answers, role, naming, its, alone, sufficient, know, important, should, explain, procedures, problem, resolution, detailed, descriptions, within, adding, attaching, also, array, don, forget, entire, object, just, overwrite, existing, 9441840b, 6f2f, 4b0f, a0fc, de8512549a0c, gpt, temperature, assistant_id, save, publish, dropdown, section, helps, particular, make, ef82ae15, 21b2, 47bd, bde4, dea3922c1e49, 41a2bd44, d13c, 4914, bbf7, b19807dd2cf4, application, json, uploaded, references, uploading, receive, path_to_your_file, wait, complete, note, generated, computer, choose, different, domains, customizable, verified, rather, than, general, improved, answer, domain, enhanced, contextual, powerful, allows, configuring, enable, provide, contextually, learn, copy, scroll, top, light, tcpa, guidelines, addresses, proxy, pci, zero, retention, zdr, hipaa, gdpr, jwt, sign, sso, flow, rss, feed, glossary, report, issues, sympana, connector, voiceaiwrapper, voicerr, vapify, chatdash, voiceflow, langfuse, supabase, cloudflare, gcp, cloud, storage, aws, assemblyai, talkscriber, soniox, speechmatics, gladia, openrouter, togetherai, perplexity, deepinfra, groq, gemini, anthropic, bedrock, inworld, rimeai, minimax, lmnt, legacy, migration, text, suites, silent, handoffs, routing, commerce, medical, artifacts, analysis, concurrency, queue, debug, drops, hold, specialist, dynamic, transfers, warm, detection, join, timeout, real, time, websocket, transport, codes, trunk, credential, amazon, chime, plivo, zadarma, networking, firewall, trunking, escalation, calling, bring, fine, tuned, gohighlevel, slack, sheets, calendar, latency, cost, metrics, presets, keys, realtime, pipeline, email, address, reading, pronunciation, dictionaries, denoising, idle, flush, syntax, formatting, personalization, transient, permanent, legal, security, privacy, community, works, resources, monitoring, scorecard, outputs, simulations, evals, observability, workflows, campaigns, insights, place, numbers, external, intelligence, conversation, behavior, concepts, get, started, available, root, append, url, markdown, version,
Text of the page (random words):
using the query tool for knowledge bases vapi for ai agents a documentation index is available at the root level at llms txt append llms txt to any url for a page level index or md for the markdown version of any page search ask ai website status support dashboard documentation api reference mcp sdks cli new what s new documentation api reference mcp sdks cli new what s new get started introduction phone calls web calls vapi guides composer pre release cli quickstart assistants quickstart core concepts conversation behavior model configurations model intelligence tools built in call tools voicemail tool custom tools code tool client side tools web sdk tool rejection plan static variables and aliases custom tools troubleshooting handoff tool external tools knowledge retrieval query tool custom knowledge base argument encryption custom keywords custom voices custom transcriber custom tts custom llms examples phone numbers free vapi number inbound sms telephony integrations sip integration phone number hooks calls place calls in call control call end reasons troubleshoot call errors call insights outbound campaigns quickstart overview chat quickstart streaming non streaming openai compatibility session management variable substitution sms chat web widget workflows migrate to squads quickstart overview examples squads quickstart overview handoff tool passing data between assistants examples webhooks setting server urls server events spam call rejection developing locally server authentication observability evals simulations pre release boards structured outputs scorecard monitoring best practices prompting guide debugging voice agents enterprise environments dev uat prod ivr navigation testing resources faq how vapi works integrations community support security and privacy legal introduction phone calls web calls vapi guides composer cli quickstart quickstart transient vs permanent configurations variables multilingual support personalization with user information voice formatting plan flush syntax background messages idle messages assistant hooks background speech denoising pronunciation dictionaries email address reading speech configuration voice pipeline configuration voice fallback configuration transcriber fallback configuration openai realtime speech to speech provider keys overview model presets performance metrics understanding cost understanding latency tools built in call tools voicemail tool custom tools code tool client side tools web sdk tool rejection plan static variables and aliases custom tools troubleshooting google calendar google sheets slack gohighlevel knowledge retrieval query tool custom knowledge base argument encryption custom keywords custom voices elevenlabs playht cartesia custom transcriber custom tts fine tuned openai models bring your own server tool calling integration appointment scheduling lead qualification inbound support voice widget documentation agent support escalation multilingual agent free vapi number inbound sms twilio telnyx sip telephony sip trunking networking and firewall twilio telnyx zadarma plivo amazon chime sdk troubleshoot sip trunk credential errors troubleshoot sip response codes phone number hooks calls outbound calls websocket transport real time call control customer join timeout voicemail detection call forwarding assistant based warm transfer dynamic call transfers on hold specialist transfer debug forwarding drops call queue management call concurrency call end reasons troubleshoot call errors call analysis call recording retrieve call artifacts quickstart overview quickstart streaming non streaming openai compatibility session management variable substitution sms chat web widget migrate to squads quickstart overview appointment scheduling lead qualification medical triage order management property management multilingual support quickstart overview handoff tool passing data between assistants clinic triage scheduling handoff tool clinic triage scheduling e commerce order management property management routing multilingual support silent handoffs webhooks setting server urls server events spam call rejection developing locally server authentication quickstart advanced quickstart advanced boards quickstart examples quickstart quickstart prompting guide debugging voice agents enterprise environments dev uat prod ivr navigation test suites chat testing voice testing faq core models voices text to speech vapi voices legacy migration elevenlabs playht azure openai cartesia lmnt minimax rimeai deepgram inworld openai azure openai anthropic bedrock gemini groq deepinfra perplexity togetherai openrouter deepgram google gladia speechmatics soniox talkscriber assemblyai aws s3 gcp cloud storage cloudflare r2 supabase langfuse voiceflow chatdash vapify voicerr ai voiceaiwrapper sympana connector support how to report issues enterprise glossary rss feed data flow single sign on sso jwt authentication recording consent plan gdpr compliance hipaa compliance zero data retention zdr pci compliance proxy server guide static ip addresses tcpa consent guidelines website status support dashboard light on this page what is the query tool benefits of using the query tool how to configure a query tool for knowledge bases step 1 upload your files option 1 using the dashboard recommended option 2 using the api step 2 create a query tool option 1 using the dashboard recommended option 2 using the api step 3 attach the query tool to your assistant option 1 using the dashboard recommended option 2 using the api advanced configuration options multiple knowledge bases knowledge base description assistant system prompt integration best practices for query tool configuration scroll to top assistants tools knowledge retrieval using the query tool for knowledge bases copy page learn how to configure and use the query tool to enhance your ai assistants with custom knowledge bases what is the query tool the query tool is a powerful feature that allows your ai assistant to access and retrieve information from custom knowledge bases by configuring a query tool with specific file ids you can enable your assistant to provide accurate and contextually relevant responses based on your custom data benefits of using the query tool enhanced contextual understanding your assistant can access specific knowledge to answer domain specific questions improved response accuracy responses are based on your verified information rather than general knowledge customizable knowledge retrieval configure multiple knowledge bases for different topics or domains how to configure a query tool for knowledge bases step 1 upload your files before creating a query tool you need to upload the files that will form your knowledge base option 1 using the dashboard recommended navigate to files in your vapi dashboard click upload file or choose file select the files you want to upload from your computer wait for the upload to complete and note the file ids that are generated option 2 using the api alternatively you can upload files via the api curl location https api vapi ai file header authorization bearer your_api_key form file path_to_your_file after uploading you ll receive file ids that you ll need for the next step step 2 create a query tool create a query tool that references your knowledge base files option 1 using the dashboard recommended navigate to tools in your vapi dashboard click create tool select query as the tool type configure the tool tool name product query knowledge bases add your knowledge base with name product kb description contains comprehensive product information service details and company offerings file ids select the files you uploaded in step 1 option 2 using the api alternatively you can create the tool via api curl location https api vapi ai tool header content type application json header authorization bearer your_api_key data type query function name product query knowledgebases provider google name product kb description contains comprehensive product information service details and company offerings fileids 41a2bd44 d13c 4914 bbf7 b19807dd2cf4 ef82ae15 21b2 47bd bde4 dea3922c1e49 the description field in the knowledge base configuration helps your assistant understand when to use this particular knowledge base make it descriptive of the content step 3 attach the query tool to your assistant after creating the query tool you need to attach it to your assistant option 1 using the dashboard recommended navigate to assistants in your vapi dashboard select the assistant you want to configure go to the tools section click add tool and select your query tool from the dropdown update the system prompt to instruct when to use the tool see examples below save and publish your assistant option 2 using the api alternatively you can attach the tool via api using the tool id curl location request patch https api vapi ai assistant assistant_id header authorization bearer your_api_key data model temperature 0 2 provider openai model gpt 4o toolids 9441840b 6f2f 4b0f a0fc de8512549a0c when using the patch request you must include the entire model object not just the toolids field this will overwrite any existing model configuration don t forget after attaching the tool via api you must also update your assistant s system prompt in the messages array to instruct when to use the tool by name see the system prompt examples below adding a query tool to your assistant advanced configuration options multiple knowledge bases you can configure multiple knowledge bases within a single query tool 1 knowledgebases 2 3 provider google 4 name product documentation 5 description contains detailed product specifications feature descriptions and technical details 6 fileids file id 1 file id 2 7 8 9 provider google 10 name troubleshooting guide 11 description contains troubleshooting guides support procedures and problem resolution steps 12 fileids file id 3 file id 4 13 14 knowledge base description the description field should explain what content the knowledge base contains 1 description contains pricing information subscription plans and billing documentation assistant system prompt integration important you must explicitly instruct your assistant in its system prompt about when to use the query tool the knowledge base description alone is not sufficient for the assistant to know when to search add clear instructions to your assistant s system messages explicitly naming the tool 1 2 role system 3 content you are a helpful customer support assistant when users ask about products pricing features or need troubleshooting help use the knowledge search tool to search our knowledge base for accurate information always call the knowledge search tool before providing answers to ensure accuracy 4 be specific replace knowledge search with your actual tool s function name from the query tool configuration example system prompt instructions with specific tool names product support when users ask about product features specifications or troubleshooting use the product support search tool to find relevant information billing questions for any questions about pricing billing or subscription plans use the billing query tool to find the most current information technical documentation when users need api documentation code examples or integration help use the api docs search tool to search the technical knowledge base best practices for query tool configuration organize by topic create separate knowledge bases for distinct topics to improve retrieval accuracy use descriptive names name your knowledge bases clearly to help your assistant understand their purpose include system prompt instructions always add explicit instructions to your assistant s system prompt about when to use the query tool update regularly refresh your knowledge bases as information changes to ensure accuracy test thoroughly after configuration test your assistant with various queries to ensure it retrieves information correctly for optimal performance keep individual files under 300kb and ensure they contain clear well structured information by following these steps and best practices you can effectively configure the query tool to enhance your ai assistant with custom knowledge bases making it more informative and responsive to user queries was this page helpful yes no edit this page previous custom knowledge base create and implement your own knowledge base server for full control over document retrieval next built with
|