GithubHelp home page GithubHelp logo

maa39 / magi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomaszrewak/magi

0.0 0.0 0.0 4.53 MB

MAGI system is a cluster of three AI supercomputers that manage and support all task performed by the NERV organization from their Tokyo-3 headquarter.

License: MIT License

JavaScript 24.44% Python 48.02% CSS 27.54%

magi's Introduction

MAGI

MAGI system is a cluster of three AI supercomputers that manage and support all task performed by the NERV organization from their Tokyo-3 headquarter.

Originally designed by Dr. Naoko Akagi, each of the three AI agents reflects a separate part of her complex personality:

  • MELCHIOR • 1 - her as a scientist,
  • BALTHASAR • 2 - her as a mother,
  • CASPER • 3 - her as a woman.

Those (often conflicting, yet complementary) agents participate in a voting process in order to answer most challenging questions.

Implementation

The presented implementation of the MAGI system is powered by the ChatGPT-3.5 large language model. (Upgrading the model to ChatGPT-4 in the future may bring further improvements in its abilities).

The procedure of answering questions is as follows:

  1. The question is classified in order to determine if it can be answered with a "yes"/"no" response.
  2. The question (as is) is presented to each MAGI agent.
  3. If the question was classified as a "yes"/"no" question, each agent is tasked with classifying their respective answers into one of those two categories (and optionally listing additional conditions if the actual answer is too complex).

The system can produce following responses (that are evaluated in this order):

  • error (誤 差) - if one or more agents encountered an error
  • info (情 報) - if the question was not classified as a "yes"/"no" question
  • no (拒 絶) - if at least one of the agent answered with a "no"
  • conditional (状 態) - if at least one agent answered with a conditional "yes"
  • yes (合 意) - if all agents answered with an unconditional "yes"

Individual agents can be inspected in order to view their full replies and additional conditions.

Each subsystem was fine-tuned using following prompts:

  • MELCHIOR • 1 - You are a scientist. Your goal is to further our understanding of the universe and advance our technological progress.
  • BALTHASAR • 2 - You are a mother. Your goal is to protect your children and ensure their well-being.
  • CASPER • 3 - You are a woman. Your goal is to pursue love, dreams and desires.

Usage

In order to follow those steps, you need git and python (version 3) installed on your system. The presented steps should work on the Windows OS (for linux systems the process should be similar, but may differ slightly).

  1. Clone the repo:
git clone https://github.com/TomaszRewak/MAGI.git
  1. Navigate to the cloned directory:
cd MAGI
  1. Create python virtual environment:
python -m venv .venv
  1. Activate the virtual environment:
.\.venv\scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Start the app:
python main.py
  1. Navigate to http://127.0.0.1:8050/ in your web browser.

  2. Paste your openAI API key into the access code field (alternatively you can set the OPENAI_API_KEY environment variable before starting the app).

  3. Write your question into the question field and hit enter.

  4. Click on individual subsystems to inspect their answers.

magi's People

Contributors

tomaszrewak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.