DEV Community

Evan Lin
Evan Lin

Posted on • Originally published at evanlin.com on

Learning Python: Building a Simple Customer Service LINE Bot with Embedchain

image-20230628221201753

With this EmbedChain, you can fetch many types of data. This image is a test of it fetching data from the webpage "2023 LINE Official Account Plan Price Adjustment, Key Points at a Glance" to reply to users.

  • On what day will the official account price be adjusted? The official account price will be adjusted on September 1, 2023.
  • What is the price of the Medium Usage Plan? The price of the Medium Usage Plan is NT$800 per month.

Preface

Many people want to create a customer service chatbot LINE Bot, but building a customer service LINE Bot through NLU is actually very costly. Here, I recommend using LangChain with the EmbedChain package to create a low-cost and simplified version of a customer service LINE Bot. This article will quickly tell you how to create one using EmbedChain.

Here is a series of learning articles I have written about LangChain:

How to Create a Customer Service LINE Bot with EmbedChain

Here are a few simple steps:

  • Prepare the materials needed to create a customer service LINE Bot
  • Create an EmbedChain LINE Bot
  • Test and adjust

Below, we will use EmbedChain to create a customer service chatbot that replies to basic information from LINE Biz-Solution.

image-20230628210029311

(Source: LINE Biz-Solution)

Prepare the materials needed to create a customer service LINE Bot

Here are some frequently asked questions webpages:

image-20230628090828775

Create an EmbedChain LINE Bot

It's also very simple to use:

  1. Install EmbedChain pip install embedchain

  2. Add the relevant code

Test and Adjust

The problems found during testing are still quite a few:

  • Often outputs English
  • Easily outputs "I don't know where the answer is"

Conclusion

Using EmbedChain to create a customer service chatbot can be considered a demonstration of the POC concept, but if you want to officially launch it, it is recommended to use LangChain to create it through vector stores and Embedding (which is actually the method used within it). More information will be updated here gradually.

Top comments (0)