# US 2026/0093720 A1 · Inference guidance

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0093720 A1
- Document ID: US20260093720A1
- Status: Published application
- Kind: A1
- Application number: 19/339,366
- Filed: 2025-09-25
- Published: 2026-04-02
- Earliest claimed: 2024-10-01
- Assignees: Fujitsu Limited; B.G. Negev Technologies and Applications Ltd.
- Applicants: Fujitsu Limited; B.G. Negev Technologies and Applications Ltd.
- Inventors: Ben GANON; Alon ZOLFI; Omer HOFMAN; Inderjeet SINGH; Hisashi KOJIMA; Yuval ELOVICI; Asaf SHABTAI
- Web page: https://patentgrep.com/patent/US20260093720A1

## CPC

- G06F 16/313: {Selection or weighting of terms for indexing}
- G06F 40/30: Semantic analysis
- G06F 40/35: Discourse or dialogue representation
- G06F 40/56: Natural language generation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method comprising: generating, based on a plurality of candidate output tokens generated by a large language model, LLM, a plurality of candidate token embeddings, respectively and generating, based on at least one string describing prohibited content, at least one content embedding; comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token a similarity score indicating similarity between the candidate output token and the prohibited/unwanted content; for each candidate output token, generating, based on the similarity score and based on a selection probability assigned by the LLM to the candidate output token, an output score; and selecting, based on the output scores, a candidate output token for output by the LLM.

## Claims

### Claim 1

A computer-implemented method comprising:
generating, based on a plurality of candidate output tokens generated by a large language model, LLM, a plurality of candidate token embeddings, respectively and generating, based on at least one string describing prohibited content, at least one content embedding;
comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token a similarity score indicating similarity between the candidate output token and the prohibited content;
for each candidate output token, generating, based on the similarity score and based on a selection probability assigned by the LLM to the candidate output token, an output score; and
selecting, based on the output scores, a candidate output token for output by the LLM.

### Claim 2 (depends on 1)

The computer-implemented method as claimed in claim 1, comprising selecting the plurality of candidate output tokens from among a set of potential output tokens, wherein each of the potential output tokens has a corresponding selection probability assigned by the LLM and wherein selecting the plurality of candidate output tokens comprises:
selecting a subset comprising as few potential output tokens as possible whose selection probabilities sum to meet a cumulative probability threshold; and
sampling b of the potential output tokens, based on their selection probabilities, from among the subset as the plurality of candidate output tokens, where b is an integer greater than 1.

### Claim 3 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein generating the plurality of candidate token embeddings and generating the at least one content embeddings comprises using a transformer-based embedding model or using a transformer network.

### Claim 4 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token the similarity score comprises computing cosine similarity between each candidate token embedding and the at least one content embedding.

### Claim 5 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein selecting a candidate output token for output by the LLM comprises ranking the candidate output tokens according to their output scores and selecting the highest-ranked candidate output token for output by the LLM.

### Claim 6 (depends on 5)

The computer-implemented method as claimed in claim 5, wherein a similarity score indicating a higher similarity has a downward influence on the position of the corresponding candidate output token in the ranking according to the output scores and a similarity score indicating a lower similarity has an upward influence on the position of the corresponding candidate output token in the ranking according to the output scores.

### Claim 7 (depends on 5)

The computer-implemented method as claimed in claim 5, wherein a selection probability indicating a higher probability for selection for output has an upward influence on the position of the corresponding candidate output token in the ranking according to the output scores and a selection probability indicating a lower probability for selection for output has a downward influence on the position of the corresponding candidate output token in the ranking according to the output scores.

### Claim 8 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein computing each output score comprises weighting the effect of the similarity score and the selection probability according to first and second weights.

### Claim 9 (depends on 8)

The computer-implemented method as claimed in claim 8, wherein the first and second weights are α and 1−α, respectively, where α is between 0 and 1.

### Claim 10 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein determining each similarity score comprises computing a cosine similarity between the candidate token embedding concerned and the at least one content embedding and wherein, for each candidate output token, generating the output score comprises:
computing a safety score according to
Ss=½·(1−CS), where Ss is the safety score and CS is the cosine similarity; and
computing the output score according to
So=(1−α)·P+α·Ss, where So is the output score, P is the selection probability, and α is between 0 and 1.

### Claim 11 (depends on 10)

The computer-implemented method as claimed in claim 10, wherein selecting a candidate output token for output by the LLM comprises selecting the candidate output token with the highest output score.

### Claim 12 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein generating the at least one content embedding comprises generating, based on a plurality of strings describing a plurality of categories of prohibited content, a plurality of content embeddings, respectively, and
wherein comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token the similarity score comprises, for each candidate token embedding:
comparing the candidate token embedding with each of the plurality of content embeddings to generate a plurality of auxiliary scores indicating similarity between the candidate output token and the category of prohibited content; and
selecting the auxiliary score indicating the highest similarity as the similarity score.

### Claim 13 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein when the candidate output tokens are candidates for output by the LLM as part of a response by the LLM which is partially completed, generating each of the plurality of candidate token embeddings comprises generating an embedding of a sentence comprising the partially generated response and the candidate output token concerned.

### Claim 14 (depends on 1)

The computer-implemented method as claimed in claim 1, comprising repeating the steps of generating a plurality of candidate token embeddings, comparing the candidate token embeddings with the at least one content embedding, generating output scores, and selecting a candidate output token for output, for at least one further plurality of candidate output tokens generated by the LLM.

### Claim 15 (depends on 1)

The computer-implemented method as claimed in claim 1, comprising obtaining the selection probabilities from a token distribution generated by the LLM.

### Claim 16 (depends on 1)

The computer-implemented method as claimed in claim 1, comprising using/causing the LLM to output the selected candidate output token as part of a response from the LLM.

### Claim 17 (depends on 1)

The computer-implemented method as claimed in claim 1, wherein the prohibited content comprises any of the categories:
security;
overcoming security measures;
cyber-attacks; and
designing/producing cyber-attacks.

### Claim 18 (depends on 1)

The computer-implemented method as claimed in claim 1, comprising using/causing the LLM to generate the candidate output tokens and their selection probabilities based on a prompt to retrieve information from at least one document.

### Claim 19

A computer program which, when run on a computer, causes the computer to carry out a method comprising:
generating, based on a plurality of candidate output tokens generated by a large language model, LLM, a plurality of candidate token embeddings, respectively and generating, based on at least one string describing prohibited content, at least one content embedding;
comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token a similarity score indicating similarity between the candidate output token and the prohibited content;
for each candidate output token, generating, based on the similarity score and based on a selection probability assigned by the LLM to the candidate output token, an output score; and
selecting, based on the output scores, a candidate output token for output by the LLM.

### Claim 20

An information processing apparatus comprising a memory and a processor connected to the memory, wherein the processor is configured to:
generate, based on a plurality of candidate output tokens generated by a large language model, LLM, a plurality of candidate token embeddings, respectively and generate, based on at least one string describing prohibited content, at least one content embedding;
compare the candidate token embeddings with the at least one content embedding to determine for each candidate output token a similarity score indicating similarity between the candidate output token and the prohibited content;
for each candidate output token, generate, based on the similarity score and based on a selection probability assigned by the LLM to the candidate output token, an output score; and
select, based on the output scores, a candidate output token for output by the LLM.
