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

# Knowledge Base

> Give your telli agent access to your own documents so it can answer questions using your specific information during calls.

The knowledge base gives your telli agent access to your own documents so it can **answer questions using your specific information** during calls. Instead of relying only on its system prompt, the agent can search through your uploaded files in real time to find accurate answers.

Think of it as giving your agent a reference manual it can flip through mid-conversation. When a caller asks something that's covered in your documents, the agent will look it up and respond with the right information.

## Quick Start

<Steps>
  <Step title="Create a knowledge base and upload your files">
    Go to **Knowledge Base** in the sidebar navigation, click **Create**, give your knowledge base a name, and upload up to 5 files (PDF, Word, TXT, or Markdown).

    <video loop muted playsInline style={{ width: '100%', cursor: 'pointer' }} onMouseEnter={(e) => e.currentTarget.play()} onMouseLeave={(e) => { e.currentTarget.pause(); e.currentTarget.currentTime = 0; }}>
      <source src="https://mintcdn.com/telli/oSe6yooA3Hku5xB9/onboarding-media/advanced_knowledge_base/KB_01_create.mp4?fit=max&auto=format&n=oSe6yooA3Hku5xB9&q=85&s=aa4db0002b4cbc7fe2bcf712005d01ed" type="video/mp4" data-path="onboarding-media/advanced_knowledge_base/KB_01_create.mp4" />
    </video>
  </Step>

  <Step title="Wait for processing">
    Your knowledge base will process your documents (usually takes less than a few minutes)
  </Step>

  <Step title="Integrate your knowledge base into your agent">
    Go to **Agent Settings** → **Knowledge Base** section, select your knowledge base, and save.

    <video loop muted playsInline style={{ width: '100%', cursor: 'pointer' }} onMouseEnter={(e) => e.currentTarget.play()} onMouseLeave={(e) => { e.currentTarget.pause(); e.currentTarget.currentTime = 0; }}>
      <source src="https://mintcdn.com/telli/oSe6yooA3Hku5xB9/onboarding-media/advanced_knowledge_base/KB_02_insert.mp4?fit=max&auto=format&n=oSe6yooA3Hku5xB9&q=85&s=c484356f1a677b9e38123db99d73b78c" type="video/mp4" data-path="onboarding-media/advanced_knowledge_base/KB_02_insert.mp4" />
    </video>
  </Step>
</Steps>

***

<Tabs>
  <Tab title="What Can You Use It For?">
    * **FAQs & company info:** Upload your frequently asked questions so the agent handles common inquiries accurately
    * **Product details & pricing:** Give the agent access to your catalog so it can answer specific product questions
    * **Policies & procedures:** Upload return policies, terms of service, or internal procedures
    * **Service descriptions:** Detailed descriptions of your services that are too long for the system prompt
    * **Any reference material:** Anything you'd want a human employee to have on their desk while taking calls

    **Example:** You upload your company's FAQ document, product catalog, or pricing sheet. When a caller asks *"What are your opening hours?"* or *"How much does the premium plan cost?"*, your agent searches the knowledge base and gives the correct answer straight from your own documents.
  </Tab>

  <Tab title="Supported File Types & Limits">
    | **Format** | **Extension** |
    | :--------- | :------------ |
    | PDF        | **`.pdf`**    |
    | Word       | **`.docx`**   |
    | Plain Text | **`.txt`**    |
    | Markdown   | **`.md`**     |

    |                               | **Limit**                                  |
    | :---------------------------- | :----------------------------------------- |
    | **Files per knowledge base**  | Up to 5                                    |
    | **File size**                 | Up to 20 MB per file                       |
    | **Total content**             | Approximately 1,500 pages across all files |
    | **Knowledge bases per agent** | 1                                          |
  </Tab>

  <Tab title="How It Works During a Call">
    1. **A caller asks a question** that the agent thinks might be answered in the knowledge base
    2. **The agent automatically decides** to search the knowledge base. You can also call `@searchKnowledgeBase` to make it clearer for the agent when to use the knowledge base
    3. **While searching**, the agent says a short in-progress message you can customize per agent (e.g., *"Let me check that for you"*)
    4. **The agent finds relevant information** and responds with an answer based on your documents
    5. **The search happens in real time** and typically takes just a couple of seconds

    The agent uses two search methods behind the scenes, **semantic search** (understanding the meaning of the question) and **keyword search** (matching specific terms), to find the most relevant information from your documents.
  </Tab>
</Tabs>

***

## Advanced Knowledge Base Capabilities

Most agents work well with the defaults. If you want to fine-tune how your documents are split and retrieved, expand the **Advanced Configuration** section on a knowledge base to adjust:

<video loop muted playsInline style={{ width: '100%', cursor: 'pointer' }} onMouseEnter={(e) => e.currentTarget.play()} onMouseLeave={(e) => { e.currentTarget.pause(); e.currentTarget.currentTime = 0; }}>
  <source src="https://mintcdn.com/telli/yTwqc2QbhCfx6_2_/onboarding-media/advanced_knowledge_base/KB_03_Advanced.mp4?fit=max&auto=format&n=yTwqc2QbhCfx6_2_&q=85&s=fe176b5ca045107027b8ec3120cffb8c" type="video/mp4" data-path="onboarding-media/advanced_knowledge_base/KB_03_Advanced.mp4" />
</video>

| **Setting**               | **What it controls**                                                                                                                                  | **Default** | **Range**   |
| :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :---------- | :---------- |
| **Chunk size**            | Maximum characters per chunk when splitting documents. Larger chunks keep more context together, smaller chunks make individual matches more precise. | 1000        | 200 to 8000 |
| **Chunk overlap**         | Characters shared between consecutive chunks to preserve context across chunk boundaries.                                                             | 200         | 0 to 2000   |
| **Max retrieval results** | Number of chunks the agent retrieves per search. More chunks give the agent more context, but can dilute the final answer.                            | 10          | 1 to 20     |

<Tip>
  Start with the defaults. Only tune these if you notice the agent missing relevant info (try a larger chunk size or more retrieval results) or pulling in irrelevant content (try a smaller chunk size or fewer retrieval results).
</Tip>

***

## Set up your knowledge base with Charlie

You don't have to wire up the knowledge base by hand. Once you've created one, [Charlie](/cookbooks/charlie/overview), the AI assistant in the Agent Builder, can attach it to your agent and adjust its behavior for you. Charlie can't create the knowledge base itself, so create it first under **Knowledge Base** in the sidebar.

<Note>
  * Attach an existing knowledge base to the agent
  * Adjust the in-progress message the agent says while it searches
  * Tune the advanced configuration (chunk size, overlap, retrieval results)
</Note>

***

## Best Practices

* **Keep documents focused:** A document about one topic works better than a massive document covering everything.
* **Use clear headings:** Especially in `.md` and `.docx` files, headings help telli break up the content into searchable sections.
* **Be explicit:** Write your documents the way you'd want someone to answer the phone. If the answer to *"What are your hours?"* is in your document, make sure it clearly says something like *"Our opening hours are Monday–Friday, 9am–5pm"*.
* **Update when things change:** If your pricing, policies, or hours change, update the files in your knowledge base so the agent always has current information.
* **Use the right format:** PDFs work great for existing documents. Markdown or plain text is ideal if you're writing content specifically for the agent.

***

## Good to Know

* The knowledge base is processed once when you create or update it, so there's no ongoing delay on every call
* The agent decides on its own when to search the knowledge base. You don't need to configure specific trigger phrases
* If the agent can't find relevant information in the knowledge base, it will fall back to its general knowledge and system prompt
* Processing status is shown on the knowledge base card. You'll see a spinner while it's being processed, and an error indicator if something went wrong

<Note>
  Explicitly instruct the agent when to use `@searchKnowledgeBase` in your prompt to have more control over when the agent is using the KB.
</Note>
