Semantic Cache Thresholding for Accurate Query Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Fuzzy matching in semantic caches for question answering systems using generative AI models leads to incorrect responses and cache misses due to the rigidity and arbitrariness of similarity threshold choices, increasing latency and costs.

Innovation Solution

Generate a distance-dependent F1-optimized similarity threshold based on semantically preserving synthetic variations of queries, using embeddings and training unique thresholds for each query in a semantic cache to improve accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a fixed similarity threshold is used for fuzzy matching in semantic cache, then the system can operate with simple structure, but it causes incorrect responses and cache misses due to rigidity of threshold choice

Engineering Contradiction:
Improvecache system structureVSAvoidresponse accuracy
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent implements dynamic similarity thresholds that are computed at query time based on the specific query characteristics and cache contents, rather than using a fixed threshold. This allows the threshold to adapt to different query types and contexts, improving response accuracy while maintaining system reliability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the similarity threshold parameter dynamically based on query-specific factors such as query length, token distribution, and semantic characteristics. This parameter adaptation resolves the contradiction by allowing the threshold to be flexible rather than rigid, improving reliability without requiring complex system restructuring.

Inventive Principle:
Principle #35Parameter changes

2Loss of time

If a lower similarity threshold is used to increase cache hits, then response time is reduced, but incorrect responses increase due to overly permissive matching

Engineering Contradiction:
Improveresponse timeVSAvoidresponse accuracy
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The similarity threshold is dynamically adjusted based on the specific query being processed, allowing the system to use lower thresholds for queries that can tolerate more flexibility while maintaining higher thresholds for queries requiring precision. This dynamic adjustment reduces response time for suitable queries without increasing incorrect responses.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Different similarity thresholds are applied to different queries based on their individual characteristics such as semantic complexity, token distribution, and expected answer type. This local optimization allows each query to benefit from an appropriately tuned threshold, improving overall response time without sacrificing accuracy.

Inventive Principle:
Principle #3Local quality

3Reliability

If a higher similarity threshold is used to ensure accuracy, then incorrect responses are reduced, but cache misses increase leading to increased latency and costs

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

Solution Approach 1:

The system dynamically computes similarity thresholds that are optimized for each query, allowing higher thresholds when accuracy is critical and lower thresholds when cache hit probability is more important. This dynamic approach reduces cache misses and associated latency/costs while maintaining response accuracy through query-specific threshold selection.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The similarity threshold parameter is changed and optimized for each query based on factors such as query semantics, expected answer confidence, and cache content characteristics. This parameter optimization ensures that queries requiring high accuracy use appropriate thresholds while avoiding unnecessary cache misses that would increase latency and costs.

Inventive Principle:
Principle #35Parameter changes

4Device complexity

If arbitrary threshold choices are made to simplify implementation, then device complexity is reduced, but manufacturing precision of matching accuracy deteriorates

Engineering Contradiction:
Improvethreshold selection mechanismVSAvoidmatching accuracy
Core Design Contradiction:
Device complexityVSManufacturing precision

Solution Approach 1:

The system pre-computes and stores query embeddings and similarity metrics during query processing, making this information available for subsequent threshold computations. This preliminary action simplifies the threshold selection mechanism by providing pre-processed data while improving matching accuracy through informed threshold decisions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system automatically computes and selects appropriate similarity thresholds based on query characteristics and cache contents, eliminating the need for manual or arbitrary threshold configuration. This self-service approach simplifies implementation by removing complex manual tuning while improving matching accuracy through data-driven threshold selection.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20260105004A1System and method for processing queries against semantic cache entries using unique distance-based thresholds
Publication Date: 2026.04.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20260105004A1 patent drawing
  • US20260105004A1 patent drawing
  • US20260105004A1 patent drawing

AI summary

A method, computer program product, and computing system for processing a dataset of query-answer pairs including generating synthetic variations of queries from a dataset of query-answer pairs, generating an embedding dataset by transforming the synthetic variations of queries into synthetic query embeddings and queries in the dataset of query-answer pairs into query embeddings, storing at least a portion of the synthetic query embeddings and query embeddings in a semantic cache, wherein each synthetic query embedding and query embedding stored in the semantic cache is associated with a respective distance threshold determined based at least in part on a measure of semantic similarity between the synthetic query and the query used to generate a particular query embedding, and processing a subsequent query using the synthetic variations of queries from the semantic cache and the distance thresholds.