Chatbots are a thing again, thanks to GenAI and the ease with which you can create such bots with OpenAI APIs or other bespoke models. They pop-up on most websites — funneling users to a product, providing assistance or just more details about the product.
Let me show you how I built one in one on a Saturday evening, maybe spending about 2 hours. Thoughts about how I would improve this at the end.
The codebase is available on my Github — https://github.com/mrsauravsahu/poc-chatbot-genai
The good and the bad ones
While some companies have already gotten their implementation pretty much right, there are many others who still suffer from providing the default ChatGPT like responses, given the users can just type in anything.
So the idea is to build a bot as quickly as possible, but incorporating a few basic guardrails to ensure no irrelevant questions are answered.
My LLM-App Architecture so far
This is the simplified architecture I have so far. The Backend can evolve from a simple server like mine to an entire platform with more convoluted compute system which has data sanitization, caching and auditing in place. For example, my payobills app has Kubernetes based compute…