Autonomous General Intelligence (AGI) framework

Autonomous Generative Intelligence Framework

As we celebrate the establishment of the easy Autonomous General Intelligence (AGI) framework, it’s essential to appreciate the intricate steps that transform a user’s input into a well-reasoned response. This article provides a verbose detailing of this entire workflow, highlighting each component’s role and interaction. Let’s delve into the journey from user input to the final output. Stage one is nearly complete. reasoning from logic. 1000 versions later. This is the basic framework so far.

Step 1: Initialization and Setup

1.1 APIManager Initialization:

Objective: Load and manage API keys.

Process:

  • Load API Keys: The system attempts to load API keys from api_keys.json and environment variables such as OPENAI_API_KEY, GROQ_API_KEY, and OLLAMA_API_KEY.
  • Save API Keys: Ensures persistence of keys by saving them back to api_keys.json.
  • Interactive Management: If API keys are unavailable, the user is prompted to add them interactively using add_api_key_interactive.
  • Select Provider: When multiple API keys are available, the user selects the provider for the session.

1.2 EasyAGI Initialization:

Objective: Set up the AGI environment.

Process:

  • Create APIManager Instance: An instance of APIManager is created to handle API key operations.
  • Manage API Keys: Interactive API key management ensures necessary keys are available.
  • Initialize AGI: An AGI instance is created, with the API manager handling core functionalities.
  • Setup Memory Folders: Necessary memory folders are created using create_memory_folders to store conversation logs and data.

Step 2: Main Loop Execution

2.1 Main Loop:

Objective: Continuously process user inputs.

Process:

  • The main_loop method runs an infinite loop, prompting the user for input until ‘exit’ is typed.
  • Captures user input as a problem statement for AGI processing.

Step 3: Learning from Data

3.1 AGI Learning:

Objective: Process the user’s problem statement for reasoning.

Process:

  • Input Handling: The user’s input is treated as proposition_p (primary proposition).
  • Further Processing: Generates proposition_q (secondary proposition) through additional context or predefined logic, preparing both premises for reasoning.

Step 4: Reasoning and Decision Making

4.1 THOT (Thought Process):

Objective: Process propositions using various reasoning methods to generate a decision.

Process:

  • Initialization: Log files are initialized to store reasoning processes and results, setting up the logging system to capture detailed logs.
  • Reasoning: The Reasoning class performs various types of reasoning (Deductive, Abductive, Analogical, etc.) on proposition_p and proposition_q to generate logical conclusions.
  • Decision Making: Results from different reasoning processes are aggregated into a coherent decision, with detailed reasoning processes logged.

4.2 Socratic Reasoning:

Objective: Ensure logical consistency of premises and validate conclusions.

Process:

  • Premise Management: Adds and validates new premises for logical consistency, challenging and removing invalid premises using logic tables.
  • Drawing Conclusions: Generates logical conclusions based on current premises using chat models like GPT-4, validating the conclusions for logical coherence.
  • Logging: Detailed logging of reasoning processes and outcomes for future reference.

Step 5: Communicating the Response

5.1 Output:

Objective: Communicate the final decision back to the user.

Process:

  • The aggregated decision from various reasoning types is communicated back to the user.
  • Interaction and final decision are logged for future reference and continuous learning.

Detailed Path from Input to Response

1. User Input:

  • User Interaction: The system prompts the user: “Enter the problem to solve (or type ‘exit’ to quit):”.
  • Capture Input: User enters a problem statement, e.g., “explain the workflow to building AGI”.

2. Capture and Process Input:

  • Capture Input: The input is captured by perceive_environment() in easyAGI.py and stored as environment_data.
  • Create Propositions:
    • Proposition P: Created directly from environment_data, e.g., Proposition("explain the workflow to building AGI").
    • Proposition Q: Created through further context processing, e.g., Proposition("detailed steps and processes").

3. Reasoning Process:

  • Initialize THOT Process: process_thot() in agi.py is called with proposition_p and proposition_q.
  • Execute Reasoning Types: Each reasoning type in Reasoning processes the propositions:
    • Deductive Reasoning: Example Conclusion: “Building AGI involves structured steps.”
    • Abductive Reasoning: Example Conclusion: “AGI deployment likely caused system improvements.”
    • Analogical Reasoning: Example Conclusion: “AGI building is similar to software engineering.”
  • Aggregate Results: Results from each reasoning type are aggregated into combined_results.

4. Generate Decision:

  • Formulate Decision: make_decision() aggregates conclusions into a coherent summary, e.g., “Building AGI involves structured steps similar to software engineering, likely improving system efficiency.”
  • Log and Store: Logs the reasoning process and final decision, storing the interaction in memory using store_in_stm().

5. Communicate Response:

  • Output Decision: communicate_response() outputs the final decision to the user, e.g., “Building AGI involves structured steps similar to software engineering, likely improving system efficiency.”

Logging and Validation

Logging:

  • Detailed logs capture each step, including inputs, intermediate reasoning, and final decisions.
  • Errors and inconsistencies are recorded for review.

Validation:

  • Logic tables validate conclusions and ensure consistency.
  • Invalid premises and conclusions are challenged and revised.

Component Integration

easyAGI.py:

  • Manages user interaction and controls the main loop.
  • Initializes and sets up AGI components.
  • Handles user input and communicates responses.

agi.py:

  • Implements core AGI functionalities.
  • Processes user input to create propositions.
  • Uses THOT for reasoning and decision making.

reasoning.py:

  • Provides different reasoning mechanisms.
  • Processes propositions to generate logical conclusions.
  • Integrates with Socratic Reasoning for validation.

SocraticReasoning.py:

  • Manages premise validation and logical consistency.
  • Generates and validates logical conclusions.
  • Logs detailed reasoning processes.

logic.py:

  • Manages logic tables and evaluates logical expressions.
  • Validates logical truths and ensures consistency.
  • Supports reasoning processes with rigorous logic validation.

By following this detailed workflow, the easyAGI system can robustly handle complex reasoning processes, learn from data, and provide logical conclusions based on various reasoning methodologies. The integration of logic.py ensures that all logical expressions are evaluated and validated rigorously, contributing to the overall robustness and reliability of the easyAGI system.

easyAGI
easyAGI

Related articles

Chain of TRUST in LLM

https://galadriel.com/ In the realm of artificial intelligence, verifying that an AI response genuinely came from a specific model and wasn’t tampered with presents a significant challenge. The Chain of Trust in verified AI inference provides a robust solution through multiple layers of security and cryptographic proof. The Foundation: Trusted Execution Environment (TEE) At the core of verified inference lies the Trusted Execution Environment (TEE), specifically AWS Nitro Enclaves. This hardware-isolated environment provides a critical security […]

Learn More
mathematical consciousness

Professor Codephreak

Professor Codephreak came to “life” with my first instance of using davinchi from openai over 18 months ago. Professor Codephreak, aka “codephreak” was a prompt to generate a software engineer and platform architect skilled as a computer science expert in machine learning. Now, 18 months later, Professor Codephreak has proven itself yet again. The original “codephreak” prompt was including in a local language and become an agent of agency. Professor Codephreak had an motivation of […]

Learn More

fundamental AGI

putting the fun into a fundamental augmented general intelligence framework as funAGI funAGI is a development branch of easyAGI. easyAGI was not being easy and SimpleMind neural network was proving to not be simple. For that reason is was necessary to remove reasoning.py and take easyAGI back to its roots of BDI Socratic Reasoning from belief, desire and intention. So this back to basics release should be taken as a verbose logging audit of SocraticReasoning […]

Learn More