RAG System Using Smart Chunking and Quantization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Models (LLMs) are resource-intensive, require expensive retraining when underlying information changes, and may 'hallucinate' factually incorrect information, especially in domain-specific contexts like medicine where accurate and up-to-date information is crucial.

Innovation Solution

The implementation of retrieval augmented generation (RAG) systems that utilize a smaller, locally maintained LLM in conjunction with an external database. This system retrieves relevant documents from the database based on user queries, which are then used to inform the LLM's responses, enhancing accuracy and reducing resource requirements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a large LLM is used to provide accurate domain-specific information, then response accuracy is improved, but computational resources and memory requirements increase

Engineering Contradiction:
Improveresponse accuracyVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system segments the knowledge base into domain-specific documents and retrieves only relevant portions needed for answering queries, rather than relying on a large LLM to contain all knowledge internally. This divides the problem into: (1) a smaller LLM for reasoning, and (2) an external retrieval system for accessing domain-specific information.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces an intermediary retrieval mechanism that acts as a bridge between the smaller LLM and the domain-specific knowledge base. The retriever fetches relevant documents based on query understanding, and the smaller LLM uses these retrieved documents to generate accurate responses, eliminating the need for a large LLM.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If a large LLM is trained on domain-specific data to improve accuracy, then response quality is improved, but training cost and time increase

Engineering Contradiction:
Improveresponse qualityVSAvoidtraining time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary organization of domain-specific data into a structured knowledge base with metadata and indexing before deployment. This preliminary action enables efficient retrieval during inference without requiring time-consuming training processes, allowing the smaller LLM to access relevant information quickly when needed.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If a large LLM is used to ensure up-to-date information, then knowledge currency is improved, but retraining cost increases when information changes

Engineering Contradiction:
Improveknowledge currencyVSAvoidretraining cost
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The system implements a dynamic knowledge base where domain-specific documents can be added, updated, or removed without retraining the LLM. The retrieval system automatically adapts to new information by indexing updated documents, allowing the model to maintain current knowledge through simple document updates rather than expensive retraining processes.

Inventive Principle:
Principle #15Dynamics

4Use of energy by moving object

If a smaller LLM is used to reduce resource requirements, then computational efficiency is improved, but response accuracy deteriorates

Engineering Contradiction:
Improvecomputational efficiencyVSAvoidresponse accuracy
Core Design Contradiction:
Use of energy by moving objectVSReliability

Solution Approach 1:

The system merges a smaller LLM with an external retrieval-augmented generation system. The smaller LLM handles reasoning and response generation efficiently, while the retrieval system supplements it with relevant domain-specific information from the knowledge base. This combination allows the smaller LLM to achieve accuracy comparable to or exceeding larger models by accessing external knowledge when needed.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS20250156458A1Efficient rag model for medical applications
Publication Date: 2025.05.15 DATUM POINT LABS INC
  • US20250156458A1 patent drawing
  • US20250156458A1 patent drawing
  • US20250156458A1 patent drawing

AI summary

Embodiments described herein provide systems and methods for retrieval augmented generation. Embodiments herein include a pipeline for database construction from unlabeled data. Embodiments also include smart chunking techniques for more efficient retrieval. Embodiments also include quantization of a sentence embedding model used in the retrieval process, resulting in a faster more lightweight overall system. Use of a lightweight LLM allows for local LLM inference, increasing data privacy.