Look into Retrieval Augmented Generation (RAG) or Grounded Generation. Two terms that should get you where you’re aiming, if by AI you’re talking about LLMs like GPT-4, Claude2, or Llama2.
There are some good libraries out there for this. I personally like llmware (https://github.com/llmware-ai/llmware ) but you could use something like Vectara (closed source) if you just want something that works pretty well and that you can call with an API right off the shelf.
Huggingface chat-ui is nice and can be self-hosted as well: https://github.com/huggingface/chat-ui
Not sure it’s any better than what you’re already using, but it’s worth checking out.