CONTROL PARAMETER FEEDBACK PROTOCOL FOR ADAPTING TO DATA STREAM RESPONSE FEEDBACK
A method comprising generating a first content sequence by using a context generation component to (1) determine distances between a set of content feature vectors and a client feature vector generated based on client-provided data and (2) determine the first content sequence based on the distances, wherein control parameters of the context generation component are set to a first state; sending a first message generated by sending, to a language model, the client-provided data and the first content sequence; obtaining an accuracy feedback indicator associated with the first message; determining an updated context generation component by applying a feedback-based protocol to the first state to set the control parameters to a second state based on the accuracy feedback indicator; generating a second content sequence by using the updated context generation component based on the set of content feature vectors and the client feature vector; and sending a second message.
1 . A system for providing adaptive responses by varying control parameters in a control loop for a communication component, the system comprising one or more processors and one or more machine-readable media storing program instructions that, when executed by the one or more processors, causes the one or more processors to perform operations comprising:
obtaining a client feature vector that is generated based on data stream data provided by a client device;
generating a first content sequence representing relevant content for the data stream data by using a context generation component to (1) determine distances between a set of content feature vectors stored in a vector database and the client feature vector and (2) determine the first content sequence based on the distances, wherein control parameters of the context generation component are set to a first state to control a selection and an order of the first content sequence;
sending, to the client device, a first message generated by sending, to a language model, the data stream data and the first content sequence;
obtaining, from the client device, an accuracy feedback indicator associated with the first message after the first message is presented on a visual display of the client device;
in response to obtaining the accuracy feedback indicator, updating the context generation component by applying a feedback-based protocol to the first state to set the control parameters to a second state based on the accuracy feedback indicator;
generating a second content sequence by using the updated context generation component based on the set of content feature vectors and the client feature vector; and
sending, to the client device, a second message generated by sending, to the language model, a second input comprising the data stream data and the second content sequence.
2 . A method providing adaptive responses by varying parameters used to select content for an input context, comprising:
generating a first content sequence by using a context generation component to (1) determine distances between a set of content feature vectors and a client feature vector generated based on client-provided data and (2) determine the first content sequence based on the distances, wherein control parameters of the context generation component are set to a first state;
sending, to a client device, a first message generated by sending, to a language model, the client-provided data and the first content sequence;
obtaining an accuracy feedback indicator associated with the first message;
determining an updated context generation component by applying a feedback-based protocol to the first state to set the control parameters to a second state based on the accuracy feedback indicator;
generating a second content sequence by using the updated context generation component based on the set of content feature vectors and the client feature vector; and
sending, to the client device, a second message generated by sending, to the language model, a second input comprising the client-provided data and the second content sequence.
3 . The method of claim 2 , wherein:
the set of content feature vectors is associated with a first set of document weights;
determining the first content sequence based on the distances comprises:
determining a first set of modified weights based on the first set of document weights and the distances;
determining a content order of the first content sequence by sorting the content of the first content sequence by the first set of modified weights;
setting the control parameters to the second state comprises modifying the first set of document weights to determine a second set of document weights; and
generating the second content sequence comprises:
determining a second set of modified weights based on the second set of document weights and the distances; and
determining a new content order of the second content sequence by sorting the content of the second content sequence based on the second set of modified weights.
4 . The method of claim 3 , further comprising:
determining the first set of document weights based on document categories assigned to the set of content feature vectors, wherein each respective vector of the set of content feature vectors is associated one or more categories of the document categories; and
updating at least one association between a category of the document categories and a vector of the set of content feature vectors based a difference between the first set of document weights and the second set of document weights.
5 . The method of claim 2 , wherein the accuracy feedback indicator comprises an indication of at least one of a loss function output, a recall output, or a precision score.
6 . The method of claim 2 , wherein obtaining the accuracy feedback indicator comprises:
generating a response vector by providing the first message to an encoder; and
determining the accuracy feedback indicator based on a difference between the response vector and the client feature vector.
7 . The method of claim 2 , wherein applying the feedback-based protocol comprises:
retrieving a previous parameter update gradient associated with a previous iteration;
determining a result indicating that the accuracy feedback indicator indicates an improvement in accuracy;
determining a next parameter update gradient based on the previous parameter update gradient, wherein the feedback-based protocol determines a next vector direction of the next parameter update gradient based on a previous vector direction of the previous parameter update gradient; and
determining the second state by adding a second vector determined based on the next parameter update gradient to the first state.
8 . The method of claim 2 , further comprising determining a result indicating that the accuracy feedback indicator satisfies an accuracy threshold, wherein updating the context generation component comprises updating the context generation component in response to the result.
9 . The method of claim 2 , further comprising:
generating a set of random values using a random or pseudorandom process; and
setting the first state based on the set of random values.
10 . The method of claim 2 , wherein the feedback-based protocol comprises an exploration parameter and a reward parameter, wherein applying the feedback-based protocol comprises:
determining a first random value;
determining a function output based on the first random value, the exploration parameter, and the reward parameter; and
based on the function output, determining the second state by updating the first state with a set of random values.
11 . The method of claim 2 , wherein the control parameters comprise a set of search parameters, and wherein applying the feedback-based protocol comprises setting the set of search parameters to search for a greater number of neighbors of the client feature vector.
12 . One or more non-transitory, machine-readable media storing program instructions that, when executed by one or more processors, causes the one or more processors to perform operations comprising:
generating a first content sequence by using a context generation component to:
determine distances between a set of content feature vectors and a client feature vector generated based on client-provided data, wherein control parameters of the context generation component are set to a first state; and
determining the first content sequence based on the distances;
sending, to a client device, a first message generated by sending, to a language model, the client-provided data and the first content sequence;
obtaining an accuracy feedback indicator associated with the first message;
determining an updated context generation component by applying a feedback-based protocol to the first state to set the control parameters to a second state based on the accuracy feedback indicator;
generating a second content sequence by using the updated context generation component based on the set of content feature vectors and the client feature vector; and
sending, to the client device, a second message generated by sending, to the language model, a second input comprising the client-provided data and the second content sequence.
13 . The one or more non-transitory, machine-readable media of claim 12 , the operations comprising determining a value k based on an input window size of the language model, wherein determining the first content sequence comprises updating the first content sequence to comprise a first k relevant document.
14 . The one or more non-transitory, machine-readable media of claim 12 , wherein the feedback-based protocol is a first feedback-based protocol, the operations further selecting the first feedback-based protocol from a plurality of feedback-based protocol.
15 . The one or more non-transitory, machine-readable media of claim 12 , wherein:
the set of content feature vectors is associated with a first set of document weights;
determining the first content sequence based on the distances comprises:
determining a first set of modified weights based on the first set of document weights and the distances;
determining a content order of the first content sequence by sorting the first content sequence based on the first set of modified weights;
setting the control parameters to the second state comprises modifying the first set of document weights to determine a second set of document weights; and
generating the second content sequence comprises:
determining a second set of modified weights based on the second set of document weights and the distances; and
determining a new content order of the second content sequence by sorting the second content sequence based on the second set of modified weights.
16 . The one or more non-transitory, machine-readable media of claim 12 , wherein the accuracy feedback indicator comprises an indication of at least one of a loss function output, a recall output, or a precision score.
17 . The one or more non-transitory, machine-readable media of claim 12 , wherein obtaining the accuracy feedback indicator comprises:
generating a response vector by providing the first message to an encoder; and
determining the accuracy feedback indicator based on a difference between the response vector and the client feature vector.
18 . The one or more non-transitory, machine-readable media of claim 12 , wherein applying the feedback-based protocol comprises:
retrieving a previous parameter update gradient associated with a previous iteration;
determining a result indicating that the accuracy feedback indicator indicates an improvement in accuracy;
determining a next parameter update gradient based on the previous parameter update gradient, wherein the feedback-based protocol determines a next vector direction of the next parameter update gradient based on a previous vector direction of the previous parameter update gradient; and
determining the second state by adding a second vector determined based on the next parameter update gradient to the first state.
19 . The one or more non-transitory, machine-readable media of claim 12 , the operations further comprising determining a result indicating that the accuracy feedback indicator satisfies an accuracy threshold, wherein updating the context generation component comprises updating the context generation component in response to the result.
20 . The one or more non-transitory, machine-readable media of claim 12 , the operations further comprising:
generating a set of random values using a random or pseudorandom process; and
setting the first state based on the set of random values.