Critical Thinker Agent¶
The CriticalThinker
is a built-in utility agent in the AI Refinery SDK designed for analyzing conversations to identify potential issues (e.g., finding supporting and/or contradicting information in the conversation etc.). If invoked, it will leverage predefined guidelines to critically evaluate the conversation and provide insights. For example, after a few chat exchanges, if you say, "Hey Critical Thinker, analyze the conversation," the CriticalThinker
will:
- Evaluate the conversation history against specified thinking guidelines
- Identify and highlight any issues in the conversation
- Provide insights into potential concerns within the discussion
Usage¶
As a built-in utility agent in the AI Refinery SDK, CriticalThinker
can be easily integrated into your project by adding the necessary configurations to your project YAML file. Specifically, ensure the following configurations are included:
- Add a utility agent with
agent_class: CriticalThinker
underutility_agents
. - Ensure the
agent_name
you chose for yourCriticalThinker
is listed in theagent_list
underorchestrator
.
Please be aware that the CriticalThinker
will not be triggered automatically by the orchestrator. You can invoke it in two ways:
-
Issue a specific prompt, such as "Hey Critical Thinker, analyze the conversation."
-
Include your
CriticalThinker
in the workflow of a super-agent. Please see an example here.
Quickstart¶
To quickly set up a project with a CriticalThinker
, use the following YAML configuration.
utility_agents:
- agent_class: CriticalThinker
agent_name: "My Critical Thinker" # A name that you choose for your CriticalThinker. This needs to be listed under orchestrator.
config:
thinking_guidelines: # The list of guidelines you want your CriticalThinker to follow.
- "Find supporting and/or contradicting details for all claims made throught the conversation."
- "Evaluate whether if the details you find is consistent with the claims."
- "Come to a logical conclusion on whether with you agree or disagree with the claims based on the details."
orchestrator:
agent_list:
- agent_name: "My Critical Thinker" # The name you chose for your ResearchAgent above.
Template YAML Configuration of CriticalThinker
¶
In addition to the configurations mentioned for the example above, the CriticalThinker
supports several other configurable options. See the template YAML configuration below for all available settings.
Template YAML configuration¶
agent_class: CriticalThinker
agent_name: <name of the agent> # A name that you choose for your CriticalThinker
agent_description: <description of the agent> #Optional
config:
thinking_guidelines: # Optional. The list of guidelines you want your CriticalThinker to follow. Defaults to our pre-defined guidlines if not provide.
- <"Guideline 1">
- <"Guideline 2">
output_style: <"markdown" or "conversational" or "html"> # Optional field
contexts: # Optional field
- "date"
- "chat_history" # the chat history upto a certain number of rounds
- "env_variable"
- "relevant_chat_history" # the chat history that is relevant to the current query
llm_config:
# Optional. Customized llm config (if you want the research agent to use a different LLM than the on in your base config)
model: <model_name>