LLM Query Routing to Prevent Hallucinations in Backend Requests

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems face challenges in effectively handling ambiguous natural language user queries due to hard-coded communication methods between services, which restrict user interactions and are impractical for the vast variety of queries, leading to inefficient and time-consuming coding.

Innovation Solution

Implementing a routing service that utilizes a large language model (LLM) to translate user queries into proper requests, analyze intent, and route them to the correct backend service, accompanied by a request processor and action planner to generate accurate responses, while preventing hallucinations through structured prompts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If hard-coded communication methods are used between services, then system structure is simple and easy to implement, but the system cannot properly handle ambiguous natural language user queries and has restricted user interactions

Engineering Contradiction:
Improveease of implementationVSAvoidhandling capability
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent introduces a natural language processing service as an intermediary between the user and the backend services. This mediator translates ambiguous natural language queries into structured requests that backend services can process, thereby maintaining simple hard-coded service communication while enabling the system to handle diverse and ambiguous user inputs effectively.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If hard-coded communication methods are used for all potential user requests, then implementation is straightforward, but coding every potential use case is time consuming and impractical

Engineering Contradiction:
Improveease of implementationVSAvoiddevelopment time
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The natural language processing service provides a universal solution that handles multiple types of user queries through a single interface. Instead of creating separate hard-coded paths for each potential use case, the NLP service universally processes various natural language inputs and routes them to appropriate backend services, significantly reducing development time while maintaining implementability.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Device complexity

If hard-coded communication methods are used, then system structure is simple, but user options are restricted to predefined ways

Engineering Contradiction:
Improvesystem complexityVSAvoiduser interaction flexibility
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The NLP service acts as a flexible intermediary layer that receives diverse user inputs in natural language and translates them into structured requests. This maintains the simplicity of hard-coded backend service communication while enabling users to interact through natural language rather than being restricted to predefined interaction patterns.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Adaptability or versatility

If natural language processing is introduced to handle ambiguous queries, then user interaction flexibility improves, but system complexity increases

Engineering Contradiction:
Improveuser interaction flexibilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system is segmented into distinct functional modules: the NLP service that handles natural language processing and the backend services that execute specific tasks. This segmentation allows the complexity of NLP to be isolated in a dedicated service while keeping the backend services relatively simple and maintainable through hard-coded communication protocols.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20260111473A1Modifying a user query to prevent hallucinations
Publication Date: 2026.04.23 PALO ALTO NETWORKS INC
  • US20260111473A1 patent drawing
  • US20260111473A1 patent drawing
  • US20260111473A1 patent drawing

AI summary

A user query that includes a natural language description is received. It is determined that the user query is an improper request for information. In response to a determination that the user query is the improper request for information, a proper request for information is generated.