IP Library Granted Patent US 12705438
Granted Patent B2
US 12705438 · App. 18/617,985 · Granted Aug 11, 2026

Hallucination detection via multilingual prompt

Inventors: Guy Shtar (Ness Ziona, IL); Yair Horesh (Kfar-Saba, IL); Ron Bitton (Hod Hasharon, IL)
Assignee: INTUIT INC.
G06F40/58
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 12705438
App. No.
18/617,985
Granted
Aug 11, 2026
Kind
B2
Abstract

Aspects of the present disclosure relate to detecting hallucinations in language model outputs. Embodiments include receiving a user query. Embodiments further include prompting a language processing machine learning model to generate responses to the user query in each language of a set of multiple languages. Embodiments further include receiving the responses from the language processing machine learning model in response to the prompting. Embodiments further include creating embedding representations of the responses. Embodiments further include calculating, based on the embedding representations, a degree of semantic similarity between the responses. Embodiments further include determining that a response of the responses contains a model hallucination based on comparing the degree of semantic similarity between the responses to a threshold.

Claims (40)

1 . A method of detecting hallucinations in language model outputs, comprising:

receiving a user query;

prompting a language processing machine learning model to generate a response to the user query in each language of a set of multiple languages;

generating the response in each language of the set of multiple languages via the language processing machine learning model in response to the prompting;

creating embedding representations of the generated responses;

calculating, based on the embedding representations, a degree of semantic similarity between the generated responses; and

determining that a response of the responses contains a model hallucination based on comparing the degree of semantic similarity between the generated responses to a threshold.

2 . The method of claim 1 , wherein one language of the set of multiple languages is a language associated with the user query.

3 . The method of claim 1 , wherein, based on the determining that the response contains the model hallucination, one or more additional responses are generated.

4 . The method of claim 1 , wherein the language processing machine learning model comprises a Large Language Model (LLM).

5 . The method of claim 4 , wherein, based on the determining that the response contains the model hallucination, one or more parameters of the LLM are adjusted.

6 . The method of claim 1 , further comprising, based on the determining that the response contains the model hallucination, providing an indication to a user that the response contains a hallucination.

7 . The method of claim 1 , wherein calculating the degree of semantic similarity between the generated responses is further based on calculating a standard deviation among the embedding representations.

8 . The method of claim 1 , wherein calculating the degree of semantic similarity between the generated responses is further based on applying a clustering algorithm to the embedding representations.

9 . The method of claim 8 , wherein a language is removed from the set of multiple languages based on the applying of the clustering algorithm to the embedding representations.

10 . A method of detecting hallucinations in language model outputs, comprising:

receiving a user query;

prompting a large language model (LLM) to generate a response to the user query in each language of a set of multiple languages, wherein one language of the set of multiple languages is a language associated with the user query;

creating embedding representations of the generated responses;

calculating, based on the embedding representations, a degree of semantic similarity between a response of the responses that is in the language associated with the user query and a different response of the responses that is in a different language than the language associated with the user query;

determining that the response that is in the language associated with the user query contains a model hallucination based on the degree of semantic similarity failing to meet a threshold; and

generating a new response or a notification based on the determining that the response that is in the language associated with the user query contains the model hallucination.

11 . The method of claim 10 , wherein, based on the determining that the response contains the model hallucination, one or more parameters of the LLM are adjusted.

12 . A system for detecting hallucinations in language model outputs, comprising:

one or more processors; and

a memory comprising instructions that, when executed by the one or more processors, cause the system to:

receive a user query;

prompt a language processing machine learning model to generate a response to the user query in each language of a set of multiple languages;

generate the response in each language of the set of multiple languages via the language processing machine learning model in response to the prompting;

create embedding representations of the generated responses;

calculate, based on the embedding representations, a degree of semantic similarity between the generated responses; and

determine that a response of the generated responses contains a model hallucination based on comparing the degree of semantic similarity between the generated responses to a threshold.

13 . The system of claim 12 , wherein one language of the set of multiple languages is a language associated with the user query.

14 . The system of claim 12 , wherein, based on the determining that the response contains the model hallucination, one or more additional responses are generated.

15 . The system of claim 12 , wherein the language processing machine learning model comprises an LLM.

16 . The system of claim 15 , wherein one or more parameters of the LLM are adjusted based on determining that the response contains the model hallucination.

17 . The system of claim 12 , further comprising, based on the determining that the response contains the model hallucination, providing an indication to a user that the response contains a hallucination.

18 . The system of claim 12 , wherein calculating the degree of semantic similarity between the generated responses is further based on calculating a standard deviation among the embedding representations.

19 . The system of claim 12 , wherein calculating the degree of semantic similarity between the generated responses is further based on applying a clustering algorithm to the embedding representations.

20 . The system of claim 19 , wherein a language is removed from the set of multiple languages based on the applying of the clustering algorithm to the embedding representations.