# Knowledge AI

## Smarter, Brand-Safe Answers with Generative AI&#x20;

#### Looking to build an intelligent Virtual Assistant powered by your own knowledge base?

Knowledge AI is a powerful feature within AI Studio that allows your Virtual Assistant (VA) to generate intelligent, accurate answers using your content. Rather than relying on predefined [intents](https://studio.docs.ai.vonage.com/properties-1/intents) and [entities](https://studio.docs.ai.vonage.com/properties-1/entities), Knowledge AI enables direct use of uploaded materials, known as Sources, to respond contextually to user questions.

Used in conjunction with the [Q\&A Node](https://studio.docs.ai.vonage.com/voice/nodes/basic/q-and-a-node), Knowledge AI taps into a streamlined system built on RAG (Retrieval-Augmented Generation), combining semantic search with [Google Gemini’s large language models (LLMs)](https://ai.google.dev/gemini-api/docs/models) to generate relevant responses.

#### Here’s how the system works:

* **Sources**: These are the files, URLs, or public cloud documents you upload. They provide the foundational knowledge your assistant draws from.
* **Indexes:** Logical groupings of Sources that organize data for specific types of user queries.
* **The Q\&A Node:** Used within your VA flow to access a chosen Index and return the right answer at the right time.
* **RAG (Retrieval-Augmented Generation):** The backend engine that searches through your Index and generates a response via the LLM.
* **Index Testing:** A built-in validation tool to simulate user input and check how well the Index responds before going live.

The combination of these elements creates a flexible and scalable framework that enables dynamic, rich conversations powered by your content. This architecture supports high-quality conversational AI without the need for manual intent training or scripting flows for each query.

***

## How to get started <a href="#how-to-get-started" id="how-to-get-started"></a>

This guide provides step-by-step instructions to **create**, and **optimize** Virtual Agents using the Knowledge AI feature.

{% stepper %}
{% step %}

### Optimize your Sources

The quality of Knowledge AI responses depends directly on the quality of your indexed content. Well-structured, relevant sources improve accuracy, speed, and reliability.&#x20;

To optimize your documents before uploading, follow these best practices:&#x20;

#### 1. Clean and Organize Content

* Remove navigation bars, headers, timestamps, and feedback forms.
* Use clear headings and subheadings for structure.
* Keep numbered lists in proper order.

#### 2. Make Content Easy to Read

* Add transitions between list items (“After completing step 2, do…”).
* Avoid tables. Convert them into flat-level syntax (simple sentences or lists) to help the AI process information linearly.
* Replace images with descriptive text.

#### 3. Improve Semantic Quality

* Add short summaries below each section heading.
* Add *session starters* for common questions (“If you want to order software, follow the steps below…”).
* Reduce ambiguity by replacing pronouns with specific nouns.
* Define abbreviations and internal terms to provide context.

#### 4. Structure for Performance

* Break long documents into smaller, focused files.
* Use clear, specific titles for each document.
* Ensure related content is properly tagged and indexed.

###

{% endstep %}

{% step %}

### Upload Your Sources

To begin, log in to AI Studio and head to the **Knowledge AI** tab at the top of the page.

<figure><img src="https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FL7Rnsj9hninXcuUs6VtP%2F0.png?alt=media" alt=""><figcaption></figcaption></figure>

#### What Can You Upload?

* **Local Files:** PDF, TXT, or HTML formats
* **URLs:** e.g., [www.vonage.com](https://www.vonage.com/)
* **Cloud Storage Links:** Public links without access permissions

{% hint style="warning" %}
**When uploading URLs:**

* Only the main/seed URL is scraped.
* Subpages are not automatically crawled.
* Each URL must be uploaded individually.
* Uploaded content is a snapshot of the current visible text (no dynamic updates).
* Authenticated or restricted content cannot be parsed – use HTML files instead.
  {% endhint %}

#### File Size Limits

* **PDF**: 10MB max
* **HTML/TXT**: 5MB max
* **URL text content**: 5MB max

Once uploaded, all text (except table content or image-embedded text) is indexed and used as part of the knowledge base.

{% hint style="danger" %}

#### Need to Update Content?&#x20;

**Since Sources are static:**

* Always re-upload after edits.
* Replace the old Source in the associated Index only after confirming the new Source uploaded successfully.
* Name your Sources clearly to maintain traceability.
  {% endhint %}

### Access & Structure

* Sources are uploaded per API key.
* Indexes are created by grouping Sources.
* Indexes are accessible to VAs using the same API key.

{% hint style="warning" %}
You’ll know your Source is ready when the status displays a checkmark.

**Upload time** depends on the file size, ranging from a few seconds to 30 minutes. You can preview URLs, download uploaded files, or delete Sources directly from the tab.
{% endhint %}

<figure><img src="https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2F0RZ81Hd3iDCs39HYsKTx%2Fsource%20gif.gif?alt=media&#x26;token=c289e244-7fd8-458c-af2a-e54ff7fd3aa1" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Group Your Sources to Create Indexes

An Index is a collection of Sources that your VA can use to generate responses in a specific context.

#### Example Use Cases

* **Multiple documents for troubleshooting CPU Model A?** Group them under one Index.
* **Only one Source for a product guide?** Still requires an Index to be used by the Q\&A node.

{% hint style="success" %}

#### Pro Tip&#x20;

The same Source can belong to multiple Indexes. This boosts flexibility across flows.
{% endhint %}

Once created, you can assign the Index in a Q\&A node to determine what content your VA will draw from.

{% hint style="warning" %}
Indexes are API key-scoped but are intended for use by a single VA. If multiple VAs need the same Index:

* Use the Duplicate function in the Index tab.
* Duplicates inherit the same Sources and are auto-renamed as \[Original Name] \[Copy].
  {% endhint %}

<figure><img src="https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FTvj0edoijb0JWcL31DaG%2FIndex%20edit%20.gif?alt=media&#x26;token=0973c2ed-aa4b-4848-b610-985bdb64d648" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}

#### Pro Tip&#x20;

When **collaborating in teams**, ensure all relevant users have access to the correct API keys. Sources and Indexes are created at the account level and are only available to Virtual Assistants (VAs) under the same API key.&#x20;

If a user doesn't have access to a specific API key, they won’t be able to view or use the associated Sources or Indexes in their VAs.
{% endhint %}

{% hint style="info" %}

#### Duplicating an Index

1. Go to the Index tab.
2. Click the three dots beside the Index name.
3. Select the Duplicate icon.
4. Your duplicate appears as a new row, ready for reuse.

💡 This helps streamline workflows without manually rebuilding each configuration.
{% endhint %}

{% endstep %}

{% step %}

### Test Your Indexes

The Index Testing tool allows you to validate whether your knowledge base responds accurately to real-world user input.

* Enter a user query.
* Get a response based on the selected Index.
* See which Source was used for the answer.

{% hint style="success" %}

#### Pro Tip&#x20;

If Knowledge AI can’t find relevant information, it returns: "I don’t know". This helps prevent hallucinations and allows you to create a fallback path.
{% endhint %}

<figure><img src="https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FJljyYjETmPqBAoKGt6je%2FIndex%20testing.gif?alt=media&#x26;token=87b454e9-1535-49ed-902d-8075758bee82" alt=""><figcaption></figcaption></figure>

### Optimize as You Go

* Modify Sources or reorganize Indexes based on test results.
* Testing helps surface gaps and identify whether your content aligns with expected questions.

{% hint style="warning" %}
Any changes to Index content are reflected immediately in live flows – no need to republish the VA. We recommend duplicating an Index and testing changes there before modifying the live one.
{% endhint %}

{% hint style="danger" %}
**Each request made in the Index Tester incurs a separate charge**. Please consult your Account Manager for pricing.
{% endhint %}

{% endstep %}

{% step %}

### Set Up Your Q\&A Node <a href="#select-the-right-ai-engine" id="select-the-right-ai-engine"></a>

Once your Sources and Indexes are tested, you’re ready to integrate them into your VA using the Q\&A node!

➡️[ Continue to Step 4: Configure Q\&A Node](https://studio.docs.ai.vonage.com/voice/nodes/basic/q-and-a-node)

<figure><img src="https://3877181490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_81A0PNZfdawu_TPAO%2Fuploads%2FBGS024gxV4Tei7j9TnTQ%2F0.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

### 🔍 Related Links <a href="#whats-next" id="whats-next"></a>

* [How to set up your Q\&A node](https://studio.docs.ai.vonage.com/voice/nodes/basic/q-and-a-node)
* [Get Started - Voice Channel](https://studio.docs.ai.vonage.com/voice/get-started)
* [Get Started - WhatsApp Channel](https://studio.docs.ai.vonage.com/whatsapp/get-started)

<br>

<br>


---

# 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://studio.docs.ai.vonage.com/ai-studio/knowledge-ai.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.
