Quick summary

  • Our Thai LINE chatbot answers customer questions using a 2,176-word vocabulary database with AI fallback.
  • We set a hard 50-second response deadline and achieved a p95 (95th percentile) of 5.3 seconds through classifier tuning.
  • Raising classifier accuracy reduced AI handoffs by 40%, proving that decision quality matters more than raw speed.

How did we build a Thai-language chatbot for trading customers?

Last year, our team decided to create a LINE chatbot to directly answer Thai customer questions. Our goal was to reduce the workload for our customer service team and improve response efficiency. We started with a Thai vocabulary database of 2,176 words, covering most common customer inquiries such as account information, deposit and withdrawal methods, promotional news, and general questions.

The chatbot was designed to serve as the first phase in answering questions. It attempts to match customer queries with our vocabulary database first. If no match is found, it forwards the question to AI for a more accurate answer. This hybrid approach seemed straightforward, but we quickly learned that what appears easiest is often the most challenging.

For those exploring AI tools for market analysis, see our work on asking Thai questions directly on MT5 charts.

Why does response time matter so much in trading?

We fully understood that in the world of trading, speed is the most critical factor. Customers don't want to wait long for answers. Therefore, we set a hard deadline of 50 seconds for any response. Setting such a goal forced us to consider every detail of the system architecture.

The classifier we developed had a working time of approximately 1.4 to 2.0 seconds, which is very fast for this type of task. However, we wanted it to be as fast as possible to give the AI more time to formulate answers for customers. Every millisecond saved at the classification stage meant more time available for the AI reasoning phase.

Understanding the hardware requirements for AI workloads is essential. We've documented our GPU benchmarking process for AI applications to help others make informed decisions.

How did we balance speed against accuracy?

Testing the system wasn't straightforward, especially when it came to precise time measurement. We needed a large amount of real-world usage data to get a true p95, meaning 95 percent of questions had to be answered within the specified time. From our actual testing, we found that the combined response time p95 was 5,334 milliseconds, or approximately 5.3 seconds, significantly below our hard deadline.

However, we weren't complacent. We knew that real-world environments might have other factors that could increase response times. One of the main problems we encountered was that sometimes the classifier would forward questions to AI even when they were already in our vocabulary database, wasting unnecessary time.

We set a higher standard for the classifier to make the best possible decision, even if it took slightly longer. We found that setting it for higher accuracy reduced the number of cases forwarded to AI by 40 percent, which resulted in significant time savings. This taught us that decision quality often matters more than raw processing speed.

For a deeper look at how we evaluate AI versus human performance, read our 65-case backtest comparing AI and human analysts.

What lessons did we learn from this project?

This project taught us about the balance between speed and accuracy. Sometimes, trying to be the fastest can compromise accuracy. Conversely, trying to be the most accurate can make things slower. Setting strong time goals and accurate measurement is crucial, but more importantly, understanding the real behavior of users and tailoring the system to meet their needs is essential.

The chatbot now answers questions within the specified time while maintaining good response accuracy. Most customers are satisfied with the fast and accurate responses, which has genuinely helped reduce the workload for our customer service team.

For those who want to try trading gold for real, open an XM account at: open an XM account via our partner