HybridAGI - A Neural Symbolic Framework for AGI
A New Approach to Artificial General Intelligence
Introduction
AI is the buzzword of the moment. It seems like every social media platform is flooded with mentions of AI, to the point where it might feel like a bit of irritating. However, it's undeniable that AI has significantly improved our lives in countless ways. For example, AI has the ability to enhance the quality of documents, images, and audio, making it easier than ever to create professional-looking content.
While the AI hype continues to dominate headlines and social media feeds, another term has been steadily gaining traction: AGI, or Artificial General Intelligence. This concept refers to a hypothetical type of AI that possesses human-like intelligence and capabilities, transcending the limitations of today's specialized AI systems. Unlike current AI, which excels at specific tasks but struggles with general problem-solving and adaptability, AGI would be capable of understanding, learning, and applying knowledge across a wide range of domains, much like a human being.
In this blog, I want to introduce HybridAGI, which is a programmable AgentOS framework that is able to combine computer science, cognitive sciences, and symbolic AI to create explainable and deterministic agent systems for real-world applications. I will structure this writing as follows:
What is HybridAGI?: I introduce the framework as well as its motivation and explain how the framework works.
Neural-symbolic AI Systems: I discuss a neural-symbolic approach to AI systems. Furthermore, representing knowledge and graph prompt programming will be in the discussion.
Code Implementation: I present how to install and construct several simple use-cases.
Conclusion: I summarize what we have achieved.
What is HybridAGI?
Artificial General Intelligence (AGI)
AGI is a type of AI that's like human. It can understand, learn, and do many things, just like you and me. Imagine a computer that can think, reason, and solve problems like a person.
While AGI isn't common yet, we see examples of it in our daily lives. For instance, when we use a virtual assistant like Siri or Alexa, we're interacting with a form of AI. These assistants can understand our questions, respond to our requests, and even learn from our interactions.
AGI has the potential to change our world. It could help us solve complex problems, create new technologies, and improve our quality of life:
Problem-solving: AGI can solve complex problems that humans struggle with.
Innovation: AGI can create new technologies and ideas.
Improved quality of life: AGI can make our lives easier and more efficient.
However, it also raises important questions about ethics, safety, and job displacement:
Ethical concerns: AGI raises questions about its impact on society and humanity.
Safety risks: AGI could pose a threat to our safety if not developed responsibly.
Job displacement: AGI could lead to job losses as machines become more capable. (Quite distant right now.)
HybridAGI
What is HybridAGI?
HybridAGI is a new tool that lets you create AI systems that can do specific tasks. It's the first of its kind that lets you control its behavior using a simple, visual approach.
At the heart of HybridAGI was a special language called DSL. This language allowed developers to program AI agents with precision and clarity. It was like a roadmap, guiding the AI system through a series of actions and decisions.
With HybridAGI, developers could build AI systems that were more predictable and reliable. They could ensure that the AI would follow a specific plan, preventing unexpected or harmful behaviors.
But HybridAGI wasn't just about control. It also offered a way for developers to improve the AI system over time. By adding new knowledge or correcting mistakes, developers could make the AI smarter and more capable.
HybridAGI’s motto is "Build Yourself," which makes me think that it is designed for people like me to experiment with AI and focuses on my creativity rather than making the AI completely independent.
Why HybridAGI?
The motivation for this framework comes from the very fact that the current AI systems are often hard to control and inefficient. Multi-agent systems try to fix this, but they often end up doing silly things and costing a lot of money. Also, today’s AI systems need to be trained a lot to work better. With HybridAGI, we only need to change a simple diagram to make the AI system behave differently. This is much easier and more efficient.
Here are some key features of HybridAGI:
Flexible Language: HybridAGI uses a simple language called DSL to describe different algorithms.
Adaptable System: HybridAGI can search for and use different programs to solve problems.
Customizable: You can change how HybridAGI works to fit your needs.
Create Your Own AI: You can build your own AI systems using HybridAGI.
Secure and Safe: HybridAGI is designed to be secure and prevent unauthorized access.
Neuro-Symbolic AI Systems
Neuro-symbolic systems combine two types of AI: neural network AI and symbolic AI. To be more specific, the former is in charge of learning, and the latter represents logic. By combining these parts, neuro-symbolic systems can both reason logically and learn from patterns.
Representing Knowledge
Currently, two main approaches dominate knowledge representation: graph-based and vector-based. Graphs offer a structured view of data, while vector embeddings, powered by deep learning, unlock insights from unstructured information. HybridAGI leverages the strengths of both, enabling similarity-based searches alongside the precision of graph-based reasoning.
This framework uses four key "memory" systems:
A file system for storing documents,
A program memory for tracking its own learning process,
A trace memory for remembering past actions
A fact memory for storing and retrieving knowledge in a structured way.
By combining these different types of memory, AGI can access information, learn from experiences, and make decisions in a more human-like manner.
Graph Prompt Programming
Imagine programming a computer not with lines of code, but with a visual map of interconnected ideas. That's the power of graph-based prompt programming.
In this approach, a program is represented as a knowledge graph, consisting of four key types of nodes:
Action nodes are specific actions within a program, containing the tool name, purpose, and instructions for inferring input parameters.
Decision nodes in a program make choices based on conditions, with outgoing edges indicating possible answers. Labels guide program flow, creating a decision graph.
Control nodes define a program's structure and execution flow, with Start Node marking entry and End Node marking termination.
Program nodes are the calls to subprograms, executing the program in the designated program's graph and returning to the calling program.
Each node plays a specific role, allowing us to build complex programs by connecting them with edges and defining logical relationships.
For example, think of a recipe: the ingredients are like action nodes, the steps are decision nodes, and the overall flow is controlled by program nodes. This visual and intuitive approach, to me, enables the creation of flexible and human-like AI programs.
Code Implementation
The first step for every coding process is to setup the environment appropriately.
pip install hybridagi
Predictable behavior with an endless number of tools: HybridAGI doesn't let the Agent choose the sequence of tools to use, so it can use an infinite number of tools. By following the graph programs, the framework ensures a predictable and deterministic methodology for our agent system. As a result, it can combine every memory system into one unique Agent by using the corresponding tools without limitation
Modular Pipelines: HybridAGI lets us create different types of AI systems, including data extraction pipelines, RAG applications, and advanced AI agents. We can use DSPy to optimize these systems. It also provides ready-made parts and tools to help us get started.
Additionally, each part of HybridAGI has a specific type, and HybridAGI use Pydantic to make sure the data is correct. We can easily create pipelines by combining different modules, similar to how we build models in Keras or HuggingFace.
Adding more tools: HybridAGI offers a wide range of tools to improve the productivity of our programs. For instance, they provide a set of search options, including DocumentSearch
, EntitySearch
, and FactSearch
, for searching relevant documents, entities, and facts into the fact memory.
We can add more tools by using the FunctionTool
and python functions, like nowadays function calling.
Conclusion
In this exploration of HybridAGI, we've delved into the foundations of neural-symbolic AI, explored the power of graph-based prompt programming, and demonstrated its practical application through code examples. We've shown how HybridAGI can represent knowledge effectively, reason logically, and execute complex tasks.
HybridAGI is an open-source project, inviting collaboration and contributions from the AI community. I believe that developers, researchers, and anyone interested in exploring the potential of AI should use HybridAGI to unlock the full potential of AGI and accelerate the development of truly intelligent machines.
Reference
HybridAGI - README.md - URL: https://github.com/SynaLinks/HybridAGI.git
HybridAGI - Documentation - URL: https://synalinks.github.io/documentation/docs/intro/