Giter Site home page Giter Site logo

chat-histor-rag's Introduction

README for RAG Chat History Summarization System

Overview

This project introduces a novel approach to managing interactive chat sessions, particularly focusing on optimizing token usage in API calls to large language models (LLMs) such as OpenAI's GPT-3.5. The core innovation lies in the summarization of chat history to reduce token count, thereby minimizing API usage costs and improving performance. The system is designed to facilitate complex question decomposition, answer aggregation, and feedback collection in specialized domains, making it particularly useful for applications requiring detailed and nuanced interactions, such as technical support or educational tutoring.

Features

  • Session Management: Utilizes Redis for efficient session handling, allowing for the retrieval and storage of chat histories associated with unique session tokens.
  • Chat History Summarization: Implements a novel summarization technique to condense chat history, ensuring that token usage in subsequent API calls is minimized without sacrificing the context or quality of interactions.
  • Feedback Logging: Incorporates a feedback mechanism for users to provide input on the system's responses, facilitating continuous improvement and customization based on user interactions.

How It Works

  1. Start Chat: Users initiate a chat session, receiving a unique session token. Chat history is stored in Redis, keyed by this token.
  2. Send Message: Users send messages or questions within their session. The system can handle both simple queries directly and complex questions by breaking them down into simpler components.
  3. Summarization: Before making an API call to the LLM for generating responses, the chat history is summarized to keep the token count low. This is crucial for keeping API costs manageable and ensuring efficient processing.
  4. Feedback Collection: Users can provide feedback on the system's responses. This feedback is logged for analysis and future improvements.

chat-histor-rag's People

Contributors

multiplexerai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.