US 12,461,927 B2
Domain-specific question answering with context reduction for decision making
Biplob Debnath, Princeton, NJ (US); Md Adnan Arefeen, Kansas City, MO (US); and Srimat Chakradhar, Manalapan, NJ (US)
Assigned to NEC Corporation, Tokyo (JP)
Filed by NEC Laboratories America, Inc., Princeton, NJ (US)
Filed on Aug. 12, 2024, as Appl. No. 18/800,781.
Claims priority of provisional application 63/608,492, filed on Dec. 11, 2023.
Claims priority of provisional application 63/605,658, filed on Dec. 4, 2023.
Claims priority of provisional application 63/532,639, filed on Aug. 14, 2023.
Prior Publication US 2025/0061118 A1, Feb. 20, 2025
Int. Cl. G06F 17/00 (2019.01); G06F 7/00 (2006.01); G06F 16/2457 (2019.01); G06N 3/092 (2023.01)
CPC G06F 16/24578 (2019.01) [G06N 3/092 (2023.01)] 14 Claims
OG exemplary drawing
 
1. A computer-implemented method for context reduction, comprising:
identifying a context document relating to a query;
training a policy using reinforcement learning to balance a token ratio and an accuracy difference, including a reward function:

OG Complex Work Unit Math
where τ=t/T is a token ratio between a number of tokens t in the reduced context and a number of tokens T in the context document, r is a score representing accuracy of an output generated by the language model using the reduced context, r* is a score representing accuracy of an output generated by the language model using the context document, and α is a weighting parameter;
determining a number of sentences of the context document to preserve, including applying the query and the context document to the policy to select a proportion of the context document to preserve;
ranking the sentences of the context document according to respective similarities between the sentences and the query;
generating a reduced context that preserves the determined number of highest ranked sentences of the context document and eliminates other sentences from the context document; and
executing the query with a language model, including the reduced context in a prompt, to generate a response.