Skip to content

[Feature] Make GenAI Chat Context-Aware with Multi-Session Support #80

@GravityDarkLab

Description

@GravityDarkLab

📝 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-service supports 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-service integrates 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 for sessionId or chatId
  • Store chat history in Redis, database, or memory (depending on performance and persistence needs)
  • Adapt course-service to 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

@GravityDarkLab


⏱️ Priority

  • Critical
  • High
  • Medium
  • Low

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions