IP Library › Granted Patent US 12,619,822
Granted Patent B2
US 12,619,822 · App. 18/408,254 · Granted May 5, 2026

Responsible prompt recommendation

Inventors: Vagner Figueredo de Santana (São Paulo, BR); Marisa Affonso Vasconcelos (São Paulo, BR); Melina de Vasconcelos Alberio Guerra (São Paulo, BR); Michael Anthony Feffer (Pittsburgh, PA); Sara E Berger (Beaverton, OR); Tianyu Su (Cambridge, MA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F40/289G06F16/3322G06F16/3325G06F16/334G06F18/2415G06F16/3323G06F16/33295G06F16/3344G06F16/353G06F40/30
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,619,822
App. No.
18/408,254
Granted
May 5, 2026
Kind
B2
Abstract

An embodiment generates, by analyzing prompts, a prompt template. Each prompt includes a text description of a content to be generated by a model. An embodiment classifies, using a first trained classification model, a variant portion of a prompt into a category in a set of categories. An embodiment selects, from a repository of prompt templates including the prompt template, a selected prompt template having a similarity above a threshold similarity to a first prompt. An embodiment classifies, using the selected prompt template, a variant portion of the first prompt into a first category in the set of categories. An embodiment adjusts, responsive to determining that the first category is designated as a harmful category, the variant portion of the first prompt. An embodiment causes, using the adjusted first prompt, the model to produce a first content.

Claims (55)

1 . A computer-implemented method comprising:

generating, by executing a natural language processing algorithm analyzing a plurality of prompts, a prompt template, wherein each prompt in the plurality of prompts comprises a text description of a content to be generated by a large language model;

segmenting, using the prompt template, each prompt in the plurality of prompts into an invariant portion and a variant portion;

training, using prompt text data, a machine learning model to classify variant portions of prompts, the training generating a first trained classification model;

classifying, using the first trained classification model, a variant portion of a prompt in the plurality of prompts into a category in a set of categories, wherein each category of the set of categories comprises a level of harm and wherein each level corresponds to a different type of adjustment;

selecting, using the first trained classification model, from a repository of prompt templates including the prompt template, a selected prompt template, the selected prompt template having a similarity above a threshold similarity to a first prompt;

classifying, using the first trained classification model using the selected prompt template, a variant portion of the first prompt into a first category in the set of categories, the first category comprising a first level of harm;

automatically adjusting, responsive to determining by the first trained classification model that the first category is designated as a harmful category, the variant portion of the first prompt based on the first level of harm, the adjusting resulting in an adjusted first prompt; and

causing, using the adjusted first prompt, the large language model to produce a first content.

2 . The computer-implemented method of claim 1 , wherein a first category in the set of categories is designated as a responsible category.

3 . The computer-implemented method of claim 1 , wherein a second category in the set of categories is designated as a harmful category.

4 . The computer-implemented method of claim 1 , wherein the adjusting removes the variant portion of the first prompt.

5 . The computer-implemented method of claim 1 , wherein the adjusting replaces the variant portion of the first prompt with a replacement variant portion.

6 . The computer-implemented method of claim 1 , further comprising:

selecting, from the repository of prompt templates including the prompt template, a second selected prompt template, the second selected prompt template having a similarity above a threshold similarity to a second prompt;

classifying, using the second selected prompt template, a variant portion of the second prompt into a second category in the set of categories; and

identifying, to a user, responsive to determining that the second category is designated as a responsible category, the variant portion of the first prompt as a responsible portion.

7 . A computer program product comprising one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by a processor to cause the processor to perform operations comprising:

generating, by executing a natural language processing algorithm analyzing a plurality of prompts, a prompt template, wherein each prompt in the plurality of prompts comprises a text description of a content to be generated by a large language model;

segmenting, using the prompt template, each prompt in the plurality of prompts into an invariant portion and a variant portion;

training, using prompt text data, a machine learning model to classify variant portions of prompts, the training generating a first trained classification model;

classifying, using the first trained classification model, a variant portion of a prompt in the plurality of prompts into a category in a set of categories, wherein each category of the set of categories comprises a level of harm and wherein each level corresponds to a different type of adjustment;

selecting, using the first trained classification model, from a repository of prompt templates including the prompt template, a selected prompt template, the selected prompt template having a similarity above a threshold similarity to a first prompt;

classifying, using the first trained classification model using the selected prompt template, a variant portion of the first prompt into a first category in the set of categories, the first category comprising a first level of harm;

automatically adjusting, responsive to determining by the first trained classification model that the first category is designated as a harmful category, the variant portion of the first prompt based on the first level of harm, the adjusting resulting in an adjusted first prompt; and

causing, using the adjusted first prompt, the large language model to produce a first content.

8 . The computer program product of claim 7 , wherein the stored program instructions are stored in a computer readable storage device in a data processing system, and wherein the stored program instructions are transferred over a network from a remote data processing system.

9 . The computer program product of claim 7 , wherein the stored program instructions are stored in a computer readable storage device in a server data processing system, and wherein the stored program instructions are downloaded in response to a request over a network to a remote data processing system for use in a computer readable storage device associated with the remote data processing system, further comprising:

program instructions to meter use of the program instructions associated with the request; and

program instructions to generate an invoice based on the metered use.

10 . The computer program product of claim 7 , wherein a first category in the set of categories is designated as a responsible category.

11 . The computer program product of claim 7 , wherein a second category in the set of categories is designated as a harmful category.

12 . The computer program product of claim 7 , wherein the adjusting removes the variant portion of the first prompt.

13 . The computer program product of claim 7 , wherein the adjusting replaces the variant portion of the first prompt with a replacement variant portion.

14 . The computer program product of claim 7 , further comprising:

selecting, from the repository of prompt templates including the prompt template, a second selected prompt template, the second selected prompt template having a similarity above a threshold similarity to a second prompt;

classifying, using the second selected prompt template, a variant portion of the second prompt into a second category in the set of categories; and

identifying, to a user, responsive to determining that the second category is designated as a responsible category, the variant portion of the first prompt as a responsible portion.

15 . A computer system comprising a processor and one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by the processor to cause the processor to perform operations comprising:

generating, by executing a natural language processing algorithm analyzing a plurality of prompts, a prompt template, wherein each prompt in the plurality of prompts comprises a text description of a content to be generated by a large language model;

segmenting, using the prompt template, each prompt in the plurality of prompts into an invariant portion and a variant portion;

training, using prompt text data, a machine learning model to classify variant portions of prompts, the training generating a first trained classification model;

classifying, using the first trained classification model, a variant portion of a prompt in the plurality of prompts into a category in a set of categories, wherein each category of the set of categories comprises a level of harm and wherein each level corresponds to a different type of adjustment;

selecting, using the first trained classification model, from a repository of prompt templates including the prompt template, a selected prompt template, the selected prompt template having a similarity above a threshold similarity to a first prompt;

classifying, using the first trained classification model using the selected prompt template, a variant portion of the first prompt into a first category in the set of categories, the first category comprising a first level of harm;

automatically adjusting, responsive to determining by the first trained classification model that the first category is designated as a harmful category, the variant portion of the first prompt based on the first level of harm, the adjusting resulting in an adjusted first prompt; and

causing, using the adjusted first prompt, the large language model to produce a first content.

16 . The computer system of claim 15 , wherein a first category in the set of categories is designated as a responsible category.

17 . The computer system of claim 15 , wherein a second category in the set of categories is designated as a harmful category.

18 . The computer system of claim 15 , wherein the adjusting removes the variant portion of the first prompt.

19 . The computer system of claim 15 , wherein the adjusting replaces the variant portion of the first prompt with a replacement variant portion.

20 . The computer system of claim 15 , further comprising:

selecting, from the repository of prompt templates including the prompt template, a second selected prompt template, the second selected prompt template having a similarity above a threshold similarity to a second prompt;

classifying, using the second selected prompt template, a variant portion of the second prompt into a second category in the set of categories; and

identifying, to a user, responsive to determining that the second category is designated as a responsible category, the variant portion of the first prompt as a responsible portion.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2024
From: FIGUEREDO DE SANTANA, VAGNER; VASCONCELOS, MARISA AFFONSO; GUERRA, MELINA DE VASCONCELOS ALBERIO; FEFFER, MICHAEL ANTHONY; BERGER, SARA E; SU, TIANYU
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 066076/0665 →
Continuity (1)
Related Publication 20250225325A1 · Jul 10, 2025
References Cited (92)
US 5754737A · Gipson · 1998 [cited by applicant]
US 7047241B1 · Erickson · 2006 [cited by applicant]
US 7849399B2 · Hoffmann · 2010 [cited by applicant]
US 8200580B1 · Grinchenko et al. · 2012 [cited by applicant]
US 8201085B2 · Rollins et al. · 2012 [cited by applicant]
US 8843543B2 · Damman et al. · 2014 [cited by applicant]
US 8966272B2 · Kiel et al. · 2015 [cited by applicant]
US 9015030B2 · Hunter et al. · 2015 [cited by applicant]
US 9164982B1 · Kaeser · 2015 [cited by applicant]
US 9218333B2 · Liensberger · 2015 [cited by applicant]
US 9336184B2 · Mital et al. · 2016 [cited by applicant]
US 9390087B1 · Roux et al. · 2016 [cited by applicant]
US 9977672B2 · Leupold et al. · 2018 [cited by applicant]
US 10250538B2 · Prabhu · 2019 [cited by applicant]
US 10290128B2 · Liu et al. · 2019 [cited by applicant]
US 10474455B2 · Makkar · 2019 [cited by applicant]
US 10528597B2 · Kohlmeier et al. · 2020 [cited by applicant]
US 10643144B2 · Bowers et al. · 2020 [cited by applicant]
US 10936805B2 · de Mello Brandao et al. · 2021 [cited by applicant]
US 10970315B2 · Griffith · 2021 [cited by applicant]
US 11182564B2 · Li et al. · 2021 [cited by applicant]
US 11442702B2 · Smith et al. · 2022 [cited by applicant]
US 12079570B1 · Mondlock · 2024 [cited by examiner]
US 20060247914A1 · Brener et al. · 2006 [cited by applicant]
US 20180188824A1 · Dunne et al. · 2018 [cited by applicant]
US 20190354580A1 · Willmore et al. · 2019 [cited by applicant]
US 20210089617A1 · Li · 2021 [cited by examiner]
US 20210149996A1 · Bellegarda · 2021 [cited by examiner]
US 20220114678A1 · Figueredo de Santana et al. · 2022 [cited by applicant]
US 20230051175A1 · Wu et al. · 2023 [cited by applicant]
US 20230075182A1 · Galuten · 2023 [cited by applicant]
US 20230259705A1 · Tunstall-Pedoe et al. · 2023 [cited by applicant]
US 20240160902A1 · Padgett · 2024 [cited by examiner]
US 20240403005A1 · Friddle · 2024 [cited by examiner]
US 20250005299A1 · Padmanabhan · 2025 [cited by examiner]
US 20250068741A1 · Lafon · 2025 [cited by examiner]
US 20250094471A1 · Brenna · 2025 [cited by examiner]
US 20250103746A1 · Gharibi · 2025 [cited by examiner]
US 20250111155A1 · Niu · 2025 [cited by examiner]
US 20250124234A1 · Enes · 2025 [cited by examiner]
US 20250124393A1 · DeRodes · 2025 [cited by examiner]
US 20250133037A1 · Jensen · 2025 [cited by examiner]
US 20250156632A1 · Sethuraman · 2025 [cited by examiner]
US 20250165589A1 · Bannihatti Kumar · 2025 [cited by examiner]
US 20250181844A1 · Rosset · 2025 [cited by examiner]
US 20250190853A1 · Abbas · 2025 [cited by examiner]
US 20250209279A1 · Wang · 2025 [cited by examiner]
US 20250209282A1 · Liu · 2025 [cited by examiner]
US 20250217586A1 · Sinha · 2025 [cited by examiner]
US 20250225158A1 · Figueredo De Santana et al. · 2025 [cited by applicant]
US 20250238627A1 · Carrillo · 2025 [cited by examiner]
US 20250307777A1 · Kumar · 2025 [cited by examiner]
CN 107330023B · 2021 [cited by applicant]
CN 106796602B · 2021 [cited by applicant]
CN 112364148B · 2022 [cited by applicant]
CN 114911947A · 2022 [cited by applicant]
CN 116415650A · 2023 [cited by applicant]
CN 116503683A · 2023 [cited by applicant]
CN 116303980B · 2023 [cited by applicant]
CN 116522926A · 2023 [cited by applicant]
CN 116611448A · 2023 [cited by applicant]
CN 116861921A · 2023 [cited by applicant]
CN 116958700A · 2023 [cited by applicant]
CN 116975927A · 2023 [cited by applicant]
CN 117034907A · 2023 [cited by applicant]
CN 117035076A · 2023 [cited by applicant]
CN 117272988A · 2023 [cited by examiner]
KR 102197023B1 · 2020 [cited by applicant]
WO WO2025093936A1 · 2025 [cited by examiner]
Machine translation CN-117272988-A. (Year: 2023). [cited by examiner]
Roose, An A.I.-Generated Picture Won an Art Prize. Artists Aren't Happy, Sep. 2, 2022, https://www.nytimes.com/2022/09/02/technology/ai-artificial-intelligence-artists.html. [cited by applicant]
Kerner, How generative AI and [cited by applicant]
Creative Commons, About CC Licenses, 2023, https://creativecommons.org/about/cclicenses/. [cited by applicant]
Koaa, AI-created artwork wins first place at Colorado State Fair, artist receives criticism, Sep. 1, 2022, https://www.koaa.com/news/covering-colorado/ai-created-artwork-wins-first-place-at-coloradostate-fair-artist-rec… [cited by applicant]
Jackson, Can You Copyright Your Written AI Prompt, Apr. 22, 2023, https://www.linkedin.com/pulse/can-you-copyright-your-written-ai-prompt-mitch-jackson-esq-. [cited by applicant]
Farrell, Search-Log Analysis: The Most Overlooked Opportunity in Web UX Research, Jul. 30, 2017, https://www.nngroup.com/articles/search-log-analysis/. [cited by applicant]
Li et al., Personalized Prompt Learning for Explainable Recommendation, Jan. 13, 2023. [cited by applicant]
Wu et al., Selective Fairness in Recommendation via Prompts, Jul. 5, 2022. [cited by applicant]
Wu et al., Personalized Prompt for Sequential Recommendation, Feb. 15, 2023. [cited by applicant]
Wang et al., Toxicity Detection with Generative Prompt-based Inference, May 24, 2022. [cited by applicant]
Ronanki et al., Requirements Engineering using Generative AI: Prompts and Prompting Patterns, Nov. 7, 2023. [cited by applicant]
Dragotti, Generative AI and Prompt Protection Under Intellectual Property Law, Feb. 15, 2023, https://www.dlapiper.com/en-it/insights/publications/law-in-tech/generative-ai-and-prompt-protection-under-intellectual-prope… [cited by applicant]
Dragotti, Generative Artificial Intelligence (AI) and Prompt Protection Under Intellectual Property Law, Feb. 7, 2023, https://www.gamingtechlaw.com/2023/02/generative-artificial-intelligence-ai-prompt-protection-intell… [cited by applicant]
Promptbase, Prompt Marketplace, 2023, https://promptbase.com/. [cited by applicant]
Promptperfect, PromptPerfect—The premier tool for prompt engineering, 2023, https://promptperfect.jina.ai/. [cited by applicant]
Theres an AI for That, PromptPerfect, Feb. 28, 2023, https://theresanaiforthat.com/ai/promptperfect/?ref=search&term=PromptPerfect. [cited by applicant]
Giray, Prompt Engineering with ChatGPT: A Guide for Academic Writers, Jun. 7, 2023. [cited by applicant]
Reimers et al., Sentence Transformers, 2023, https://huggingface.co/sentence-transformers. [cited by applicant]
Krause, Proper Generative AI Prompting for Financial Analysis, Oct. 27, 2023. [cited by applicant]
Gao, Prompt Engineering for Large Language Models—A brief guide with examples for non-technical readers, Jul. 17, 2023. [cited by applicant]
Zamfirescu-Pereira et al., Why Johnny Can't Prompt: How Non-AI Experts Try (and Fail) to Design LLM Prompts, CHI '23, Apr. 23-28, 2023. [cited by applicant]
List of all IBM related dockets, 2023. [cited by applicant]