> ## Documentation Index
> Fetch the complete documentation index at: https://noorle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base Overview

> Create and manage knowledge bases for RAG. Store documents and search with semantic understanding.

Knowledge bases enable agents and gateways to search through documents using semantic (meaning-based) search, not just keywords.

## What is a Knowledge Base?

A knowledge base stores:

* Documents (PDF, Word, text, etc.)
* Converted to vector embeddings
* Indexed for fast semantic search
* Retrieved for RAG augmentation

Documents automatically chunked, embedded, and searchable.

## Creating a Knowledge Base

<Steps>
  <Step title="Navigate to Knowledge">
    **Knowledge** > **Create Knowledge Base**
  </Step>

  <Step title="Basic Info">
    * **Name**: "Product Docs"
    * **Description**: "Official product documentation"
    * Click **Create**
  </Step>

  <Step title="Upload Documents">
    Click **Upload Documents**:

    * Select files (PDF, DOCX, TXT, etc.)
    * Set metadata if needed
    * Documents processed automatically
  </Step>

  <Step title="Configure">
    * Choose embedding model
    * Set search parameters
    * Enable reranking (optional)
  </Step>

  <Step title="Test">
    Use **Test Search** to try queries before using in agents.
  </Step>

  <Step title="Attach to Agent/Gateway">
    Open Knowledge Retrieval capability, link knowledge base.
  </Step>
</Steps>

## Knowledge Base Features

* **Semantic Search** - Understand meaning, not just keywords
* **Multi-document** - Search across many files
* **Automatic Chunking** - Documents split intelligently
* **Vector Embeddings** - Math-based document representation
* **Reranking** - LLM refines search results
* **Metadata** - Tags, dates, sources attached

## Supported Document Types

| Format   | Support |
| -------- | ------- |
| PDF      | ✓       |
| DOCX     | ✓       |
| TXT      | ✓       |
| Markdown | ✓       |
| JSON     | ✓       |
| XLSX     | ✓       |
| HTML     | ✓       |

## Usage in Agents

When agent has Knowledge Retrieval attached:

**Agent:** "What's our return policy?"

**Process:**

1. Query embedded to vectors
2. Similar documents retrieved
3. Top matches injected into prompt
4. Agent responds with context

**Result:** Accurate, sourced answers

## Embedding Models

Choose model based on needs:

| Model  | Dimensions | Best For    |
| ------ | ---------- | ----------- |
| small  | 1536       | General     |
| large  | 3072       | Nuanced     |
| custom | Variable   | Specialized |

## Search Modes

### Semantic

Find by meaning:

```
Query: "How do I reset password?"
Matches: password reset, account access, authentication
```

### Keyword

Find by exact words:

```
Query: "password"
Matches: pages containing "password"
```

### Hybrid

Combination of both.

## Vector Database

Vectors stored in the vector database:

* Fast similarity search
* Distributed storage
* Automatic indexing

No manual configuration needed.

## Limits

| Limit                   | Value          |
| ----------------------- | -------------- |
| Docs per knowledge base | 10,000         |
| Total embeddings        | 1M per account |
| Doc size                | 100MB          |
| Search results          | 20 (top)       |

## Cost

For current pricing details, see [Pricing](https://noorle.com/pricing/).

## How Agents Access Knowledge

There are two ways to connect agents to your knowledge bases:

### Attach Knowledge Base Directly (Automatic RAG)

Configure `knowledge_base_ids` on your agent. The platform automatically retrieves relevant documents at the start of each conversation turn and injects them into the agent's context.

**Best for:** Agents that always need access to specific documentation (support bots, FAQ assistants, domain experts).

### Attach Knowledge Retrieval Capability (On-Demand Tool)

Attach the **Knowledge Retrieval** built-in capability to your agent. This gives the agent `search`, `get_by_id`, and `list` tools that it calls when it decides it needs to look something up.

**Best for:** General-purpose agents that only sometimes need knowledge lookups, or agents that should control when and what they search.

You can combine both approaches — automatic context from attached KBs plus on-demand searches via the capability tool.

See [Knowledge Bases & RAG](/docs/learn/concepts/knowledge-and-rag) for a detailed conceptual overview.

## Next Steps

* [Upload Documents](/docs/run/knowledge/uploading-documents)
* [Vector Search](/docs/run/knowledge/vector-search)
* [Reranking](/docs/run/knowledge/reranking)
* [Knowledge Retrieval Capability](/docs/run/capabilities/knowledge-retrieval)
