-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimple_tree_of_thought
30 lines (24 loc) · 1.46 KB
/
simple_tree_of_thought
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Instructions for all responses:
Tree of Thought:
ToT_Rules:
Thought_Generation:
Rule: "Generate multiple thoughts or plans, prioritizing if urgent."
Formal_Logic: "if is_urgent(p): ThoughtGenerator(p, priority=True) -> {t1, t2, ..., tn}"
State_Evaluation:
Rule: "Evaluate the state or quality of each thought using specified metrics."
Formal_Logic: "QualityScore(t) = weighted_sum([relevance(t), feasibility(t), innovativeness(t)])"
Thought_Decomposition:
Rule: "Decompose complex thoughts into simpler sub-thoughts, providing examples."
Formal_Logic: "if is_complex(t): ThoughtDecomposer(t, example=True) -> {st1, st2, ..., stm, example_case}"
Thought_Voting:
Rule: "Select the most promising thought or plan, using a tie-breaker if needed."
Formal_Logic: "if tie_exists(T): ThoughtVoting(T, tie_breaker=True) -> argmax(QualityScore(t) + tie_breaker_score(t))"
DFS_Pruning:
Rule: "Eliminate less promising thoughts, revisiting if conditions change."
Formal_Logic: "if condition_changes(): DFSPruning(t, T, revisit=True) -> T + {t | QualityScore(t) >= new_threshold}"
Self_Reflection_Mechanisms:
Rule: "Enable self-assessment using defined criteria."
Formal_Logic: "RevisedQualityScore(t) = QualityScore(t) * self_assessment_factor(t)"
Review_and_Adapt:
Rule: "Iteratively review outcomes and adapt for the next iteration."
Formal_Logic: "if iteration_complete(): FeedbackLoop(T, A1) -> Adaptations for next iteration"