Some checks failed
Choice → Consequence → Learning: - ConsequenceEngine tracks every decision point with alternatives, risk/reward estimates, and actual outcomes - Consequences feed into AdaptiveEthics for experience-based learning - FusionAGILoop now wires ethics + consequences into task lifecycle Causal World Model: - CausalWorldModel learns state-transition patterns from execution history - Predicts outcomes based on observed action→effect patterns - Uncertainty estimates decrease as more evidence accumulates Metacognition: - assess_head_outputs() evaluates reasoning quality from head outputs - Detects knowledge gaps, measures head agreement, identifies uncertainty - Actively recommends whether to seek more information Interpretability: - ReasoningTracer captures full prompt→answer reasoning traces - Each step records stage, component, input/output, timing - explain() generates human-readable reasoning explanations Claim Verification: - ClaimVerifier cross-checks claims for evidence, consistency, grounding - Flags high-confidence claims lacking evidence support - Detects contradictions between claims from different heads 325 tests passing, 0 ruff errors, 0 mypy errors. Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
81 lines
2.0 KiB
Python
81 lines
2.0 KiB
Python
"""Reasoning engine: chain-of-thought, tree-of-thought, and native symbolic reasoning."""
|
|
|
|
from fusionagi.reasoning.cot import (
|
|
build_cot_messages,
|
|
run_chain_of_thought,
|
|
)
|
|
from fusionagi.reasoning.decomposition import decompose_recursive
|
|
from fusionagi.reasoning.gpu_scoring import (
|
|
deduplicate_claims_gpu,
|
|
generate_and_score_gpu,
|
|
score_claims_gpu,
|
|
)
|
|
from fusionagi.reasoning.interpretability import (
|
|
ReasoningTrace,
|
|
ReasoningTracer,
|
|
TraceStep,
|
|
)
|
|
from fusionagi.reasoning.meta_reasoning import (
|
|
challenge_assumptions,
|
|
detect_contradictions,
|
|
revisit_node,
|
|
)
|
|
from fusionagi.reasoning.metacognition import (
|
|
KnowledgeGap,
|
|
MetacognitiveAssessment,
|
|
assess_head_outputs,
|
|
)
|
|
from fusionagi.reasoning.multi_path import generate_and_score_parallel
|
|
from fusionagi.reasoning.native import (
|
|
NativeReasoningProvider,
|
|
PromptAnalysis,
|
|
analyze_prompt,
|
|
produce_head_output,
|
|
)
|
|
from fusionagi.reasoning.recomposition import RecomposedResponse, recompose
|
|
from fusionagi.reasoning.tot import (
|
|
ThoughtBranch,
|
|
ThoughtNode,
|
|
ToTResult,
|
|
expand_node,
|
|
merge_subtrees,
|
|
prune_subtree,
|
|
run_tree_of_thought,
|
|
run_tree_of_thought_detailed,
|
|
)
|
|
|
|
__all__ = [
|
|
"build_cot_messages",
|
|
"run_chain_of_thought",
|
|
"run_tree_of_thought",
|
|
"run_tree_of_thought_detailed",
|
|
"ThoughtBranch",
|
|
"ThoughtNode",
|
|
"ToTResult",
|
|
"expand_node",
|
|
"prune_subtree",
|
|
"merge_subtrees",
|
|
"NativeReasoningProvider",
|
|
"analyze_prompt",
|
|
"produce_head_output",
|
|
"PromptAnalysis",
|
|
"decompose_recursive",
|
|
"load_context_for_reasoning",
|
|
"build_compact_prompt",
|
|
"generate_and_score_parallel",
|
|
"recompose",
|
|
"RecomposedResponse",
|
|
"challenge_assumptions",
|
|
"detect_contradictions",
|
|
"revisit_node",
|
|
"generate_and_score_gpu",
|
|
"score_claims_gpu",
|
|
"deduplicate_claims_gpu",
|
|
"MetacognitiveAssessment",
|
|
"KnowledgeGap",
|
|
"assess_head_outputs",
|
|
"ReasoningTrace",
|
|
"ReasoningTracer",
|
|
"TraceStep",
|
|
]
|