IP Library Granted Patent US 12,481,689
Granted Patent B1
US 12,481,689 · App. 18/819,708 · Granted Nov 25, 2025

Modifying a user query to prevent hallucinations

Inventors: Bin Wang (Santa Clara, CA); Sayali Pradip Kamat (Fremont, CA)
Assignee: Palo Alto Networks, Inc.
G06F16/335G06F16/3329
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,481,689
App. No.
18/819,708
Granted
Nov 25, 2025
Kind
B1
Abstract

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.

Claims (29)

1 . A method, comprising:

receiving a user query that includes a natural language description, wherein the natural language description includes one or more words corresponding to one or more known parameters associated with a particular schema and one or more words corresponding to an unknown parameter associated with the particular schema;

determining that the user query is an improper request for information including by determining the user query includes the unknown parameter associated with the particular schema;

in response to determining that the user query is the improper request for information, generating a proper request for information, wherein generating the proper request for information includes generating a prompt that utilizes a Pydantic style schema for the one or more known parameters and providing in the prompt an instruction for the unknown parameter;

providing the prompt to a large language model;

receiving a user query response from the large language model;

filtering the user query response based on the unknown parameter; and

providing the filtered user query response.

2 . The method of claim 1 , wherein filtering the user query response from the large language model includes determining data included in the user query response from the large language model to satisfy the request for information and removing a subset of the data included in the user query response from the large language model that does not satisfy the request for information.

3 . A system, comprising:

a processor configured to:

receive a user query that includes a natural language description, wherein the natural language description includes one or more words corresponding to one or more known parameters associated with a particular schema and one or more words corresponding to an unknown parameter associated with the particular schema;

determine that the user query is an improper request for information including by determining the user query includes the unknown parameter associated with the particular schema;

in response to determining that the user query is the improper request for information, generate a proper request for information, wherein to generate the proper request for information, the processor is configured to generate a prompt that utilizes a Pydantic style schema for the one or more known parameters and providing in the prompt an instruction for the unknown parameter;

provide the prompt to a large language model;

receive a user query response from the large language model;

filter the user query response based on the unknown parameter; and

provide the filtered user query response; and

a memory coupled to the processor and configured to provide the processor with instructions.

4 . The system of claim 3 , wherein to filter user query response from the large language model, the processor is configured to determine data included in the user query response from the large language model to satisfy the request for information and remove a subset of the data included in the user query response from the large language model that does not satisfy the request for information.

5 . A non-transitory computer readable medium and comprising computer instructions for:

receiving a user query that includes a natural language description, wherein the natural language description includes one or more words corresponding to one or more known parameters associated with a particular schema and one or more words corresponding to an unknown parameter associated with the particular schema;

determining that the user query is an improper request for information including by determining the user query includes the unknown parameter associated with the particular schema;

in response to determining that the user query is the improper request for information, generating a proper request for information, wherein generating the proper request for information includes generating a prompt that utilizes a Pydantic style schema for the one or more known parameters and providing in the prompt an instruction for the unknown parameter;

providing the prompt to a large language model;

receiving a user query response from the large language model;

filtering the user query response based on the unknown parameter; and

providing the filtered user query response.

6 . The computer program product of claim 5 , wherein filtering the user query response from the large language model includes determining data included in the user query response from the large language model to satisfy the request for information and removing a subset of the data included in the user query response from the large language model that does not satisfy the request for information.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2024
From: WANG, BIN; KAMAT, SAYALI PRADIP
To: PALO ALTO NETWORKS, INC.
Reel/Frame 069659/0640 →
References Cited (14)
US 11301502B1 · Dijamco · 2022 [cited by examiner]
US 12277457B1 · Shetty · 2025 [cited by applicant]
US 12437022B1 · Gehly · 2025 [cited by applicant]
US 20150161241A1 · Haggar · 2015 [cited by examiner]
US 20240411752A1 · Prabhakar · 2024 [cited by examiner]
US 20250061286A1 · Zhou · 2025 [cited by examiner]
US 20250068857A1 · Lakshmikanthan · 2025 [cited by applicant]
US 20250077509A1 · Schindel · 2025 [cited by examiner]
US 20250094439A1 · Telling · 2025 [cited by examiner]
US 20250124024A1 · Kirk · 2025 [cited by examiner]
US 20250139088A1 · Weik · 2025 [cited by applicant]
Article entitled “SQL Error: relation “schema.table” does not exist”, by LookerExperts, dated Jul. 2, 2021 (Year: 2021). [cited by examiner]
Article entitled “CRUSH4SQL: Collective Retrieval Using Schema Hallucination for Text2SQL”, by Kothyari et al., dated Nov. 2, 2023 (Year: 2023). [cited by examiner]
Jovicic et al., Make Model Driven Network Automation Pythonic, Term Project, Department of Computer Science, OSt—University of Applied Sciences, Campus Rapperswil-Jona, Dec. 23, 2022, 72 pages. [cited by applicant]