---
description: >-
  Discover how to customize and utilize the GPT model for specific tasks within
  Gallabox with the GPT Knowledge Base feature. Tailor interactions, store
  information, and fine-tune conversations.
---

# AI node - GPT Knowledge Base

> **Who can use this Card?**
>
> * Gallabox Users having permission to either build and deploy bots or manage bots.
> * Available on Pro Plan.

### Overview

The **GPT Knowledge Base** feature lets you customize and use the GPT model for tasks in Gallabox. You can set input variables, choose variables to save history, and adjust settings to fine-tune conversations. This helps in customizing interactions and storing useful information for later.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FKt1hWhaySdDLREPy4ugs%2FGPT%20Knowledge%20Base.png?alt=media&#x26;token=2b48e4be-33aa-44f2-b83a-4e4db3874e89" alt=""><figcaption></figcaption></figure>

The Node contains the below sections:

1. **Input Variable:** Users can choose or create variables to serve as input for interacting with the GPT model.
2. **Select or Create Variable to Store History:** This allows users to manage the history of interactions by selecting or creating variables. Variable names should adhere to specific guidelines.
3. **Knowledge Base:** Users can select the knowledge base to instruct the GPT model on specific information or context.
4. **Prompt:** Users describe their goal or the context in which they want the GPT-model to provide information. The prompt serves as input to the model.
5. **Max Tokens:** Max Tokens determine the maximum number of [tokens](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them) that the GPT-model can use in its response.
6. **Temperature:** The temperature setting controls the randomness of the AI responses. A higher value, like 0.8, makes the responses more unpredictable and creative. A lower value, such as 0.2, makes the responses more focused and closely related to the prompt.
7. **Function:** Users define a function by entering a name and description. This function encapsulates the purpose or task the GPT-model is intended to perform.

* **Store the Parameters in the Variable (Optional):** Optionally, users can create or select variables to store the parameters used in the GPT Knowledge Base configuration.
* **Parameter 1:** Users define a specific parameter by providing a name, description (optional), and type (e.g., String).

### Example

To start with the GPT Knowledge Base Node, you have to create a Knowledge Base in your Gallabox Account.

{% hint style="success" %}
The knowledge Base can be either a File Type (Pdf, csv, excel) or Catalog that you connected with your WhatsApp Number on Gallabox.
{% endhint %}

#### Add Knowledge Base

1. Use the Shortcut "Ctrl" + "K" to open the Search in Gallabox. Type **Knowledge Base** and click on it.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FNmbXcbqij4d2pXVQkH1R%2FKnowledge%20Base%20in%20Gallabox.gif?alt=media&#x26;token=6b5eec5b-8a6a-4ae1-9709-0c6c06930494" alt=""><figcaption></figcaption></figure>

2. Click on "**+Create Knowledge Base**" and Name the Knowledge Base.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FVTebK1N1CJyptfKgMdhV%2FName%20your%20Knowledge%20Base.gif?alt=media&#x26;token=bd62a118-2d43-4364-b3a6-9f1563249c22" alt=""><figcaption></figcaption></figure>

3. You have to choose the Type whether you would like to upload a file or use already connected catalogue with your WhatsApp Number.&#x20;

* If you choose the Type as **File**, you can upload the pdf or csv or an excel file as the Knowledge Base.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FJFgFUEuPH82w55hXyuTD%2FType%20-%20File.gif?alt=media&#x26;token=3e9efbb9-9f84-4724-9f18-88e2e7061d97" alt=""><figcaption></figcaption></figure>

* If you choose the Type as **Catalog**, you have to choose the WhatsApp Channel (_if more than one is connected with Gallabox_) and the catalog connected with the Channel. If you have more than one catalog connected with a WhatsApp Channel, you can add those by clicking on "**+Add**".&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F2R1hVXE18vqgZUJdUOCU%2FCatalog%20for%20Knowledge%20Base.gif?alt=media&#x26;token=62b7ed6f-1cbc-4cb0-8e0b-53482db99d63" alt=""><figcaption></figcaption></figure>

4. Click on create and your Knowledge Base will be created.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FsdhHkIlHkiIyAomRceRK%2FKnowledge%20Base.gif?alt=media&#x26;token=df69c069-f043-4413-896b-ff115ccbc422" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
You can only add 3 Knowledge Base.
{% endhint %}

After adding the Knowledge Base you can use **GPT Knowledge Base** Node in your Bot flow.&#x20;

**Input Variable:** Select or create a variable named "userQuery."

**Select or Create Variable to Store History:** Create a variable named "interactionHistory."

**Knowledge Base:** Select the company's Help Docs as the knowledge base.

**Prompt:** Describe your goal: "Assist users in understanding the troubleshooting steps for network connectivity issues."

**Max Tokens:** Set to 300.

**Temperature:** Set to 0.5 for a balanced response.

**Function:**

* Name: "Network\_Troubleshooting"
* Description: "Generate helpful responses for network connectivity issues provided in the pdf file."

**Store the Parameters in the Variable (Optional):** Create or select a variable named "functionParameters."

**Parameter 1:**

* Name: "Device\_Type"
* Description: "Specify the type of device experiencing issues (optional)."
* Type: "String"
