Natural Language Cache Matching with Dynamic Similarity Thresholds

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language model (LLM) caches use a static semantic similarity threshold for query matching, which is inflexible and fails to account for various factors, leading to low cache hit rates or irrelevant content retrieval.

Innovation Solution

Implement a dynamic similarity threshold selection mechanism that adapts based on user preferences, query type, latency, cost, and network connectivity to determine the optimal threshold for query matching in LLM caches.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a static semantic similarity threshold is used for query matching in LLM caches, then the system implementation is simple, but the adaptability to different query types and conditions is poor

Engineering Contradiction:
Improveadaptability to different query types and conditionsVSAvoidsystem implementation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a dynamic similarity threshold selection mechanism that adapts the threshold value based on query characteristics, user preferences, and system conditions. Instead of using a fixed static threshold, the system dynamically adjusts the threshold to optimize cache hit rates for different query types and conditions, directly resolving the contradiction between adaptability and implementation complexity

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of similarity threshold from a static fixed value to a dynamic variable that can be adjusted based on multiple factors including query type, user preferences, and system conditions. This parameter change enables the system to adapt to different scenarios while maintaining a relatively simple implementation through modular threshold selection logic

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If a high similarity threshold is used for query matching, then the relevance of cached responses is high, but the cache hit rate decreases

Engineering Contradiction:
Improverelevance of cached responsesVSAvoidcache hit rate
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The system dynamically adjusts the similarity threshold based on query characteristics and user preferences. For queries where high relevance is critical, the threshold is set higher, while for queries where cache hit rate is more important, the threshold is lowered. This dynamic adjustment resolves the contradiction by allowing the system to optimize for either relevance or hit rate depending on the specific query context

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent applies different similarity thresholds to different query types and contexts rather than using a single global threshold. Each query can have its own optimized threshold based on its specific characteristics, user preferences, and system conditions, allowing the system to achieve both high relevance where needed and high cache hit rates where appropriate

Inventive Principle:
Principle #3Local quality

3Productivity

If query matching is performed with low similarity threshold, then the cache hit rate increases, but the relevance of retrieved content decreases

Engineering Contradiction:
Improvecache hit rateVSAvoidrelevance of retrieved content
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The system dynamically selects the similarity threshold based on user preferences and query characteristics. When users prioritize cache hit rate, the system uses lower thresholds to maximize cache utilization. When users prioritize relevance, the system increases the threshold to ensure high-quality matches. This dynamic approach allows the system to optimize for cache hit rate without permanently sacrificing relevance

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the similarity threshold parameter based on multiple factors including user preferences, query type, and system conditions. This parameter adjustment enables the system to achieve high cache hit rates when appropriate while maintaining relevance through context-aware threshold selection, resolving the contradiction between productivity and measurement precision

Inventive Principle:
Principle #35Parameter changes

4Reliability

If all queries are sent to the language model, then the accuracy of responses is high, but the resource consumption and time cost increase

Engineering Contradiction:
Improveaccuracy of responsesVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements a preliminary cache lookup step before sending queries to the language model. The system first checks the cache using dynamic similarity threshold matching to see if a suitable cached response exists. Only if no suitable cache match is found does the system send the query to the language model. This preliminary action filters out many queries that can be answered from cache, significantly reducing resource consumption while maintaining response accuracy for queries that require LLM processing

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts the similarity threshold to optimize the balance between cache utilization and LLM query accuracy. By changing the threshold parameter based on query characteristics and user preferences, the system maximizes cache hit rates for appropriate queries while ensuring that queries requiring LLM processing maintain high accuracy, thus resolving the contradiction between reliability and resource consumption

Inventive Principle:
Principle #35Parameter changes

5Adaptability or versatility

If the similarity threshold is dynamically adjusted, then the adaptability to different conditions improves, but the computational overhead increases

Engineering Contradiction:
Improveadaptability to different conditionsVSAvoidcomputational overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent implements a dynamic threshold selection mechanism that adapts to different query types, user preferences, and system conditions. The system selects from a set of pre-defined threshold values based on the current context, providing adaptability without requiring complex real-time calculations. This approach balances adaptability with computational efficiency by using context-based threshold selection rather than complex dynamic optimization

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the similarity threshold parameter based on multiple factors including query type, user preferences, and system conditions. By using a modular parameter selection approach where thresholds are adjusted based on predefined criteria and user preferences, the system achieves high adaptability while minimizing computational overhead through efficient parameter selection rather than complex real-time optimization

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250328554A1Dynamic similarity threshold selection for natural language caches
Publication Date: 2025.10.23 CISCO TECHNOLOGY INC
  • US20250328554A1 patent drawing
  • US20250328554A1 patent drawing
  • US20250328554A1 patent drawing

AI summary

A device receives a query for input to a language model. The device then selects a particular similarity threshold based on information associated with the query. The device makes, using the particular similarity threshold, a determination as to whether the query matches a cached query. The device provides, based on the determination, a response associated with the cached query in lieu of inputting the query to the language model.