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

# Knowledge Base Element: AI Q&A in Your Flow

> Connect a Plural Knowledge Base to your flow and let your Avatar answer natural-language questions using GPT-powered AI responses.

The Knowledge Base element connects a pre-built Plural Knowledge Base to your conversation flow and lets your Avatar answer open-ended user questions using AI. Upload your own PDF documents as a data source, and the element uses a GPT language model to generate accurate answers grounded in your content. You can use the Knowledge Base element directly in your Avatar frame or inside a [Plural Automation](/en/elements/plural-automation) frame for server-side processing.

## Prerequisites

Before you add the Knowledge Base element to a flow, you need to:

1. Have a Plural account with the Knowledge Base feature enabled.
2. Create and populate a Knowledge Base from the **Knowledge Bases** section in the left navigation bar.
3. Have GOs available in your account — the Knowledge Base consumes GOs every time it generates a response.

## Set up a Knowledge Base

<Steps>
  <Step title="Create a new Knowledge Base">
    In Plural, click **Knowledge Bases** in the left navigation bar. Click **Create New Knowledge Base**, give it a name, and select the primary language your Avatar will speak. The Knowledge Base is multilingual — you only need to specify the default language at creation time.
  </Step>

  <Step title="Upload PDF data sources">
    Click the **Upload** box and select up to 10 PDFs from your computer. Each PDF must be under 10 MB, and the total upload size must be under 200 MB. Only PDFs are supported at this stage.
  </Step>

  <Step title="Test in the Playground">
    Go to the **Playground** tab and chat with the Knowledge Base to verify that it answers questions correctly using your uploaded documents.
  </Step>

  <Step title="Configure settings">
    Open the **Settings** tab to adjust the Creativity level (Precise or Normal), add a post-answer message, or edit the GPT prompt that guides the model's answers.
  </Step>
</Steps>

## Add the Knowledge Base element to your flow

<Steps>
  <Step title="Create a Save User Input element">
    Add a [Save User Input](/en/elements/overview) element and set the **Save to Attribute** field to a variable name such as `UserQuery`. This captures the user's question.
  </Step>

  <Step title="Drag the output to create a Knowledge Base element">
    Drag the blue output circle from the Save User Input element onto the canvas and release it. Select **Knowledge Base** from the context menu. Choose whether to create the element **with UI** (uses the predefined Knowledge Base screen design) or **without UI** (you build your own response display).
  </Step>

  <Step title="Select the Knowledge Base">
    Click the Knowledge Base element and, in the sidebar, select the Knowledge Base you created from the dropdown list.
  </Step>

  <Step title="Connect the outputs">
    Wire the **Answer found** output to the element that should display or speak the response, and the **No answer** output to a fallback element.
  </Step>
</Steps>

## Robots (Pepper / Temi)

For physical robots, download the Knowledge Base template project from the **Downloads** section in Plural, then:

1. Create a Knowledge Base as described above.
2. Open the downloaded template and select your Knowledge Base in the **KB-Element**.
3. Copy the Live URL and Auth Token from the Knowledge Base IoT Trigger element and paste them into the Custom API Call element on the robot side.
4. Assign the project to your robot, publish, and test.

## AI models and GO consumption

Plural offers two model tiers for the Knowledge Base element:

<Tabs>
  <Tab title="Standard (GPT-3.5)">
    The Standard model uses GPT-3.5 Turbo and is suitable for most FAQ and information-retrieval use cases.

    **Cost:** 10 GOs per 1,000 characters of response generated.
  </Tab>

  <Tab title="Premium (GPT-4o)">
    The Premium model uses GPT-4o and delivers higher accuracy, better reasoning, and more nuanced answers — ideal for complex or sensitive topics.

    **Cost:** 100 GOs per 1,000 characters of response generated.
  </Tab>
</Tabs>

<Warning>
  If your account has no GOs remaining, the Knowledge Base element will not generate responses and will route through the **No answer** output. Keep your GO balance topped up to avoid interruptions.
</Warning>

## Manage your data source

From inside the Knowledge Base settings, click **Manage Data Source** to:

* **View** — click a document name to preview it.
* **Delete** — click the trash icon next to a document to remove it.
* **Add** — click **Add New Data Source** to upload additional PDFs.

## Analytics and conversation history

The Knowledge Base includes a built-in analytics and conversation history view. Use it to review the questions your users ask and the answers the model provided, then improve your data source documents to increase answer quality.

<Tip>
  After reviewing conversation history, update your PDFs to include direct answers to the most common questions. The more specific and well-structured your source documents are, the more accurate the AI responses will be.
</Tip>

## Multilingual automation

If you run the Knowledge Base inside a [Plural Automation](/en/elements/plural-automation) frame and need it to respond in the user's current language, append `?lang=#ATTRI/LanguageISO2` to the IoT Trigger URL in the API call from your Avatar frame. This passes the current project language to the automation frame automatically.
