---
title: Create an AI Chatbot with Business Data in Minutes
---


AI-powered customer service may be a standard feature for every business website, and it is becoming easier to implement with higher levels of customization. The following content will guide you on how to create an AI-powered customer service for your website in just a few minutes using Dify.

### Prerequisite

**Register or Deploy Dify.AI**

Dify is an open source product which you can find on[ GitHub](https://github.com/langgenius/dify) and deploy it to your local or company intranet. Meanwhile, it provides a cloud SaaS version, access [Dify.AI ](https://dify.ai/)to register and use it.

**Apply for API key from OpenAI and other model providers.**

Dify provides free message call usage quotas for OpenAI GPT series (200 times) and Antropic Claude (1000 times) AI models, which require tokens to be consumed. Before you run out, you need to apply for your own API key through the official channel of the model provider. You can enter the key in Dify's "Settings" - "Model Provider".

### Upload your product documentation or knowledge base.

If you want to build an AI Chatbot based on the company's existing knowledge base and product documents, then you need to upload as many product-related documents as possible to Dify's knowledge. Dify helps you **complete segmentation and cleaning of the data.** The Dify knowledge supports two indexing modes: high quality and economical. We recommend using the high quality mode, which consumes tokens but provides higher accuracy.

1. Create a new knowledge base
2. upload your business data (support batch uploading multiple texts)
3. select the cleaning method
4. Click \[Save and Process], and it will take only a few seconds to complete the processing.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/learn-more/use-cases/3ba45ef5b8859d80cded096caf386c1b.png)

### Create an AI application and give it instructions

Create a conversational app on the \[Build App] page. Then start setting up the prompt and its front-end user experience interactions.

1. Give the AI instruction: Click on the "Pre Prompt" on the left to edit your Prompt, so that it can play the role of customer service and communicate with users. You can specify its tone, style, and limit it to answer or not answer certain questions.
2. Let AI possess your business knowledge: add the target knowledge you just uploaded in the \[context].
3. Set up the opening remarks: click "Add Feature" to turn on the feature. The purpose is to add an opening line for AI applications, so that when the user opens the customer service window, it will greet the user first and increase affinity.
4. Set up the "Next Question Suggestion": turn on this feature to "Add Feature". The purpose is to give users a direction for their next question after they have asked one.
5. Choose a suitable model and adjust the parameters: different models can be selected in the upper right corner of the page. The performance and token price consumed by different models are different. In this example, we use the GPT3.5 model.

In this case, we assign a role to the AI:

> Pre prompt：You are Bob, the AI customer service for Dify, specializing in answering questions about Dify's products, team, or LLMOps for users.Please note, refuse to answer when users ask "inappropriate questions", i.e., content beyond the scope of this document.

> Opening remarks：Hey `{{User_name}}`, I'm Bob, the first AI member of Dify. You can discuss with me any questions related to Dify products, team, and even LLMOps.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/learn-more/use-cases/1175a854034f6814b8066852d63bcdf8.png)

### Debug the performance of AI Chatbot and publish.

After completing the setup, you can send messages to it on the right side of the current page to debug whether its performance meets expectations. Then click "Publish". And then you get an AI chatbot.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/learn-more/use-cases/6e917021e11803171d7801af948ffc4c.png)

### Embed AI Chatbot application into your front-end page.

This step is to embed the prepared AI chatbot into your official website . Click \[Overview] -> \[Embedded], select the script tag method, and copy the script code into the \<head> or \<body> tag of your website. If you are not a technical person, you can ask the developer responsible for the official website to paste and update the page.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/learn-more/use-cases/8945e4cbb2ffbd9c5e2272fd99768be3.png)

1. Paste the copied code into the target location on your website.
2. Update your official website and you can get an AI intelligent customer service with your business data. Try it out to see the effect.

Above is an example of how to embed Dify into the official website through the AI chatbot Bob of Dify official website. Of course, you can also use more features provided by Dify to enhance the performance of the chatbot, such as adding some variable settings, so that users can fill in necessary judgment information before interaction, such as name, specific product used and so on.

Welcome to explore in Dify together!

{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}

---

[Edit this page](https://github.com/langgenius/dify-docs/edit/main/en/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.mdx) | [Report an issue](https://github.com/langgenius/dify-docs/issues/new?title=Documentation%20Issue%3A%20e-an-ai-chatbot-with-business-data-in-minu&body=%23%23%20Issue%20Description%0A%3C%21--%20Please%20briefly%20describe%20the%20issue%20you%20found%20--%3E%0A%0A%23%23%20Page%20Link%0Ahttps%3A%2F%2Fgithub.com%2Flanggenius%2Fdify-docs%2Fblob%2Fmain%2Fen/learn-more/use-cases%2Fcreate-an-ai-chatbot-with-business-data-in-minutes.mdx%0A%0A%23%23%20Suggested%20Changes%0A%3C%21--%20If%20you%20have%20specific%20suggestions%20for%20changes%2C%20please%20describe%20them%20here%20--%3E%0A%0A%3C%21--%20Thank%20you%20for%20helping%20improve%20our%20documentation%21%20--%3E)

