In one implementation, a computer-implemented method involves receiving a user message corresponding to a query or a statement to AI
chatbot, performing preprocessing operations resulting in generation of initial context of the user message by extracting text of the user message,
metadata of the user message, and a conversation identifier, obtaining historical context pertaining to the user message from a plurality of storage mechanisms provided in differing formats including a
knowledge graph, a vector
database comprised of vector embeddings, and a
database comprising text summaries of prior conversations between the user and the AI
chatbot, generating a prompt for a LLM that instructs the LLM to generate a response to the user message that is based on and consistent with the user message, the initial content, and the historical context, and providing a final response to the user that is corresponds to an LLM-generated response.