A flexible agent library.
Project description
Language agent experimentation made easy.
Agential provides clear implementations of popular LLM-based agents across a variety of reasoning/decision-making and language agent benchmarks, making it easy for researchers to evaluate and compare different agents.
๐ค Getting Started
First, install the library with pip
:
pip install agential
Next, let's query the ReActAgent
!
from agential.llm.llm import LLM
from agential.cog.react.agent import ReActAgent
question = 'Who was once considered the best kick boxer in the world, however he has been involved in a number of controversies relating to his "unsportsmanlike conducts" in the sport and crimes of violence outside of the ring?'
llm = LLM("gpt-3.5-turbo")
agent = ReActAgent(llm=llm, benchmark="hotpotqa")
out = agent.generate(question=question)
๐งญ Project Organization
โโโ agential <- Source code for this project.
โย ย โโโ cog
โ โ โโโ agent <- Model/agent-related modules.
โ โ โ โโโ strategies <- Strategies encapsulate agent logic for each benchmark/benchmark type.
โ โ โ โ โโโ base.py
โ โ โ โ โโโ qa.py
โ โ โ โ โโโ math.py
โ โ โ โ โโโ code.py
โ โ โ โ
โ โ โ โโโ agent.py <- Agent class responsible for selecting the correct strategy, prompts/few-shots, and generating responses.
โ โ โ โโโ functional.py <- Functional methods for agent. The lowest level of abstraction.
โ โ โ โโโ output.py <- Output class responsible for formatting the response from the agents.
โ โ โ โโโ prompts.py <- Prompt templates.
โ โ โ โโโ <modules>.py <- Any additional modules you may have for the strategies. Agnostic to benchmarks/benchmark-types.
โ โ
โย ย โโโ eval <- Evaluation-related modules.
โ โ
โย ย โโโ llm <- LLM class.
โ โ
โ โโโ utils <- Utility methods.
โ
โโโ docs <- An mkdocs project.
โ
โโโ notebooks <- Jupyter notebooks. Naming convention is a number
โ (for ordering), the creator's initials, and a short `-` delimited โ description, e.g. `1.0-jqp-initial-data-exploration`.
โ
โโโ references <- Data dictionaries, manuals, and all other explanatory materials.
โ
โโโ reports <- Generated analysis as HTML, PDF, LaTeX, etc.
โย ย โโโ figures <- Generated graphics and figures to be used in reporting.
โ
โโโ tests <- Tests.
๐ Acknowledgement
๐ Contributing
If you want to contribute, please check the contributing.md for guidelines! Please check out the project document timeline on Notion and reach out to us if you have any questions!
๐ถโ๐ซ๏ธ Contact Us!
If you have any questions or suggestions, please feel free to reach out to tuvincent0106@gmail.com!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agential-0.1.0.tar.gz
(194.7 kB
view hashes)
Built Distribution
agential-0.1.0-py3-none-any.whl
(251.6 kB
view hashes)