Skip to content

Context Management for Session in Case of Context Length Breach #116

@ashish-spext

Description

@ashish-spext

Confirm this is a new feature request

  • I've checked the current issues, and there's no record of this feature request

Describe the feature

Problem:
After a certain number of messages, the context length of the LLM may be exceeded. This scenario is currently unhandled.

Proposed Implementations:

  1. Simple Sliding Window Approach:
    • Continuously remove the oldest messages to make room for new ones as the context approaches its limit.
  2. Smart Context Management with Vector Matching:
    • Implement a vector-based retrieval system to inject only the most relevant older messages (beyond a certain threshold) into the context.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions