At the end of the previous post, I still had not connected Meilisearch. When Shopify could not find a product, the next step was supposed to be searching the company’s B2B website.

I connected it later, but the project did not stop there. When the support team tested it with real customer questions, more problems came up: products could not be found, the system confused the product from the previous turn, it said it did not know something even though the information was available, or a customer only wanted to buy a spare part and the buttons below the answer started suggesting coupons.

Looking back at that post now, quite a few parts of the three MaxKB conversation types and the long flowchart no longer match the code. So here is what changed after that.

Putting MaxKB aside for now

Most regular answers used to go through MaxKB. The backend identified the workflow, attached product information, and checked the answer it generated. Some answers were then overwritten by fixed business rules.

One annoying part of this setup was figuring out where something had gone wrong. Had we passed the wrong product? Had the knowledge base failed to find the information? Or had MaxKB received the right material but failed to answer from it?

I later moved the main answering process back into the Go backend. Intent recognition calls the LLM directly, products come from Shopify and B2B queries, and FAQs and blog posts come from Meilisearch. When source material needs to be turned into an answer, it goes directly to the model.

Customer message
  -> The LLM interprets the question, product, and conversation context
  -> The backend queries products or help material for that question
  -> Use an eligible FAQ's original answer, or ask the LLM to answer from the material
  -> The backend handles business rules, cards, forms, and next-step buttons
  -> Send the reply to the chat window

The MaxKB code and configuration are still there, so I can switch back. The current setting is backend mode.

Some older function names still contain MaxKB. From the name, you might think they are still calling it, but inside the function the configuration already routes the request to the backend answering process. That is something to watch for when reading the code.

Meilisearch now handles three kinds of content

The original reason for adding Meilisearch was simply that Shopify did not cover all the company’s products. Products on the B2B website needed to be searchable too.

It now handles B2B products, FAQs, and blog posts, with each kind of content processed separately. Shopify products still go through Shopify’s APIs. I have not copied them into Meilisearch as well.

Product search has also changed. Shopify and B2B are now queried in parallel. Once the backend has results from both, it checks conditions such as product name, specifications, and voltage, removes duplicates, ranks the results, and decides which cards to show.

Finding something is only part of the job. We still have to check what we found. Cup presses, ovens, and accessories might all mention 220V. That does not mean we should recommend all of them to the customer.

FAQs and blog posts are used differently too. An FAQ that meets the conditions for a direct answer can use its original answer. Relevant blog content usually goes to the model to be turned into a reply, with the source shown alongside it.

That adds another judgment to make. A title mentioning 25L does not mean the article answers every question about the 25L oven. An article mentioning an accessory does not mean that accessory is sold separately.

The model still needs to write the search terms

The previous post already covered extracting product names, but search still ran into problems once we tried the way real customers actually describe things.

For example:

I need a heat transfer cup machine that requires 220V voltage

Searching the whole sentence on the website might return nothing. Change it to 220V voltage, and products show up. The product is there; the customer just did not phrase the request like a product title.

I had also tried extracting keywords locally: write a few regular expressions, remove the buying phrases, and put the product name and specifications together. The examples I had at the time would pass, but a different way of asking would slip through. Each fix seemed to need another rule.

Now the LLM supplies the search terms while keeping the product, voltage, specifications, and quantity as separate conditions. It can provide a product category, other common names for that category, and a query such as 220V voltage. The backend runs those queries and checks the results.

The search terms can be short, but the customer’s requirements cannot disappear with them. If they want a 220V cup press, finding a 110V one does not finish the job. Other equipment that happens to say 220V should not be mixed into the results either.

If the customer only says they want a 220V device, we still do not know what they are buying. We need to confirm the type of equipment. Voltage alone cannot choose the product for them.

Local code still handles query formatting, duplicates, email addresses, order references, and business constraints. But when semantic recognition is enabled, a failed model request stops automatic intent routing. It should not quietly switch to local rules and act as though it understood the sentence.

We found the product, so why can we still not answer?

This part took a lot of work too.

A customer asks whether an oven has a built-in vacuum pump. The system may already have found the correct oven, with the right product name and link, but the reply still turns into a request to fill out a form.

It looks like search failed, but we need to keep looking through the later steps. Was the product identified? What does its product page say? Do the FAQs or blog posts explain it? Did the model receive material about the same product?

Product search and finding an answer now need to be handled separately. After finding the product, the system still has to read its description and specifications, check the related help material, and see whether any of it answers what the customer actually asked.

There are plenty of conclusions we cannot just assume. If the material says a particular operation requires external equipment, that does not automatically mean the machine has no built-in component. If it lists several specifications, we cannot guess which value belongs to which model from their order in the list.

When a customer asks two questions and the material answers only one, we should explain what we can confirm and say that the other part needs checking. The whole request should not be sent back to a generic support form.

Another possibility is that the model API times out or returns an error. That is different from the source material having no answer. A failed request should not become a claim that no relevant information exists. Those situations are now handled separately.

What was the last question, and what changed this time?

For example, the customer first asks:

Does the V20 have a built-in vacuum pump?

Then they only say:

What about the 25L oven?

The next lookup should be whether the 25L oven has a built-in vacuum pump. The customer has changed the product, but they are still asking the same question.

If we only remember the previous product, we keep answering about the V20. If we only read the latest message, we do not know whether they are asking about capacity, price, or how to use it.

The model now uses the earlier conversation to reconstruct the question, and the backend looks up material for the new product. The old product link, pending variant choices, and price negotiation state have to be handled as well. The card’s name, image, and link should belong to the product whose material was used for the answer.

The current page also provides product clues. When a customer says “this product” on a product page, they should not have to repeat its name every time. But once they explicitly switch to another product, the page context should not override that choice.

These problems are easy to miss in a single-turn test. The first question works, then changing the model reveals that the old state is still there. Similar product names make this especially easy to get wrong.

Forms and human handoff are handled separately

One early problem was that the AI kept asking questions in chat whenever it did not have all the information: order number, email, product, quantity, one after another. Meanwhile, the customer’s actual question still had not been dealt with.

My manager later asked us to use forms. Put the information needed for follow-up into a form, let the customer complete it, and have the support team handle it afterward.

Testing then exposed the other side of the problem. A customer would only describe what they wanted to make, and the system would immediately ask them to fill out a form without even checking whether the existing material could offer some advice.

Both problems have to be considered together. We cannot respond to one piece of test feedback by bringing back endless questions. Keep what the customer has already told us, answer what the material supports, confirm details that actually affect the answer, and offer a form when the request needs the team to check it.

If the customer does not know the model or explicitly says they have no more information, we also need to stop. We should not ask them to measure one dimension, then another, only to tell them at the end that a person still needs to confirm it.

The form is prefilled with information already provided in the conversation. Email is required. Order references and purchase quantities are handled according to the relevant form; not every question needs an order number first.

After submission, the information goes into Case follow-up. That is separate from a person taking over the live chat. Submitting a request does not mean an online support agent has already taken over the conversation.

Human takeover also has its own state. Customers can ask for a person through text or a button. When a support agent clicks to take over, they can do so immediately if the AI is not processing anything. If a reply is already being generated, that reply is allowed to end before the person can send messages, and no new AI tasks are accepted afterward.

Otherwise, it is easy to end up with a support agent already replying while the AI finally sends an earlier answer that took tens of seconds. Both are then trying to talk in the same chat window.

The buttons below the answer need checking too

Even after the main answer is fixed, the buttons below it can still send the conversation in the wrong direction.

A customer only wants to buy an accessory separately, but a button suggests getting a coupon. Another customer says the straw was missing when the package arrived, and the system sends them into a regular purchase flow. After one click, they are in a completely different process.

So checking the model’s answer is not enough. Ordinary follow-up buttons are now generated by the LLM with recent messages, known information, and the current workflow as context. They are then checked for purchase, refund, or handoff intentions that the customer never expressed.

If option generation fails, those options are not shown. The completed answer still goes out. There is no need to fill the gap with a few local suggestions that look clickable but do not fit the situation.

Backend-controlled actions such as product selection, variant selection, and opening a form are still there. When the customer clicks one, the server also checks that it was an option actually sent in the previous reply.

That distinction matters: what was removed was the ordinary suggestions forced in after a model failure. The actions required by the business process remain.

Testing now needs the whole conversation

At this point, checking whether one English sentence gets a reply tells us very little.

A missing straw on arrival and a straw lost after use are different situations. Asking whether an accessory can be bought should not be treated as an after-sales request just because the sentence names a spare part.

The same applies to products. Start with the full name, refer to it as “it” in the next turn, switch to another product, and continue asking about the original specification. Only with those turns together can we tell whether the earlier information was used correctly.

The logs now record the time spent on stages such as semantic recognition, product queries, source retrieval, answer generation, and option generation. Processing records can also be viewed in the admin interface. When an answer is wrong, we can trace back to the product and material it used.

There are still many judgments between finding a related article and answering the customer’s question. What the material actually says, what the customer is asking, whether the product has changed, and what still needs the support team to confirm all have to fit together.

At the end of the previous post, Meilisearch was still waiting to be connected. It is in use now. Most of the time after that has gone into these real conversations: fix search, go back and check context, get the main answer working, then check whether the buttons underneath will send the customer into another workflow.