Skip to main content Skip to navigation

LeanContext: Cost-Efficient Domain-Specific Question Answering Using LLMs

Project Overview

The document explores the implementation of LeanContext, a cost-effective domain-specific question-answering system leveraging Large Language Models (LLMs) in the educational sector. It addresses the challenges of integrating LLMs into specific domains, particularly concerning high API costs and token limitations. LeanContext innovatively tackles these issues by honing in on key sentences pertinent to user inquiries and employing reinforcement learning to dynamically adjust the context length, thereby achieving substantial cost savings without compromising accuracy. This approach not only enhances the accessibility of AI-driven educational tools but also demonstrates the potential for generative AI to support personalized learning experiences, provide tailored feedback, and facilitate improved student engagement. The findings underscore the effectiveness of LeanContext in streamlining the application of AI in education, showcasing its ability to deliver precise answers while optimizing resource use, ultimately paving the way for broader adoption of AI technologies in educational settings.

Key Applications

LeanContext - domain-specific QA system

Context: Educational context for domain-specific learning, targeting students and researchers needing accurate information from recent documents.

Implementation: LeanContext retrieves relevant document chunks, identifies key sentences using a reinforcement learning technique, and forms a reduced context for LLM querying.

Outcomes: Achieves cost reductions of 37.29% to 67.81% while maintaining accuracy with minimal drop in performance.

Challenges: Token limit restrictions of LLMs necessitate context reduction, and reliance on potentially inaccurate open-source summarizers can impact results.

Implementation Barriers

Cost Barrier

High expenses associated with LLM API usage, particularly for domain-specific queries.

Proposed Solutions: LeanContext proposes a method to reduce context size and thus lower API costs, improving cost efficiency.

Technical Barrier

Limitations of LLMs in processing large documents due to token limits.

Proposed Solutions: Using document chunking to segment information and only retrieve relevant chunks based on user queries.

Project Team

Md Adnan Arefeen

Researcher

Biplob Debnath

Researcher

Srimat Chakradhar

Researcher

Contact Information

For information about the paper, please contact the authors.

Authors: Md Adnan Arefeen, Biplob Debnath, Srimat Chakradhar

Source Publication: View Original PaperLink opens in a new window

Project Contact: Dr. Jianhua Yang

LLM Model Version: gpt-4o-mini-2024-07-18

Analysis Provider: Openai

Let us know you agree to cookies