With the initial setup complete, it’s time to dive into the heart of this course: developing a movie recommendation chatbot. This innovative tool will leverage information from a Neo4j database to deliver accurate and engaging recommendations.
Your Objective
In the upcoming modules, you’ll embark on a project to create a chatbot capable of suggesting movies based on user queries.
You will modify the call()
function in src/modules/agent/index.ts
to call a new Chain.
src/modules/agent/index.ts
→
The function will:
-
Accept the user input as a string along with a Session ID generated by the framework
-
Use any conversation history to rephrase the input into a standalone question
-
Pass the rephrased question to an Agent that will be responsible for selecting the correct tool to satisfy the request
Foundation Tools
You will build the following tools:
-
RetrievalChain
- A tool that uses a Retriever to search the vector index of embedded movie plots to find movies that match a particular theme, for example: "Can you recommend a movie about ghosts?". -
CypherChain
- A tool capable of writing Cypher and executing statements for more complicated questions, for example: "Who has acted in Movies with Tom Hanks?"
The tools will also save the LLM’s response and associated metadata to the database. You will use this information to improve future responses generated by the LLM.
These chains will supply an LLM with the information required to converse with the user.
Are you ready?
Are you ready to get started? Hit the button below to mark the message as complete, and we’ll move on to the next module.
Summary
In this lesson, we covered the architecture you will create as you progress through the course.
In the next module, you will be introduced to LangChain Expression Language (LCEL) and build your first chains.