# Knowledge Bases

Knowledge bases let the agent search through your uploaded documents and reference materials to find relevant information. Whether it's product catalogues, policy documents, technical manuals, or historical data — if it's in a knowledge base, the agent can find and use it.

### How the Agent Uses Knowledge Bases

When a knowledge base is available (either directly in the project or through a skill), the agent can query it using vector search. This means:

* The agent searches by **meaning**, not just keywords — asking about "delivery timelines" will find content about "shipping schedules" even if those exact words aren't used.
* Results are **ranked by relevance** and the agent uses the most relevant content to inform its response.
* The agent **cites its sources** so you can verify where information came from.

### Adding Knowledge Bases to the Agent

Knowledge bases are made available to the agent through skills:

1. Open or create a skill
2. Add a knowledge base as a component
3. Upload documents or select an existing knowledge base

For details on creating and managing knowledge bases themselves, see [Knowledge Bases](/platform/knowledge-bases.md) in the Platform section.

### What to Put in a Knowledge Base

Knowledge bases work best with:

* **Reference documents** — Product specs, pricing lists, policy documents, SOPs
* **Historical data** — Past orders, reports, templates
* **Domain knowledge** — Industry standards, regulatory requirements, technical manuals
* **FAQs and guides** — Common questions and their answers

#### Supported Document Types

* PDF (including scanned documents with OCR)
* Word documents (.docx)
* Spreadsheets (CSV, .xlsx)
* JSON, XML
* HTML
* Plain text

### Knowledge Bases in Skills

A skill can include one or more knowledge bases as components. This is the recommended approach because:

* The knowledge base is **scoped to the skill's purpose** — the agent queries it in the right context
* You can **version and manage** knowledge alongside the skill's instructions
* Different skills can use **different knowledge bases** for different tasks

For example, an order processing skill might include a product catalogue knowledge base, while a customer support skill might include a FAQ knowledge base.

### Tips

* **Keep knowledge bases focused.** A smaller, relevant knowledge base performs better than a large, general one.
* **Update regularly.** If your reference data changes (new pricing, updated policies), update the knowledge base so the agent has current information.
* **Use descriptive document names.** This helps both you and the agent understand what's in the knowledge base.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lleverage.ai/operator-agent/knowledge-bases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
