-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature] Make GenAI Chat Context-Aware with Multi-Session Support #80
Description
📝 Description
The current chat endpoint in the genai-service is stateless and does not maintain any contextual awareness across requests. This limits its ability to handle coherent multi-turn conversations and support multiple users or chat instances.
This issue aims to make the chat endpoint context-aware and allow handling of multiple independent chat sessions. It requires coordinated changes across the backend services and the client.
📖 User Story
As a user of the AI-powered course assistant,
I want to have a contextual, multi-turn conversation experience that remembers previous messages,
so that I can interact with the assistant in a natural and seamless way over time, even across different topics or sessions.
🎯 Acceptance Criteria
-
The
genai-servicesupports chat sessions with unique identifiers -
Each chat session maintains a contextual history of messages
-
Users can have multiple parallel chat instances (e.g., per course, per topic)
-
The
course-serviceintegrates with the new context-aware chat behavior -
The client allows users to:
- View ongoing chat history
- Switch between or create new chat instances
-
Proper tests and error handling are implemented for session management
🛠️ Proposed Solution
- Add session-based context management to the
genai-service, with support forsessionIdorchatId - Store chat history in Redis, database, or memory (depending on performance and persistence needs)
- Adapt
course-serviceto forward session identifiers appropriately - Update frontend to manage and display multiple chat sessions with their respective histories
📂 Affected Components
genai-service(chat logic, session management)course-service(routing, context forwarding)client(chat UI, history display, session switching)
👥 Assignees
⏱️ Priority
- Critical
- High
- Medium
- Low