Domain-Specific Question Answering With Query-Ranked Context Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models (LLMs) struggle to provide accurate responses to domain-specific questions due to limited training data and token limits in prompts, leading to inaccurate responses, especially when dealing with non-standard terminology or rapidly changing contexts.

Innovation Solution

Implement context reduction techniques to identify the most relevant sentences from a context document using reinforcement learning, reducing the context to fit within the LLM's token limit while maintaining accuracy, by ranking sentences based on similarity to the query and dynamically determining the number of sentences to preserve.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the entire context document is provided to the language model, then the model has access to complete information for accurate domain-specific responses, but the prompt exceeds the LLM's token limit and execution costs increase

Engineering Contradiction:
Improveresponse accuracyVSAvoidtoken quantity
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the most relevant sentences from the context document based on similarity scoring against the query. A sentence embedding model compares each sentence in the context document with the query to identify and extract only those sentences that are most relevant to answering the specific question, thereby reducing token quantity while preserving response accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The context document is segmented into individual sentences, which are then independently evaluated for relevance to the query. This segmentation allows the system to selectively include only necessary portions of the context rather than processing the entire document, effectively managing token limits while maintaining information quality.

Inventive Principle:
Principle #1Segmentation

2Reliability

If more sentences are preserved from the context document, then response accuracy is maintained, but the prompt size increases and may exceed token limits

Engineering Contradiction:
Improveresponse accuracyVSAvoidprompt structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent dynamically adjusts the number of sentences to preserve based on query-specific relevance scoring. Instead of using a fixed threshold, the system calculates similarity scores between the query and each context sentence, then selects sentences based on these dynamic parameters, optimizing the balance between accuracy and prompt size for each specific query.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If domain-specific context is provided to improve accuracy on non-standard terminology, then the LLM can handle specialized queries, but the execution cost increases due to larger prompt size

Engineering Contradiction:
Improvedomain-specific accuracyVSAvoidexecution cost
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system extracts only the essential domain-specific sentences that contain non-standard terminology or specialized knowledge relevant to the query. By using similarity scoring, it identifies and extracts only those context sentences that contribute to domain-specific accuracy, eliminating redundant information and reducing execution costs.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12461927B2Domain-specific question answering with context reduction for decision making
Publication Date: 2025.11.04 NEC CORP
  • US12461927B2 patent drawing
  • US12461927B2 patent drawing
  • US12461927B2 patent drawing

AI summary

Methods and systems for context reduction include identifying a context document relating to a query. A number of sentences of the context document to preserve is determined. The sentences of the context document are ranked according to respective similarities between the sentences and the query. A reduced context is generated that preserves the determined number of highest ranked sentences of the context document and eliminates other sentences from the context document. The query is executed with a language model, including the reduced context in a prompt, to generate a response.