IP Library Granted Patent US 12,430,515
Granted Patent B2
US 12,430,515 · App. 18/603,734 · Granted Sep 30, 2025

Machine-learned language models which generate intermediate textual analysis in service of contextual text generation

Inventors: Noam Shazeer (Palo Alto, CA); Daniel De Freitas Adiwardana (Mountain View, CA)
Assignee: GOOGLE LLC
G06F40/35G06F8/38G06F16/90332G06F16/90335G06F16/9038G06F40/20G06F40/279G06F40/284G06N3/045G06N3/092G06N20/00G10L13/02
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,430,515
App. No.
18/603,734
Granted
Sep 30, 2025
Kind
B2
Abstract

The present disclosure is directed to systems and methods that include and/or leverage one or more machine-learned language models that generate intermediate textual analysis (e.g., including usage of structural tools such as APIs) in service of contextual text generation. For example, a computing system can obtain a contextual text string that includes one or more contextual text tokens. The computing system can process the contextual text string with the machine-learned language model to generate one or more intermediate text strings that include one or more intermediate text tokens. The computing system can process the one or more intermediate text strings with the machine-learned language model to generate an output text string comprising one or more output text tokens. The one or more intermediate text strings can include textual analysis of the contextual text string that supports the output text string.

Claims (73)

1. A computing system for using a machine-learned model to interact with structural tools by constructing input sequences for processing by an attention mechanism of the machine-learned model, the computing system comprising:

one or more processors; and

one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising:

obtaining an initial sequence;

processing the initial sequence using the machine-learned model, wherein the machine-learned model uses an attention mechanism to perform attention over the initial sequence;

generating, based on performing attention over the initial sequence, one or more tool tokens that invoke a structural tool;

providing, based on the one or more tool tokens, a tool input for input to the structural tool;

receiving a tool response output by the structural tool, the tool response being based on the tool input;

constructing an intermediate sequence comprising:

a first portion marked with a first tag; and

a second portion marked with a second tag, wherein the second portion comprises the tool response;

processing the intermediate sequence using the machine-learned model, wherein the machine-learned model uses the attention mechanism to perform attention over the intermediate sequence;

generating, based on performing attention over the intermediate sequence, a response sequence; and

outputting the response sequence.

2. The computing system of claim 1 , wherein the initial sequence comprises contextual text tokens.

3. The computing system of claim 2 , wherein the contextual text tokens are obtained from a user input from a user computing device.

4. The computing system of claim 3 , wherein the machine-learned model is executed on a server remote from the user computing device.

5. The computing system of claim 3 , wherein the machine-learned model is executed on the user computing device.

6. The computing system of claim 3 , the operations comprising:

outputting the response sequence to the user computing device;

receiving an additional sequence;

constructing an additional initial sequence comprising:

the intermediate sequence;

the response sequence marked with a response tag; and

the additional sequence marked with the first tag;

processing the additional initial sequence using the machine-learned model, wherein the machine-learned model uses the attention mechanism to perform attention over the additional initial sequence;

generating, based on performing attention over the additional initial sequence, one or more additional tool tokens that invoke an additional structural tool;

providing, based on the one or more additional tool tokens, an additional tool input for to the additional structural tool;

receiving, from the additional structural tool, an additional tool response based on the additional tool input;

constructing an additional intermediate sequence comprising:

the additional initial sequence; and

an additional second portion marked with the second tag, wherein the additional second portion comprises the additional tool response;

processing, by the computing system, the additional intermediate sequence using the machine-learned model, wherein the machine-learned model uses the attention mechanism to perform attention over the additional intermediate sequence;

generating, by the computing system and based on performing attention over the additional intermediate sequence, an additional response sequence; and

outputting, by the computing system, the additional response sequence.

7. The computing system of claim 6 , wherein the additional structural tool is different from the structural tool.

8. The computing system of claim 1 , comprising:

pausing, by the computing system after generation of the one or more tool tokens, generation of next tokens based on the initial sequence while interacting with the structural tool; and

resuming, by the computing system after receiving the tool response, generation of next tokens based on the intermediate sequence.

9. The computing system of claim 1 , wherein the one or more tool tokens comprise text.

10. The computing system of claim 1 , wherein the second tag is a tool response tag that indicates that the second portion comprises content received from the structural tool.

11. The computing system of claim 1 , wherein the intermediate sequence comprises a tool input portion marked with a tool input tag.

12. The computing system of claim 11 , wherein the tool input portion is ordered preceding to the second portion.

13. The computing system of claim 1 , wherein the machine-learned model is a left-to-right language model configured to predict a next token based on one or more preceding tokens.

14. The computing system of claim 13 , wherein the machine-learned model processes the intermediate sequence to predict one or more tokens in the response sequence.

15. The computing system of claim 1 , wherein the machine-learned model is implemented by a dialog agent configured to conduct a dialogue responsive to user inputs.

16. A computer-implemented method for using a machine-learned model to interact with structural tools by constructing input sequences for processing by an attention mechanism of the machine-learned model, the method comprising:

obtaining, by a computing system comprising one or more computing devices, an initial sequence;

processing, by the computing system, the initial sequence using the machine-learned model, wherein the machine-learned model uses an attention mechanism to perform attention over the initial sequence;

generating, by the computing system and based on performing attention over the initial sequence, one or more tool tokens that invoke a structural tool;

providing, by the computing system, a tool input for input to the structural tool, the tool input being based on the one or more tool tokens;

receiving, by the computing system, a tool response output by the structural tool, the tool response being based on the tool input;

constructing, by the computing system, an intermediate sequence comprising:

a first portion marked with a first tag; and

a second portion marked with a second tag, wherein the second portion comprises the tool response;

processing, by the computing system, the intermediate sequence using the machine-learned model, wherein the machine-learned model uses the attention mechanism to perform attention over the intermediate sequence;

generating, by the computing system and based on performing attention over the intermediate sequence, a response sequence; and

outputting, by the computing system, the response sequence.

17. The method of claim 16 , wherein the second tag is a tool response tag that indicates that the second portion comprises content received from the structural tool.

18. The method of claim 16 , wherein the intermediate sequence comprises a tool input portion marked with a tool input tag.

19. The method of claim 16 , wherein the machine-learned model is a left-to-right language model configured to predict a next token based on one or more preceding tokens.

20. One or more non-transitory computer-readable media that collectively store instructions that, when executed by one or more processors, cause a computing system to perform operations for using a machine-learned model to interact with structural tools by constructing input sequences for processing by an attention mechanism of the machine-learned model, the operations comprising:

obtaining an initial sequence;

processing the initial sequence using the machine-learned model, wherein the machine-learned model uses an attention mechanism to perform attention over the initial sequence;

generating, based on performing attention over the initial sequence, one or more tool tokens that invoke a structural tool;

providing, based on the one or more tool tokens, a tool input for input to the structural tool;

receiving a tool response output by the structural tool, the tool response being based on the tool input;

constructing an intermediate sequence comprising:

a first portion marked with a first tag; and

a second portion marked with a second tag, wherein the second portion comprises the tool response;

processing the intermediate sequence using the machine-learned model, wherein the machine-learned model uses the attention mechanism to perform attention over the intermediate sequence;

generating, based on performing attention over the intermediate sequence, a response sequence; and

outputting the response sequence.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 4, 2024
From: SHAZEER, NOAM; ADIWARDANA, DANIEL DE FREITAS
To: GOOGLE LLC
Reel/Frame 066999/0705 →
Continuity (4)
Continuation 18164216 · Feb 3, 2023
Continuation 17749844 · May 20, 2022
Provisional Application 63191563 · May 21, 2021
Related Publication 20240220734A1 · Jul 4, 2024
References Cited (61)
US 10769295B2 · Loza · 2020 [cited by examiner]
US 10817650B2 · McCann et al. · 2020 [cited by applicant]
US 10877735B1 · Buck · 2020 [cited by examiner]
US 10977711B1 · Verma · 2021 [cited by examiner]
US 11194815B1 · Kumar · 2021 [cited by examiner]
US 11222627B1 · Qian · 2022 [cited by examiner]
US 11256866B2 · Lao et al. · 2022 [cited by applicant]
US 11269907B1 · Martino · 2022 [cited by examiner]
US 11367074B2 · Zoldi · 2022 [cited by examiner]
US 11386259B2 · Heckel · 2022 [cited by examiner]
US 11574131B2 · Shazeer · 2023 [cited by examiner]
US 11600194B2 · McCann et al. · 2023 [cited by applicant]
US 11960848B2 · Shazeer · 2024 [cited by examiner]
US 20040243554A1 · Broder · 2004 [cited by examiner]
US 20040243556A1 · Ferrucci · 2004 [cited by examiner]
US 20040243557A1 · Broder · 2004 [cited by examiner]
US 20040243645A1 · Broder · 2004 [cited by examiner]
US 20050038644A1 · Napper et al. · 2005 [cited by applicant]
US 20110196864A1 · Mason · 2011 [cited by examiner]
US 20140129227A1 · Hagg · 2014 [cited by examiner]
US 20170075877A1 · Lepeltier · 2017 [cited by examiner]
US 20180276525A1 · Jiang et al. · 2018 [cited by applicant]
US 20180285386A1 · Liu · 2018 [cited by examiner]
US 20190108273A1 · Li et al. · 2019 [cited by applicant]
US 20190114549A1 · Olsher · 2019 [cited by examiner]
US 20190130305A1 · Siverston · 2019 [cited by applicant]
US 20190138576A1 · Bolle · 2019 [cited by examiner]
US 20190197109A1 · Peters · 2019 [cited by examiner]
US 20190220619A1 · Loza · 2019 [cited by examiner]
US 20190228336A1 · Kanagawa · 2019 [cited by examiner]
US 20190251178A1 · Tu · 2019 [cited by examiner]
US 20200110803A1 · Djalali · 2020 [cited by examiner]
US 20200143247A1 · Jonnalagadda · 2020 [cited by examiner]
US 20200320411A1 · Hebenthal · 2020 [cited by examiner]
US 20200364408A1 · Lao · 2020 [cited by examiner]
US 20200394260A1 · Wu · 2020 [cited by examiner]
US 20210073465A1 · Duong · 2021 [cited by examiner]
US 20210110258A1 · Lee · 2021 [cited by examiner]
US 20210158789A1 · Wu · 2021 [cited by examiner]
US 20210279235A1 · He · 2021 [cited by examiner]
US 20210319338A1 · Lui · 2021 [cited by examiner]
US 20220051654A1 · Finkelstein · 2022 [cited by examiner]
US 20220067281A1 · Hu · 2022 [cited by examiner]
US 20220139384A1 · Wu · 2022 [cited by examiner]
US 20220206785A1 · Singh · 2022 [cited by examiner]
US 20220207308A1 · Parikh · 2022 [cited by examiner]
US 20220223037A1 · Xu · 2022 [cited by examiner]
US 20220374608A1 · Shazeer · 2022 [cited by examiner]
US 20230009370A1 · Moriya · 2023 [cited by examiner]
US 20230029590A1 · De Freitas Adiwardana · 2023 [cited by examiner]
US 20230036020A1 · Flynn · 2023 [cited by examiner]
US 20230074406A1 · Baeuml · 2023 [cited by examiner]
US 20230177276A1 · Shazeer · 2023 [cited by examiner]
US 20240256786A1 · Shazeer · 2024 [cited by examiner]
CN 110678881A · 2020 [cited by examiner]
CN 111095259A · 2020 [cited by examiner]
International Search Report and Written Opinion for Application No. PCT/US2022/030249, mailed Sep. 8, 2022, 10 pages. [cited by applicant]
International Preliminary Report on Patentability for Application No. PCT/US2022/030249, mailed Nov. 30, 2023, 6 pages. [cited by applicant]
Machine Translated Chinese Search Report Corresponding to Application No. 2022800276029 on Apr. 28, 2024. [cited by applicant]
Kuribayashi et al., “An Empirical Study of Span Representations in Argumentation Structure Parsing”, Journal of Natural Language Processing, Dec. 2020, vol. 27, No. 4, 24 pages. [cited by applicant]
Lu et al., “Goal-Oriented End-to-End Conversational Models with Profile Features in a Real-World Setting”, Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistic… [cited by applicant]