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

# Build a Chatbot

> Build a custom chatbot on your data in just a few steps.

## 1. Create an App

Go to your organization [Dashboard](https://app.getmetal.io) and start by creating a new App. Give it a name and select type: Chatbot.

<img src="https://mintcdn.com/metal/JlNJrP-9OzWcypuS/images/chatbot-01.png?fit=max&auto=format&n=JlNJrP-9OzWcypuS&q=85&s=471e1732f0fc6b8d37e4ad09462b1dd9" alt="chatbot-1" width="496" height="438" data-path="images/chatbot-01.png" />

## 2. Connect to Datasource

A Datasource is a collection of data that will feed your app. You can add multiple files or Data Entities to a Datasource.
Connect your app to an existing Datasource or create a new one.

<img src="https://mintcdn.com/metal/JlNJrP-9OzWcypuS/images/chatbot-02.png?fit=max&auto=format&n=JlNJrP-9OzWcypuS&q=85&s=c90ca22047a0cc9bca8aa7687d4628a9" alt="chatbot-2" width="486" height="499" data-path="images/chatbot-02.png" />

## 3. Add Data Entities

A Data Entity is a single file or entry in a Datasource. Accepted file formats are PDF, DOC, DOCX, XLSX, and CSV.

After you've added a Data Entity, Metal will create an Index, process the data into chunks, and generate the embeddings that will be used to match the user's input to the right response.

<img src="https://mintcdn.com/metal/JlNJrP-9OzWcypuS/images/chatbot-03.png?fit=max&auto=format&n=JlNJrP-9OzWcypuS&q=85&s=1ca67da6c16b519d7c9dbd4d47e96d93" alt="chatbot-3" width="499" height="400" data-path="images/chatbot-03.png" />

## 4. Deploy your Chatbot

Try out your chatbot with Metal's open source [Chatbot UI](https://github.com/getmetal/chatbot).
Start by cloning the repo and following the instructions in the README.
You'll need to add Open AI `API Key`, and Metal's `API key`, `Client Id` and `Index Id` to the `.env.local file`.

<img src="https://mintcdn.com/metal/JlNJrP-9OzWcypuS/images/chatbot-04.png?fit=max&auto=format&n=JlNJrP-9OzWcypuS&q=85&s=a24fc7e96fdb805ca1b017e875a5df6e" alt="chatbot-4" width="480" height="424" data-path="images/chatbot-04.png" />
