I’ve been exploring how AI chatbots can be integrated into web applications, but reliability seems to be a bigger challenge than simply connecting an LLM API.

For a production chatbot, how do developers handle things like hallucinations, outdated information, conversation context, authentication, and access to application data?

For example, if a PHP application uses an AI chatbot for customer support, would you recommend combining an LLM with a database or knowledge base rather than relying entirely on the model?

I’d be interested in hearing what architecture or safeguards other developers have found useful for keeping chatbot responses accurate while still maintaining a good user experience.

Recommended Answers

All 6 Replies

I wouldn't rely solely on an LLM. For a production-grade chatbot, it is better to combine it with a database or knowledge base, while also implementing authentication, access control, and business logic directly within the application itself. A search mechanism provides the model with relevant information, and the conversation flow can be summarized periodically to keep the information content (context) within manageable limits during the dialogue.

You'll have to define reliable. AI, LLMs and such are not 100% reliable so would you trust an AI Doctor?

For now, all this is bullshittery and AI SLOP.

One thing I’ve realized is that reliability is not really a single feature that can be added to an AI chatbot. It depends on how the entire system is designed around the model.

For a production application, I would be hesitant to let the LLM act as the only source of information. Connecting it to a controlled knowledge base or database can help provide more relevant and up-to-date responses. At the same time, access to application data should be limited based on user permissions rather than giving the chatbot unrestricted access.

I also think fallback mechanisms are important. If the chatbot cannot find reliable information or has low confidence in its response, handing the query to a human or directing the user to the correct resource may be better than generating an uncertain answer.

It would be interesting to know how other developers test these safeguards before moving an AI chatbot from a prototype into a live production environment.

commented: This misses the point that the AI chatbot is FABRICATING the answers. It's CREATING the answers on the fly and at its heart, SLOP! +0

If the chatbot cannot find reliable information or has low confidence in its response

Said no AI EVER. It just eats tokens until the confidence passes a threshold, then parrots the resulting BS to the customer.

Then there is my previous post - manipulating the AI into spilling the beans on topic I'm sure the owner never envisioned.

And if you still don't like it, jailbreak it.
https://duckduckgo.com/?t=ffab&q=AI+jail+break&atb=v296-1&ia=web

commented: Tokens is the new currency here and there is no AI company that will stand behind the results or "do better". Think "ONE ARMED BANDIT". +0

I know this topic is disconnected from reality, but the phrase "if a PHP application uses an AI chatbot for customer support" really struck a nerve with me.

We use AI in web apps in various ways , for instance, "tell us what you want to do and we'll recommend products," paired with a breakdown of why each option is relevant. But using an LLM for basic customer support? What can a model tell a user about their orders that isn't already directly visible on their account panel? What real value does it add that isn't already easier to access elsewhere?

In a massive, complex static knowledge base, maybe a chatbot makes sense. But in standard web apps, adding a non-deterministic filter (the LLM) over deterministic data (e.g., orders, account status, return policies) just makes things worse.

commented: Massive investments mean the the new tool shall be used even when it doesn't make sense. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.