US 12,271,710 B2
Elidable text for prompt crafting
Max Schaefer, Kidlington (GB); and Albert Ziegler, Uppsala (SE)
Assigned to Microsoft Technology Licensing, LLC., Redmond, WA (US)
Filed by MICROSOFT TECHNOLOGY LICENSING, LLC., Redmond, WA (US)
Filed on May 16, 2023, as Appl. No. 18/198,127.
Claims priority of provisional application 63/452,664, filed on Mar. 16, 2023.
Prior Publication US 2024/0311093 A1, Sep. 19, 2024
Int. Cl. G06F 8/33 (2018.01); G06F 8/30 (2018.01)
CPC G06F 8/33 (2013.01) [G06F 8/37 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A system comprising:
one or more processors; and
a memory that stores one or more programs that are configured to be executed by the one or more processors, the one or more programs including instructions to perform acts that;
access a large language model having a fixed-size context window, wherein the large language model generates a prediction for a task given a prompt;
receive an elidable text, wherein the elidable text comprises an ordered list of data, wherein the ordered list of data includes lines of text and source code statements with an associated priority value;
determine a size of the ordered list of data;
when the size of the ordered list of data exceeds the fixed-size of the context window:
select one item of the ordered list of data to exclude from the ordered list of data based on the priority value associated with each line; and
replace the selected one item from the ordered list of data with a first replacement string; and
construct the prompt for the large language model from the ordered list that meets the fixed-size of the context window.