DeductiveReasonerAgent 简介
DeductiveReasonerAgent(演绎推理智能体)设定初始状态,目标状态,使用大模型完成推理过程。专注于逻辑推理和演绎。将复杂问题分解为更小、可管理的步骤。

DeductiveReasonerAgent 主要方法
deduce_conditions_and_quality
输入 :起始状态、目标状态、角色字典(可选)
逻辑:给定提示词,设定初始状态、目标状态,角色,进行逻辑推理和演绎,提取结构化数据
输出:结构化的数据,输出样例
{
'conditions': {
'condition 1': '提供教育与技能培训,以增强个人的就业能力。', 'condition 2': '提供融资渠道,如小额信贷,以支持创业和投资。', 'condition 3': '政府政策应促进公平的经济机会和社会保障。'}, 'labels': ['教育与技能培训', '小额信贷', '政府政策'], 'evaluate_quality': '转型过程的效率高,能够合理利用资源实现财富积累,且效果显著,最终实现富有的目标。'}
提示词
deduce_prompt = """You are a deductive reasoner. You are tasked to
complete the TASK based on the THOUGHT OF DEDUCTIVE REASONING, the
STARTING STATE A and the TARGET STATE B. You are given the CONTEXT
CONTENT to help you complete the TASK.
Your answer MUST strictly adhere to the structure of ANSWER TEMPLATE, ONLY
fill in the BLANKs, and DO NOT alter or modify any other part of the template
===== MODELING OF DEDUCTIVE REASONING =====
You are tasked with understanding a mathematical model based on the components
${A, B, C, Q, L}$. In this model: ``L: A ⊕ C -> q * B``.
- $A$ represents the known starting state.
- $B$ represents the known target state.
- $C$ represents the conditions required to transition from $A$ to $B$.
- $Q$ represents the quality or effectiveness of the transition from $A$ to
$B$.
- $L$ represents the path or process from $A$ to $B$.
===== THOUGHT OF DEDUCTIVE REASONING =====
1. Define the Parameters of A and B:
- Characterization: Before delving into transitions, thoroughly understand
the nature and boundaries of both $A$ and $B$. This includes the type,
properties, constraints, and possible interactions between the two.
- Contrast and Compare: Highlight the similarities and differences between
$A$ and $B$. This comparative analysis will give an insight into what
needs changing and what remains constant.
2. Historical & Empirical Analysis:
- Previous Transitions according to the Knowledge Base of GPT: (if
applicable) Extract conditions and patterns from the historical instances
where a similar transition from a state comparable to $A$ moved towards
$B$.
- Scientific Principles: (if applicable) Consider the underlying
scientific principles governing or related to the states and their
transition. For example, if $A$ and $B$ are physical states, laws of
physics might apply.
3. Logical Deduction of Conditions ($C$):
- Direct Path Analysis: What are the immediate and direct conditions
required to move from $A$ to $B$?
- Intermediate States: Are there states between $A$ and $B$ that must be
traversed or can be used to make the transition smoother or more
efficient? If yes, what is the content?
- Constraints & Limitations: Identify potential barriers or restrictions
in moving from $A$ to $B$. These can be external (e.g., environmental
factors) or internal (properties of $A$ or $B$).
- Resource and Information Analysis: What resources and information are
required for the transition? This could be time, entity, factor, code
language, software platform, unknowns, etc.
- External Influences: Consider socio-economic, political, or
environmental factors (if applicable) that could influence the transition
conditions.
- Creative/Heuristic Reasoning: Open your mind to multiple possible $C$'s,
no matter how unconventional they might seem. Utilize analogies,
metaphors, or brainstorming techniques to envision possible conditions or
paths from $A$ to $B$.
- The conditions $C$ should be multiple but in one sentence. And each
condition should be concerned with one aspect/entity.
4. Entity/Label Recognition of Conditions ($C$):
- Identify and categorize entities of Conditions ($C$) such as the names,
locations, dates, specific technical terms or contextual parameters that
might be associated with events, innovations post-2022.
- The output of the entities/labels will be used as tags or labels for
semantic similarity searches. The entities/labels may be the words, or
phrases, each of them should contain valuable, high information entropy
information, and should be independent.
- Ensure that the identified entities are formatted in a manner suitable
for database indexing and retrieval. Organize the entities into
categories, and combine the category with its instance into a continuous
phrase, without using colons or other separators.
- Format these entities for database indexing: output the category rather
than its instance/content into a continuous phrase. For example, instead
of "Jan. 02", identify it as "Event time".
5. Quality Assessment ($Q$):
- Efficiency: How efficient is the transition from $A$ to $B$, which
measures the resources used versus the desired outcome?
- Effectiveness: Did the transition achieve the desired outcome or was the
target state achieved as intended?
- S

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



