Explore the use of AG2’s RetrieveChat for tasks like code generation from docstrings, answering complex questions with human feedback, and exploiting features like Update Context, custom prompts, and few-shot learning.
AssistantAgent
and
RetrieveUserProxyAgent
, which is similar to the usage of
AssistantAgent
and UserProxyAgent
in other notebooks (e.g.,
Automated Task Solving with Code Generation, Execution &
Debugging).
Essentially, RetrieveUserProxyAgent
implement a different auto-reply
mechanism corresponding to the RetrieveChat prompts.
Update Context
config_list_from_json
function loads a list of configurations from an environment variable or
a json file.
AssistantAgent
and
RetrieveUserProxyAgent
. The system message needs to be set to “You are
a helpful assistant.” for AssistantAgent. The detailed instructions are
given in the user message. Later we will use the
RetrieveUserProxyAgent.message_generator
to combine the instructions
and a retrieval augmented generation task for an initial prompt to be
sent to the LLM assistant.
tune_automl
in FLAML?
gpt-3.5-turbo
model, and we will demonstrate RetrieveChat’s
feature of automatically updating context in case the documents
retrieved do not contain sufficient information.
UPDATE CONTEXT
. With the unique and innovative ability
to update context in RetrieveChat, the agent automatically updated the
context and sent it to the LLM model again. After several rounds of this
process, the agent was able to generate the correct answer to the
questions.
gpt-3.5-turbo
model, and we will demonstrate RetrieveChat’s
feature of automatically updating context in case the documents
retrieved do not contain sufficient information. Moreover, we’ll
demonstrate how to use customized prompt and few-shot learning to
address tasks that are not pre-defined in RetrieveChat.