The REBEL Agent

REcursion Based Extensible LLM

Our REBEL agent takes a novel approach to answering complex questions. Using recursive reasoning, REBEL expands what LLMs can do with problem decomposition and tool use. In this way, we are able to answer questions requiring data LLMs were not directly trained on.

Running REBEL

Getting started with REBEL is easy
# import our client
from llm_vm.client import Client
import os

# Instantiate the client specifying which LLM you want to use
client = Client(big_model='chat_gpt', small_model='gpt') #REBEL will use chat_gpt no matter what big model is specified here, this specification exists for non-REBEL completion calls. 

#Calling client.complete with a tool list specified leads to the REBEL agent being used.
response = client.complete(
	 prompt = 'Is it warmer in Paris or Timbuktu and what are the temperatures in either city?',
         openai_key=os.getenv("OPENAI_API_KEY"), #for REBEL we need an OpenAI key
         tools=[{'description': 'Find the weather at a location and returns it in celcius.',  #this tool list contains only one dictionary, therefore only one tool
                 'dynamic_params': {
		 		   "latitude": 'latitude of as a float',
		 		   "longitude": 'the longitude as a float'
                 'method': 'GET',
                 'url': "",
                 'static_params': {'current_weather': 'true'}}]) #No tools by default, so you have to add your own

Tool Definition

Tools are defined by dictionaries that are added to the list tools. These dictionaries need to contain the following fields:

'description'stringA description of what the tool does
'dynamic_params'dictionaryA dictionary containing key value pairs (paramter name : description) of the API endpoint’s mutable parameters that need to be set by REBEL in order to answer a query
'method'stringGET or POST, whichever is the type of the API endpoint
'url'stringURL of the API endpoint that the given tool specifies
'static_params'dictionaryAny parameters that are constant between all API calls. An API key/token is an example of this

You can add any tool you want and as many as you need. REBEL will attempt to compositionally answer a question that may require calling multiple tools.

Join our Discord Community

Have questions or ideas56? Join the community!