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

# Empower Agents with Knowledge

Enable context-aware responses with RAG-powered retrieval.

## Overview

Knowledge connects your agents to data sources through **Knowledge Tools** — intelligent components that use Search AI's Retrieval-Augmented Generation (RAG) capabilities. Instead of relying solely on the LLM's training data, agents retrieve relevant information from your knowledge bases and incorporate it into responses. Integrated through the **AI for Service** platform, Knowledge Tools enable agents to understand user intent, retrieve relevant content, and generate accurate, business-aware responses in real time.

```
User Question → Semantic Search → Retrieve Relevant Chunks → Augment Prompt → Generate Response
```

## How It Works

The RAG Pipeline:

```mermaid actions={false} theme={null}
flowchart LR
    A["**1. User Query** <br /> 'What's your return policy for electronics?'"]
    B["**2. Query Embedding** <br /> Convert question to vector representation"]
    C["**3. Semantic Search** <br /> Search knowledge base for similar content"] 
    D["**4. Chunk Retrieval** <br /> Return top-k relevant passages from documents"]
    E["**5. Prompt Augmentation** <br /> Inject retrieved chunks as context into agent's prompt"]
    F["**6. Response Generation** <br /> Agent generates grounded, accurate response"]

    A --> B --> C
    D --> E --> F
```

## Key Capabilities

| Capability               | Details                                                                                                                                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Extensive Connectors** | Connect to 100+ data sources: <br />Cloud Storage (Google Drive, OneDrive, Dropbox), <br />Collaboration (Confluence, SharePoint, Notion), <br />Business Apps (Salesforce, Jira, HubSpot), <br />Communication (Slack, Microsoft Teams), <br />Custom Apps |
| **Intelligent Search**   | Hybrid search (keyword + semantic matching), <br /> Multi-vector (weighted embedding strategies), <br />Programmable extraction (custom chunking pipelines)                                                                                                 |
| **Enterprise Security**  | Access control integration, permission-aware retrieval, audit logging                                                                                                                                                                                       |

## Setting Up Knowledge

The **Knowledge** page of your Agentic App provides a structured view of all connected knowledge bases, including their total count, associated agents, and management options from a central location.

### Step 1: Create a Knowledge Tool

Navigate to **Knowledge** in your app and click the **Create Knowledge Base** drop-down. Choose one of the following:

* **Create from existing sources** — Link the Agentic App to an existing Search AI application in the same workspace.
* **Create from scratch** — Create a new Search AI application.

#### Create from Existing Sources

Configure the following details:

* **Knowledge Base Name** — Unique name to identify the knowledge tool in the Agentic App.
* **Description** — Brief summary of the content included. Helps agents determine when to use this knowledge base.
* **Knowledge Sources** — Click *Link Knowledge Source* to select an existing Search AI application from the same workspace.

After selecting the app, set the retrieval configuration:

* **Use Knowledge Base to respond with**:
  * **Chunks** — Returns the top relevant passages from the knowledge base.
  * **Answer** — Returns an answer generated by Search AI.
  * Selecting both returns the generated answer along with the supporting chunks.
* **Meta Filters (Optional)** — Filter retrieved content by metadata. For example, to retrieve only web content:

  ```json theme={null}
  [
    {
      "condition": "AND",
      "rules": [
        {
          "fieldName": "sourceType",
          "fieldValue": ["web"],
          "operator": "contains"
        }
      ]
    }
  ]
  ```

Click **Create** to complete the integration.

#### Create from Scratch

Enter a **Knowledge Base Name** and **Description**, then click **Create**. This creates a new Search AI application in the same workspace. Next, navigate to Search AI to:

* Set extraction strategies
* Ingest content sources
* Set retrieval strategies
* Configure answer generation

### Step 2: Test the Knowledge Tool

Click **Test your knowledge base** and provide input parameters to validate the tool before deployment. The response includes output and detailed logs for troubleshooting, performance analysis, and refining query behavior.

### Step 3: Link to Agent

1. Open your agent configuration.
2. Navigate to **Knowledge**.
3. Select the knowledge tool.
4. Configure retrieval settings.

### Other Operations

* **Delete** — Remove a knowledge tool from the app via the Knowledge page. The underlying Search AI application remains available in the workspace and can be linked to other Agentic Apps.
* **Manage Content** — Use the **Manage Content** option to navigate to the Search AI app and update indexed content or configurations.

## Accessing and Managing Search AI Applications

Click **Search AI** to view and manage all Search AI applications in your workspace. These can be integrated into Agentic Apps as Knowledge Tools. The **Linked Apps** column shows which Agentic Apps use each integration.

To create a new Search AI application from this page:

1. Click **+ New Integration**.
2. Provide a name and description.
3. Click **Manage Content** to open the app in AI for Service and configure it.

To include an integration in your Agentic App, go to the app's Knowledge page and add it.

## Example Scenario

An agent designed to answer questions about a company's products can configure a Knowledge Tool that indexes the company's website using Search AI. When a user asks *"What AI solutions does the company offer?"*, the agent retrieves information directly from the indexed content and delivers an accurate, up-to-date answer.

```mermaid actions={false} theme={null}
flowchart LR
    User(["Query -> <br /> Response <-"])
    Agent["AI Agent"]
    KT["Knowledge Tool"]
    SAI["Search AI"]
    DB[("DB")]
    Web["Web"]
    Files["Files"]

    User <--> Agent
    Agent <--> KT
    KT <--> SAI
    SAI --> DB
    SAI --> Web
    SAI --> Files
```

## Answer Generation Examples

### Extractive

Pull exact quotes from source documents.

```
Question: "What's the return window?"

Retrieved: "Items may be returned within 30 days of purchase."

Answer: "Items may be returned within 30 days of purchase."
        [Source: Return Policy, Section 2.1]
```

### Generative

Synthesize answers using retrieved context.

```
Question: "Can I return opened electronics?"

Retrieved:
- "Electronics have a 15-day return window."
- "Opened items may be subject to restocking fee."
- "Defective items can be returned within warranty period."

Answer: "Yes, you can return opened electronics within 15 days,
        though a restocking fee may apply. If the item is
        defective, you can return it within the warranty period
        without a fee."
```

***

## Best Practices

### Quality Content

* Keep documentation up-to-date
* Use clear, structured writing
* Include relevant metadata

### Appropriate Chunking

| Content Type  | Strategy              | Chunk Size              |
| ------------- | --------------------- | ----------------------- |
| FAQs          | Question-answer pairs | Small (200-300 tokens)  |
| Documentation | Sections/headers      | Medium (400-600 tokens) |
| Long articles | Semantic breaks       | Variable                |

### Retrieval Tuning

* Start with top\_k=5, adjust based on results
* Use score thresholds to filter low-quality matches
* Enable reranking for better precision

### Grounding Instructions

Tell agents how to use knowledge:

```markdown theme={null}
Instructions:
- Base your answers on the retrieved knowledge
- If the answer isn't in the knowledge base, say so
- Cite sources when providing specific information
- Don't make up information not present in the context
```

[Learn More](/ai-for-service/searchai/tips-and-faqs).

## Monitoring

Track knowledge retrieval performance:

* **Hit rate**: How often relevant content is found
* **Latency**: Search response times
* **Relevance**: User satisfaction with answers
* **Coverage**: Questions without good matches

[Learn More](/ai-for-service/analytics/searchai/answer-insights).

***
