Large language models (LLMs) like OpenAI’s GPT provide powerful natural language processing capabilities. Integrating those capabilities with React empowers developers to create dynamic, intelligent user interfaces that provide personalized user experiences. Enabling those user interfaces to remember earlier conversations and incorporate that memory as context in new interactions makes AI even more intelligent and human-like — and the application even more effective.
Senior Developer Advocate Jesse Hall explores and explains how to achieve this in JavaScript and React. The app uses Next.js, LangChain, and MongoDB Vector Search to create an application that extends the benefits of LLMs by creating a memory store that enables the app to recall and use previous conversations. Adding this historical insight allows the chatbot to offer responses that are more relevant and tailored to the individual user.
The webinar shows how to:
- Setup the environment and database.
- Create a naive RAG chain with a MongoDB vector store.
- Add a chat history to the RAG chain to improve answer relevance and accuracy.