Assignment - AI Lecture Series
In this multipart assignment series we will be developing a chatbot which is capable of generating domain specific as well as user specific responses.
The status quo chatbots in the current market use Large Language Models to answer user queries. However, LLMs seems to hallucinate and misinterpret information due to less context awareness and the lack of recent information about the topic. This has become a problem for many chatbots which are purposefully built to answer domain specific queries.
The final goal of this assignment is to build a chatbot which can use available specific information and user data to answer queries much accurately, in jaclang. For these assignments, assume there is only user quarriying about health and medical questions.
- A chat-bot that uses three different techniques when answering health related queries.
- Use Retrieval Augmented Generation with a repository of expert articles on health and medicine.
- Use user-data to generate a more personalized answer.
- Give recommendations based on the medical To-do data of the patient.
The query from the user should be routed to its specific type based upon the context offered in the query.
The data spatial implementation of the chatbot skeleton is expected to view as below.
-
user: This chatbot supports multiple users. Each user has their own user node. Let’s consider single user for this assignment.
-
session: This chatbot supports back-and-forth conversation. The chat history is managed in sessions. So each user might have many sessions. Each session represents one conversation between that user and the chatbot.
-
data: A node that contains user's health data. It is a user specific data.
-
todo: Similar to data node. This node contains another type of user specific data - their to-do list.
NOTE : The edges used so far in the graph are generic edges.
-
create_graph: This walker creates the graph excluding session nodes.
-
chat: This walker creates the session node while gathering all the data and saving to the session node.
Build a ‘query’ walker which activates (spawns) on a session node.
The walker should:
- Build the sub-graph shown in the diagram.
-
router : gets a specific user input from user (‘RAG’, ‘QA’,’TODO’) and direct the walker to the correct functional node.
-
RAG : This node will be implemented in coming weeks of the assignment. For now, when the query walker enters this node, it should print "I am RAG".
-
User_QA : This node will be implemented in coming weeks of the assignment. For now, when the query walker enters this node, it should print "I will respond using user data." and the
user_datagathered in the session node. -
TODO nodes : This node will be implemented in coming weeks of the assignment. For now, when the query walker enters this node, it should print "I will respond using user to-do list." and the
todogathered in the session node.

