Skip to main content

Knowledge Base for Bots

The Knowledge Base (KB) is what makes an AI Assistant useful. Without KB content, the Assistant only has its personality prompt and the LLM's general training data to draw on; with a well-curated KB it can answer specific, up-to-date questions about your product, policies, and workflows.

This page focuses on how to organize KB content for bots. For the API reference (search endpoints, document CRUD, scopes), see the Knowledge Base API guide.

How KB search works

Every KB folder is a separate Vertex AI RAG corpus. When an Assistant runs a query:

  1. It searches each attached folder in parallel via vector similarity.
  2. The top chunks across all folders are merged, deduplicated, and reranked by distance (lower = more relevant).
  3. The merged context is sent to Gemini, which generates a grounded reply citing the chunks it used.
  4. A confidence score is computed from the chunks' relevance and the LLM's grounding agreement.

The Assistant compares that confidence to the bot's confidence_threshold. Above threshold → reply. Below threshold → escalate (or refuse, in KB-only mode).

Folder strategy

System folders

Every tenant starts with three system folders:

FolderPurpose
GeneralCatch-all for documents, FAQs, and manuals you upload directly.
WebsitesAuto-populated by the website crawler. One folder regardless of how many domains you crawl.
Ticket SummariesAuto-generated summaries of resolved support tickets (when ticket-summarization is enabled in your workspace settings).

You can attach any combination of these to an Assistant.

Custom folders — when to split

Create a custom folder when you want isolation between content sets. Common reasons:

  • Per-product — separate folders for Product A and Product B so a sales Assistant for Product A never accidentally cites Product B's pricing.
  • Per-language — one folder per locale, attached to the language-specific Assistant.
  • Per-audience — internal-only knowledge (KB_internal) separate from customer-facing knowledge (KB_external).
  • Per-region — region-specific policies, hours, or compliance docs.
tip

Don't over-split. Each folder is a separate corpus and a separate parallel vector search. 2–4 folders attached to a bot is fine; 20 is wasteful and slower.

Supported content types

TypeHow to addBest for
PDFUpload via dashboard or POST /knowledge-base/documentsProduct manuals, policy docs, brochures
DOCXUploadInternal SOPs, longer-form articles
TXT / MDUpload or pasteSnippets, READMEs, release notes
FAQ (text entry)"Add FAQ" button — title + answer pairsFrequently asked questions you've answered manually
Manual (text entry)"Add Manual" button — longer free-textHow-to guides written directly in the dashboard
Website crawl"Crawl website" — supply a URL, optional sitemapPublic marketing site, public help center

What works well

  • Short, focused chunks. A 500–1500-word doc on a single topic outperforms a 50-page doc covering ten things.
  • Clear titles. "Return policy for electronics" > "policy_v3_FINAL.pdf".
  • Real customer questions. If you've answered the same question in support 20 times, write it as an FAQ.
  • Up-to-date content. Stale info will be retrieved and confidently cited — set a recrawl schedule (below) and prune obsolete docs quarterly.

What works poorly

  • Image-heavy PDFs (slide decks, infographics). The crawler extracts text but loses the visual context.
  • Login-gated pages. The crawler runs unauthenticated; it can only see public URLs.
  • Spreadsheets. Tabular data doesn't chunk well — convert key tables into Markdown manually if you need them.
  • Wikis with stale redirects. Crawl scope creep — set a strict include-prefix.

Website crawls

For a website-crawl folder:

SettingDescription
Start URLThe root URL to crawl from (e.g., https://example.com/help).
Sitemap URLOptional. If supplied, the crawler uses sitemap order; otherwise it does breadth-first link discovery.
Include prefixOnly crawl URLs starting with this prefix. Prevents the crawler from wandering off the help center into your blog.
Recrawl cadencemanual, daily, weekly, monthly. Daily is fine for active docs sites; weekly is the most common choice.

Crawls run in the background. You'll get a Slack/email notification on completion if you've set that up; otherwise the folder page shows a progress bar. Vertex AI imports happen in batches of 25 GCS files per call automatically — you don't manage that.

Multi-bot folder reuse

You can — and should — attach the same KB folder to multiple Assistants. There's no duplication cost: the corpus is shared.

Common pattern:

  • One General folder with company-wide policies.
  • One Websites folder with the public help center.
  • Per-product folders.

Then:

AssistantAttached folders
Support ENGeneral, Websites, Product-A
Sales ENGeneral, Websites, Product-A
Support DEGeneral, Websites-DE, Product-A-DE

The bot list view shows a "Used by N bots" badge per folder so you can see reuse at a glance.

Recrawl & freshness

  • Documents you uploaded are static. To update them, edit and re-upload (replaces the previous version).
  • FAQs and manuals are edited in place.
  • Website crawls refresh on the schedule you set. The first crawl indexes everything; subsequent crawls only re-import pages whose etag / last-modified indicates a change.
warning

Avoid setting daily recrawls on huge sites unless you genuinely change them daily. Each crawl consumes bandwidth and Vertex AI ingest quota.

Cost & billing

KB queries are billed per bot interaction, not per chunk retrieved. See the Knowledge Base API guide for the price table.

What's next