IP Library Granted Patent US 12,737,534
Granted Patent B2
US 12,737,534 · App. 18/631,505 · Granted Sep 15, 2026

Systems and methods for language model-based text editing

Inventors: Raul Puri (San Francisco, CA); Qiming Yuan (San Francisco, CA); Alexander Paino (San Francisco, CA); Nikolas Tezak (San Francisco, CA); Nicholas Ryder (San Francisco, CA)
Assignee: OpenAI Opco, LLC
G06F40/166G06F40/103G06F40/40
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,737,534
App. No.
18/631,505
Granted
Sep 15, 2026
Kind
B2
Abstract

Disclosed herein are methods, systems, and computer-readable media for automatically generating and editing text. In an embodiment, a method may include receiving an input text prompt and receiving one or more user instructions. The method may also include accessing a language model based on the input text prompt and the one or more user instructions. The method may also include outputting, using the accessed language model, language model output text. The method may also include editing the input text prompt based on the language model and the one or more user instructions by replacing at least a portion of the input text prompt with the language model output text.

Claims (53)

1 . A system comprising:

at least one processor configured to perform operations comprising:

receiving a first input text prompt;

receiving one or more user instructions;

normalizing the first input text prompt;

accessing a language model using the at least one processor based on the input text prompt, at least one model parameter, and the one or more user instructions, wherein the at least one model parameters comprises a sampling temperature parameter or a nucleus sampling parameter;

generating one or more context parameters based on the normalized first input text prompt and the one or more user instructions, wherein the one or more context parameters indicate a causal reasoning associated with the first input text prompt;

editing, using the language model, the first input text prompt based on the one or more user instructions and the one or more context parameters to generate a first output text by replacing at least a portion of the first input text prompt;

editing, using the language model, a second input text prompt based on the one or more context parameters to generate a second output text;

optimizing the language model by maximizing a proximity metric reflecting an alignment between at least one of the first output text and the second output text with the one or more context parameters; and

editing, using the optimized language model, a third input text prompt to generate a third output text.

2 . The system of claim 1 , wherein the first input text prompt comprises at least one of text or computer code.

3 . The system of claim 1 , wherein the operations further comprise: receiving at least one or more model parameters, the at least one or more model parameters comprising at least one of a tone, a structure, or a format associated with the first input text prompt.

4 . The system of claim 1 , wherein the operations further comprise selecting the language model by determining a semantic similarity between the first input text prompt and the language model.

5 . The system of claim 4 , wherein selecting the language model is based on the received one or more user instructions.

6 . The system of claim 4 , wherein determining the semantic similarity comprises computing a distance between a text embedding associated with the first input text prompt and a text embedding associated with the language model.

7 . The system of claim 1 , wherein editing the first input text prompt is further based on at least one of a sampling temperature parameter or a nucleus sampling parameter.

8 . The system of claim 1 , wherein the operations further comprise optimizing the language model based on the generated first output text.

9 . The system of claim 1 , wherein replacing at least a portion of the first input text prompt includes inserting text.

10 . The system of claim 1 , wherein replacing at least a portion of the first input text prompt includes removing at least a portion of the first input text.

11 . The system of claim 1 , wherein the one or more user instructions comprise natural language instructions.

12 . The system of claim 1 , wherein the operations further comprise training a machine learning model to select the language model.

13 . A method comprising:

receiving a first input text prompt;

receiving first user instructions;

normalizing the first input text prompt;

accessing a language model based on the first input text prompt, at least one model parameter, and the first user instructions, wherein the at least one model parameters comprises a sampling temperature parameter or a nucleus sampling parameter;

generating one or more context parameters based on the normalized first input text prompt and the first user instructions, wherein the one or more context parameters indicate a causal reasoning associated with the first input text prompt;

editing, using the language model, the first input text prompt based on the first user instructions and the one or more context parameters to generate a first output text by replacing at least a portion of the first input text prompt;

editing, using the language model, a second input text prompt based on the one or more context parameters to generate a second output text;

optimizing the language model by maximizing a proximity metric reflecting an alignment between at least one of the first output text or the second output text with the one or more context parameters; and

editing, using the optimized language model, a third input text prompt to generate a third output text.

14 . The method of claim 13 , further comprising:

receiving at least one or more model parameters, wherein the at least one or more model parameters comprise at least one of a tone, structure, or format associated with the first input text prompt.

15 . The method of claim 14 , further comprising selecting the language model based on the received at least one or more model parameters.

16 . The method of claim 13 , further comprising:

receiving second user instructions; and

editing the first output text based on the received second user instructions.

17 . The method of claim 13 , wherein replacing at least a portion of the first input text prompt includes inserting text.

18 . The method of claim 13 , wherein the one or more user instructions comprise a sequence of instruction segments each comprising natural language text.

19 . A machine learning system comprising:

one or more memory devices storing instructions; and

one or more processors coupled to the one or more memory devices and configured to:

receive a first input text prompt;

receive a user instruction;

normalize the first input text prompt;

generate one or more context parameters based on the normalized first input text prompt and the user instruction, wherein the one or more context parameters indicate a causal reasoning associated with the first input text prompt;

access a language model using the one or more processors based on the first input text prompt, at least one model parameter, and the user instruction, wherein the at least one model parameters comprises a sampling temperature parameter or a nucleus sampling parameter;

generate a first output by replacing at least a portion of the first input text based on the user instructions and the one or more context parameters using the language model;

generate a second output by replacing at least a portion of a second input text prompt based on the one or more context parameters;

optimize the language model by training the model to maximize a proximity metric reflecting an alignment between at least one of the first output or the second output with the one or more context parameters, wherein training the model comprises at least one of: adding, removing, or modifying a parameter of the language model; and

generate, using the optimized language model, a third output by replacing at least a portion of a third input text prompt.

20 . The machine learning system of claim 19 , wherein replacing at least a portion of the first input text includes at least one of inserting text or removing at least a portion of the input text.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 10, 2024
From: PURI, RAUL; YUAN, QIMING; PAINO, ALEXANDER; TEZAK, NIKOLAS; RYDER, NICHOLAS
To: OPENAI OPCO LLC
Reel/Frame 067067/0106 →
Continuity (2)
Continuation 18183902 · Mar 14, 2023
Related Publication 20240311549A1 · Sep 19, 2024
References Cited (42)
US 6253177B1 · Lewis · 2001 [cited by applicant]
US 8352246B1 · Lloyd · 2013 [cited by examiner]
US 9471566B1 · Zhang · 2016 [cited by examiner]
US 9659002B2 · Medlock · 2017 [cited by examiner]
US 10276170B2 · Gruber · 2019 [cited by applicant]
US 10446148B2 · Papangelis · 2019 [cited by applicant]
US 10496687B2 · Cui · 2019 [cited by examiner]
US 10679610B2 · Malhotra · 2020 [cited by examiner]
US 10705794B2 · Gruber · 2020 [cited by applicant]
US 10805647B2 · Zhang · 2020 [cited by examiner]
US 11100290B2 · Boada · 2021 [cited by examiner]
US 11157693B2 · Srinivasan · 2021 [cited by examiner]
US 11170175B1 · Kohli · 2021 [cited by examiner]
US 11516158B1 · Luzhnica · 2022 [cited by applicant]
US 11869490B1 · Gupta · 2024 [cited by examiner]
US 12159119B2 · Heller · 2024 [cited by examiner]
US 20090313017A1 · Nakazawa · 2009 [cited by examiner]
US 20190197315A1 · Zhang · 2019 [cited by examiner]
US 20200020319A1 · Malhotra · 2020 [cited by applicant]
US 20200342172A1 · Cai · 2020 [cited by applicant]
US 20210157553A1 · Ligman et al. · 2021 [cited by applicant]
US 20210295172A1 · Sultan · 2021 [cited by applicant]
US 20210319188A1 · Zhou · 2021 [cited by applicant]
US 20210342517A1 · Ittycheriah et al. · 2021 [cited by applicant]
US 20220237368A1 · Tran · 2022 [cited by applicant]
US 20220335203A1 · Van Dyke et al. · 2022 [cited by applicant]
US 20220350574A1 · Alwell · 2022 [cited by applicant]
US 20220383044A1 · Bellegarda · 2022 [cited by examiner]
US 20230134852A1 · Lee · 2023 [cited by applicant]
US 20230153546A1 · Peleg · 2023 [cited by examiner]
US 20230316003A1 · Friedman · 2023 [cited by examiner]
US 20240095275A1 · Tambi · 2024 [cited by examiner]
US 20240143678A1 · Chen · 2024 [cited by examiner]
US 20240256764A1 · Maschmeyer · 2024 [cited by examiner]
US 20240256792A1 · Maschmeyer · 2024 [cited by examiner]
CN 103154936A · 2013 [cited by applicant]
CN 110489521A · 2019 [cited by examiner]
CN 114238629A · 2022 [cited by examiner]
WO 2022015730A1 · 2022 [cited by applicant]
Zhijing Jin, Yuen Chen, Felix Leeb, Luigi Gresele, Ojasv Kamal, Zhiheng Lyu, Kevin Blin, Fernando Gonzalez, Max Kleiman-Weiner , Mrinmaya Sachan, Bernhard Schölkopf, “Cladder: Assessing Causal Reasoning in Language Mode… [cited by examiner]
Jay Alammar, “The Illustrated GPT-2 (Visualizing Transformer Language Models)”, Feb. 9, 2023, pp. 1-34. [cited by applicant]
European Patent Office, Int'l Search Report in Application No. PCT/US2023/075857 (Jan. 30, 2024), 12 pages. [cited by applicant]