Skip to content

[Enhancement] Add local response caching for repeated LLM queries in GenAI module #87

Description

@shubhreet11

Problem:
Every question sent via the GenAI module hits the Sugar-AI
server even if the same question was asked recently. This
wastes quota and slows response time for children.

Proposed Solution

  • Add a simple local dict-based or JSON cache in the GenAI folder
  • Cache responses for identical questions per session
  • Add a cache size limit to avoid memory issues

Expected Outcome
Faster responses for repeated questions + reduced server load.

I'm a GSoC 2026 contributor and would love to work on this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions