LLM Query Clustering for Distinguishing Similar User Requests

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language models (LLMs) face challenges in distinguishing between semantically similar queries with subtle differences and require frequent re-training due to platform changes, leading to outdated responses and inefficiencies in query resolution.

Innovation Solution

A system that clusters queries based on semantic similarity using LLMs, allowing for refined cluster creation and response generation by matching incoming queries to specific clusters, leveraging embeddings and domain-specific keywords.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Extent of automation

If LLMs are used to generate query responses, then response generation capability is improved, but the ability to distinguish semantically similar queries deteriorates

Engineering Contradiction:
Improveresponse generation capabilityVSAvoidquery distinction accuracy
Core Design Contradiction:
Extent of automationVSMeasurement precision

Solution Approach 1:

The system segments queries into clusters based on semantic similarity before processing. By dividing the query space into distinct clusters, the system can handle semantically similar queries as groups rather than individual items, improving the ability to distinguish between different semantic categories while maintaining automated response generation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary clustering mechanism between query input and LLM response generation. This intermediary layer processes queries through semantic clustering and representative selection, acting as a mediator that enhances query distinction before the LLM generates responses, thereby resolving the contradiction between automation and precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If LLMs are re-trained frequently to adapt to platform changes, then response relevance is improved, but system efficiency deteriorates

Engineering Contradiction:
Improveresponse relevanceVSAvoidsystem efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The system performs preliminary clustering and identifies representative queries in advance, before actual query processing. By pre-organizing queries into clusters and selecting representatives, the system adapts to platform changes through structural organization rather than frequent re-training, maintaining response relevance while preserving system efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses representative queries that copy or represent entire clusters of semantically similar queries. Instead of re-training the LLM for every platform change, the system updates representative queries and cluster structures, which then propagate changes across all similar queries, maintaining adaptability without the overhead of frequent full re-training.

Inventive Principle:
Principle #26Copying

3Productivity

If queries are clustered by semantic similarity, then query processing efficiency is improved, but complexity of query analysis deteriorates

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidquery analysis complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system applies different processing qualities to different parts of the query space. Within each cluster, queries are treated as semantically equivalent and processed efficiently as a group. The clustering mechanism creates local regions of uniformity, allowing efficient batch processing while managing overall system complexity through localized handling.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12579178B2Systems and methods for generating query responses
Publication Date: 2026.03.17 SHOPIFY INC
  • US12579178B2 patent drawing
  • US12579178B2 patent drawing
  • US12579178B2 patent drawing

AI summary

A computer-implemented method is disclosed. The method includes: clustering a set of queries into first clusters; identifying, using a first large language model (LLM), queries in the first clusters that are semantically dissimilar from other queries in their cluster; clustering the queries identified as semantically dissimilar into one or more further clusters; matching a further query to a particular cluster from the first clusters or the further clusters; and obtaining a response to the further query based on providing, to a second LLM, data associated with the particular cluster.