
Learning Analytics and AI
AI Virtual Learning Analyst
Date
Team
2024
Individual work
My Role
AI Designer
Target Users / Audience
Students
Tools Used
Python, Visual Studio Code, Groq, Chainlit
Overview
This project creates a AI data analysis agent that allows users to ask questions about data they upload in CSV format. It uses the large language model from Groq and the Chainlit framework for the chat interface.
This project creates a AI data analysis agent using Groq and Chainlit for the user interface.
When a chat session starts (@cl.on_chat_start), it initializes the Groq language model, displays a welcome message with an image, and prompts the user to upload a CSV file.

Once a file is uploaded, it reads the data using Pandas, creates a PandasAI agent configured with the language model and specific instructions for data analysis, and stores this agent in the user's session. When the user sends a message (@cl.on_message), the code retrieves the data analysis agent and passes the user's question to it. The agent processes the question against the uploaded data and generates a response, which could be text or an image (like a chart). This response is then sent back to the user through the Chainlit interface.


Below is the full version of the code:
Process
Final Deliverable(s)
Here is a video of how the code works: