Giter Club home page Giter Club logo

meta_expert's Introduction

Meta Expert

A project for versatile AI agents that can run with proprietary models or completely open-source. The meta expert has two agents: a basic Meta Agent, and Jar3d, a more sophisticated and versatile agent.

Table of Contents

  1. Core Concepts
  2. Prerequisites
  3. Repository Setup
  4. API Key Configuration
  5. Basic Meta Agent Setup
  6. Jar3d Setup
  7. Working with Ollama
  8. On the Roadmap for Jar3d

Core Concepts

This project leverages three core concepts:

  1. Meta prompting: For more information, refer to the paper on Meta-Prompting (source). Read our notes on Meta-Prompting Overview for a more concise overview.
  2. Chain of Reasoning: For Jar3d, we also leverage an adaptation of Chain-of-Reasoning
  3. Jar3d uses retrieval augmented generation, which isn't used within the Basic Meta Agent. Read our notes on Overview of Agentic RAG.

Prerequisites

Environment Setup

  1. Install Anaconda:
    Download Anaconda from https://www.anaconda.com/.

  2. Create a Virtual Environment:

    conda create -n agent_env python=3.11 pip
  3. Activate the Virtual Environment:

    conda activate agent_env

Repository Setup

  1. Clone the Repository:

    git clone https://github.com/brainqub3/meta_expert.git
  2. Navigate to the Repository:

    cd /path/to/your-repo/meta_expert
  3. Install Requirements:

    pip install -r requirements.txt

API Key Configuration

  1. Open the config.yaml file:

    nano config.yaml
  2. Enter API Keys:

Setup for Basic Meta Agent

The basic meta agent is an early iteration of the project. It demonstrates meta prompting rather than being a useful tool for research. It uses a naive approach of scraping the entirety of a web page and feeding that into the context of the meta agent, who either continues the task or delivers a final answer.

Run Your Query in Shell

python -m agents.meta_agent

Then enter your query.

Setup for Jar3d

Jar3d is a more sophisticated agent that uses RAG, Chain-of-Reasoning, and Meta-Prompting to complete long-running research tasks.

Try Jar3d with:

  • Writing a newsletter - Example
  • Writing a literature review
  • As a holiday assistant

Jar3d is in active development, and its capabilities are expected to improve with better models. Feedback is greatly appreciated.

Jar3d is capable of running 100% locally. However, the setup itself is non-trivial. There are two components to set up:

  1. The nlm-ingestor server
  2. Running the application

1. Setting up the NLM-Ingestor Server

Running Jar3d requires you to set up your own backend server to run the document parsing. We leverage the nlm-ingestor and llm-sherpa from NLMatics to do this.

The nlm-ingestor uses a modified version of Apache Tika for parsing documents. The server will be deployed locally on whatever machine you run the Docker image.

The server provides an easy way to parse and intelligently chunk a variety of documents including "HTML", "PDF", "Markdown", and "Text". There is an option to turn on OCR; check out the docs.

Steps

  1. Ensure you have Docker installed on your machine. Once installed, ensure you have started the Docker daemon.

  2. Next, pull the Docker image from nlmatics:

    docker pull ghcr.io/nlmatics/nlm-ingestor:v0.1.6
  3. Once you have pulled the image, you can run the container:

    docker run -p 5010:5001 ghcr.io/nlmatics/nlm-ingestor:v0.1.6
  4. Navigate to config/config.yaml and check that the LLM_SHERPA_SERVER variable is exactly like this:

    http://localhost:5010/api/parseDocument?renderFormat=all
    

    Note: You can change the port mapping from 5010 to whatever mapping you want. You must ensure that it is consistent with the mapping you select in the docker run command.

  5. Once you're ready, you can start the RAG-agent by running the following from the meta_expert directory:

    python -m agents.jar3d

If you want to work with Ollama

Setup Ollama Server

  1. Download Ollama: Download from https://ollama.com/download

  2. Download an Ollama Model:

    curl http://localhost:11434/api/pull -d "{\"name\": \"llama3\"}"

For more information, refer to the Ollama API documentation.

On the Roadmap for Jar3d

  • Feedback to Jar3d so that final responses can be iterated on and amended.
  • Long term memory.
  • Frontend.
  • Integrations to RAG platforms for more intelligent document processing and faster RAG.

meta_expert's People

Contributors

john-adeojo avatar manjaroblack 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.