> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# Knowledge Base

> Give your agents accurate, domain-specific knowledge.

A **Knowledge Base** is a collection of documents your agent can reference during conversations. Instead of relying solely on the LLM's training data, agents with a knowledge base provide answers grounded in *your* information.

## Why Knowledge Bases Matter

LLMs are powerful but imperfect. They hallucinate facts, go out of date, and know nothing about your specific business. Knowledge bases solve this.

| Problem           | Solution                                                        |
| ----------------- | --------------------------------------------------------------- |
| **Hallucination** | Agent answers from verified documents, not imagination          |
| **Stale data**    | Update your KB anytime; agent always has current info           |
| **Domain gaps**   | Upload product specs, policies, FAQs—whatever your domain needs |
| **Consistency**   | Every agent using the same KB gives the same answers            |

## How It Works

When a user asks a question:

1. The agent searches the knowledge base for relevant content
2. Matching passages are injected into the LLM context
3. The agent responds using this grounded information

This is called **Retrieval-Augmented Generation (RAG)**—your agent retrieves before it generates.

***

## Use Cases

* **Product Support** — Upload manuals, troubleshooting guides, warranty policies. Agents answer product questions accurately.
* **Sales Enablement** — Add pricing sheets, feature comparisons, objection handlers. Agents sell with confidence.
* **HR & Onboarding** — Store employee handbooks, benefits info, org charts. New hire questions handled instantly.
* **Legal & Compliance** — Include policies, regulations, approved language. Agents stay within bounds.

***

## Key Concepts

### One Agent, One KB

Each agent can link to one knowledge base via the `globalKnowledgeBaseId` field. This becomes the default source for all conversations with that agent.

### KB Independence

Knowledge bases exist independently of agents. You can:

* Create a KB first, then link agents later
* Reuse one KB across multiple agents
* Update KB content without touching agent configuration

### Document Types

Currently supported:

* **PDF files** (preferred) via the upload endpoint
* **URL scraping** (fetch and ingest page content)
* **Text content** (when the text upload endpoint is deployed, will be available soon)

***

## What's Next

#### [Usage Guide](/voice-agents/developer-guide/build/knowledge-base/usage)

Create a knowledge base, upload content, and link it to an agent.