# Knowledge bases

{% hint style="success" icon="list-check" %}
**IN SHORT**

Knowledge bases allow you to provide your AI agents with accurate knowledge to generate relevant responses.

They can be built using your website, documents, or articles written in Fullwhere.

A knowledge base can then be used by several of your AI agents.
{% endhint %}

{% hint style="info" icon="lightbulb" %}
When your [AI agents](/documentation/documentation-en/automations/ai-agents.md) require the use of a large amount of information to generate accurate and relevant responses based on your brand or location information, it may be useful to set up knowledge bases.\
You can add or write documents there and synchronize your website.

Your knowledge base can then be used by several of your AI agents.
{% endhint %}

{% hint style="info" icon="shield-check" %}
**ACCESS RIGHTS**

To modify the Knowledge Bases in your Fullwhere workspace, you must be a supervising member with Administrator rights.
{% endhint %}

Knowledge bases bring together all the information sources your AI Agents can use to formulate accurate responses.

Each knowledge base can contain up to five data sources of different types:

* Website → allows you to directly synchronize your website;
* Documents → allows you to upload files;
* Segments → allows you to write articles manually.

Each data source can contain an unlimited number of items, an item being a web page, a file, or a segment.

***

## Access your knowledge bases <a href="#h_3ac2f4405e" id="h_3ac2f4405e"></a>

To access your knowledge bases, go to the Automation menu → [Knowledge bases](https://app.fullwhere.com/automation/knowledge-base).\
There you can view all existing bases, along with several key pieces of information:

| Column        | Description                                                                                                                               |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Name          | The name of your knowledge base                                                                                                           |
| Source        | The number of data sources (up to 5)                                                                                                      |
| Contents      | The total number of items contained in the data sources of your knowledge base (that is, the number of web pages, documents, or segments) |
| Last updated  | The date the knowledge base was last updated                                                                                              |
| Created by    | The user who created the knowledge base                                                                                                   |
| Creation date | The date the knowledge base was created                                                                                                   |

This view gives you an overall picture of how your knowledge is organized and its update status. You can also create a new base, access the details of an existing base, or check its progress.

To view all the contents (web pages, documents, and segments) indexed across all your knowledge bases, go to the Automation menu → Contents.

\
You can filter by content type (web page, files, segments) or by knowledge base.\
The text search bar lets you search for specific items.

***

## Create a new knowledge base <a href="#h_727643bafc" id="h_727643bafc"></a>

To create a base, click + Create a base from the main knowledge bases page. Give the base a clear name, corresponding for example to a brand, an entity, or a functional scope.

Once the base is created, you will access its configuration page.

## Add data sources <a href="#h_904ef67d26" id="h_904ef67d26"></a>

Since a knowledge base is made up of data sources, the first step is to create the data sources for your base. To do this, click the + Add button and select the type of data source you want to create: Website, Documents, Segments.

### Website <a href="#h_ca321ef733" id="h_ca321ef733"></a>

This type of source allows you to automatically synchronize the pages of a site or a specific section of the site.

\
Enter the URL to analyze:

* to synchronize an entire website, enter its "source" URL (for example `https://mysite.com`): all pages with this URL as their root will be synchronized (*e.g.*. `https://mysite.com/docs` and `https://mysite.com/history`
* to synchronize part of a website, enter the "starting" URL (for example `https://mysite.com/docs/`): only this page and those belonging to the same "root" will be synchronized, (*e.g.* : `https://mysite.com/docs/files` will be synchronized, but `https://mysite.com/history` will not).\
  Once the source is saved, the system automatically starts extraction and then synchronization.

Once the data source has been created, click "Synchronize" to start retrieving the website.

If the site is modified, you can restart the update via the Synchronize button.

***

### Files <a href="#h_acf7d78e87" id="h_acf7d78e87"></a>

A Files-type source allows you to import documents such as PDFs.\
When creating it, specify the folder name (e.g. *Legal documents*) in which you will be able to add documents.\
Once the source is created, you can add files to it by clicking + Add a file.

Once your files are imported, you can synchronize them with your knowledge base via the Synchronize button in the top right.

Whenever files are added or modified, you need to Synchronize your data source so that your changes are taken into account in your knowledge base.

Here is the list of accepted files:

| Extension | Meaning                                               |
| --------- | ----------------------------------------------------- |
| `.c`      | Source file in C language                             |
| `.cpp`    | Source file in C++ language                           |
| `.cs`     | Source file in C# (C Sharp)                           |
| `.css`    | CSS style sheet used for web formatting               |
| `.doc`    | Microsoft Word document (old format)                  |
| `.docx`   | Microsoft Word document (modern XML format)           |
| `.go`     | Source file in Go (Golang) language                   |
| `.html`   | Web page in HTML format                               |
| `.java`   | Source file in Java language                          |
| `.js`     | JavaScript script file                                |
| `.json`   | Data file in JSON (JavaScript Object Notation) format |
| `.md`     | Markdown file, used for writing structured text       |
| `.pdf`    | PDF document (Portable Document Format)               |
| `.php`    | PHP code file (server-side web language)              |
| `.pptx`   | Microsoft PowerPoint presentation (modern XML format) |
| `.py`     | Source file in Python language                        |
| `.rb`     | Source file in Ruby language                          |
| `.sh`     | Shell script (Bash, Linux, macOS)                     |
| `.tex`    | LaTeX file used for composing scientific documents    |
| `.ts`     | Source file in TypeScript                             |
| `.txt`    | Plain text file                                       |

***

### Segments <a href="#h_d9b534a14b" id="h_d9b534a14b"></a>

Segments are content written directly in Fullwhere. They can be used to create a knowledge base from scratch, or to complete a knowledge base with certain specific information.

When creating a folder of the segments type, assign it a Name (e.g. *Refund information*).\
In your folder, you can create one or more segments via the + Create a segment button and write them using the integrated Markdown editor: headings, rich text, lists, links, etc.\
​

When you have finished editing a segment, click Save to save your changes.

Once all the segments in your folder have been written, you can synchronize them with your knowledge base via the Synchronize button in the top right.

Whenever segments are created or modified, you need to Synchronize your data source so that your changes are taken into account in your knowledge base.

***

## Synchronize and maintain your data sources <a href="#h_5d89b7b5a1" id="h_5d89b7b5a1"></a>

Each data source has a synchronization status visible from its knowledge base.\
This status changes according to progress: *site extraction*, *start of synchronization*, *synchronization in progress*, then *synchronized*.

You can restart a synchronization at any time, especially after:

* updating a site or a file;
* adding new documents or segments;
* or any major modification to the initial content.

A Synchronize button is available in the table showing the data sources of a knowledge base, and also in the top right when you view the content of a data source.\
​

***

## Browse the contents of a knowledge base <a href="#h_8c75ca7bfd" id="h_8c75ca7bfd"></a>

When you enter a knowledge base, you will find the table of all the data sources that make it up, with the following information:

| Column               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                 | Data source name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Type                 | Type of data source (Website, Documents, Segments)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Content              | The number of items contained in the data source. For websites, this is the number of synchronized pages on the website. For Documents or Segments, this is the number of existing items.                                                                                                                                                                                                                                                                                                                                                                                                      |
| Last synchronization | <ul><li>Displays the "Synchronize" button if your data source has never been synchronized.</li><li>Displays the date of the last synchronization if your data source has already been synchronized</li><li><p>Displays the progress status if a synchronization is in progress:</p><ul><li>Start of synchronization</li><li>Web site extraction (Website only)</li><li>Synchronization in progress</li><li>Synchronization failed</li></ul></li></ul><p>For a source that has already been synchronized, the Synchronize button appears when you hover over the last synchronization date.</p> |
| Synchronization      | <p>Indicates whether the file data source is "Synchronized" or "To be synchronized".</p><p>If the data source is "To be synchronized", it means that content has been added or modified since the last synchronization. These changes will not be taken into account until the data source is synchronized again.</p>                                                                                                                                                                                                                                                                          |
| Created by           | User who created the data source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Creation date        | Creation date of the data source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

Click on a data source to browse its contents.

The Synchronize button and the Last synchronization date are displayed in the top right.

The table displays content information according to its type:

Website

| Column       | Description                 |
| ------------ | --------------------------- |
| Name         | The name of the web page    |
| URL          | The URL of the web page     |
| Last updated | The date of the last update |

Files

| Column          | Description                                                                                                                                                                                                                                                                                   |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name            | The file name                                                                                                                                                                                                                                                                                 |
| Type            | File type/extension                                                                                                                                                                                                                                                                           |
| Created by      | User who added the file                                                                                                                                                                                                                                                                       |
| Creation date   | Date the file was added                                                                                                                                                                                                                                                                       |
| Synchronization | <p>Indicates whether the file is "Synchronized" or "To be synchronized".<br>When a file is added or modified in a data source, it is not taken into account until the data source has been synchronized with the knowledge base. In this case, this field indicates "To be synchronized".</p> |

\
You can also View, Download, or Delete a file using the action buttons at the end of each row.\
You can also perform multiple deletions by selecting several items at once and using the Delete button at the top of the table.

When you import a file with the same name as a file already present in the same source, it is simply updated: it replaces the existing one without creating a duplicate.\
​\
​Segments

| Column          | Description                                                                                                                                                                                                                                                                                           |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name            | The segment name                                                                                                                                                                                                                                                                                      |
| Last updated    | Date of the segment's last update                                                                                                                                                                                                                                                                     |
| Created by      | User who created the segment                                                                                                                                                                                                                                                                          |
| Creation date   | Date the segment was created                                                                                                                                                                                                                                                                          |
| Synchronization | <p>Indicates whether the segment is "Synchronized" or "To be synchronized".<br>When a segment is created or modified in a data source, it is not taken into account until the data source has been synchronized with the knowledge base. In this case, this field indicates "To be synchronized".</p> |

You can also Delete a segment using the action button at the end of each row.\
You can also perform multiple deletions by selecting several items at once and using the Delete button at the top of the table.

***

### Organization best practices <a href="#h_67df0ccabe" id="h_67df0ccabe"></a>

To ensure consistency and performance of your knowledge bases, it is recommended to structure your sources clearly and consistently.

A good practice is to create one knowledge base per business brand or establishmen&#x74;*.*

\
Within each base:

* add a Website source corresponding to the website of the relevant entity (brand or location) or to online documentation (FAQ, help center, etc.);
* create a Files source grouping your documents
* and add a Segments source for additional information or internal articles.


---

# 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.fullwhere.com/documentation/documentation-en/automations/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.
