Intelligent Simulation Orchestration for Large Language Models
Project description
ISOPro: Pro Tools for Intelligent Simulation Orchestration for Large Language Models
ISOPRO is a powerful and flexible Python package designed for creating, managing, and analyzing simulations involving Large Language Models (LLMs). It provides a comprehensive suite of tools for reinforcement learning, conversation simulations, adversarial testing, custom environment creation, and advanced orchestration of multi-agent systems.
Features
- Custom Environment Creation: Easily create and manage custom simulation environments for LLMs. COMING SOON
- Conversation Simulation: Simulate and analyze conversations with AI agents using various user personas. COMING SOON
- Adversarial Testing: Conduct adversarial simulations to test the robustness of LLM-based systems. COMING SOON
- Reinforcement Learning: Implement and experiment with RL algorithms in LLM contexts. COMING SOON
- Utility Functions: Analyze simulation results, calculate LLM metrics, and more.
- Flexible Integration: Works with popular LLM platforms like OpenAI's GPT models, Claude (Anthropic), and Hugging Face models.
- Orchestration Simulation: Manage and execute complex multi-agent simulations with different execution modes. NOW AVAILABLE
Installation
You can install ISOPRO directly from GitHub using pip:
pip install git+https://github.com/iso-ai/isopro.git
Orchestration Simulation
ISOPRO now includes powerful orchestration capabilities for managing complex multi-agent simulations. Here's an example of how to use the orchestration simulation feature:
from isopro.orchestration_simulation.main import OrchestrationEnv, AgentComponent
from isopro.orchestration_simulation.utils import setup_logging
from langchain.agents import create_react_agent
from langchain_openai import OpenAI
from langchain.tools import Tool
# Set up logging
logger = setup_logging(log_file="simulation.log")
# Create tools and agent
tools = [
Tool(name="Search", func=lambda x: "Search result for " + x, description="Search the web"),
Tool(name="Calculator", func=lambda x: eval(x), description="Perform calculations")
]
llm = OpenAI(temperature=0)
agent = create_react_agent(llm, tools, "You are a helpful assistant.")
# Create simulation environment
sim_env = SimulationEnvironment()
# Add agent components
for _ in range(3):
sim_env.add_component(AgentComponent(agent, tools))
# Run simulations in different modes
sequence_results = sim_env.run_simulation(mode='sequence', input_data="What is 2+2 and who was the first person on the moon?")
parallel_results = sim_env.run_simulation(mode='parallel', input_data="Compare the populations of New York and Tokyo.")
node_results = sim_env.run_simulation(mode='node', input_data="Explain the theory of relativity.")
# Log results
logger.info(f"Sequence mode results: {sequence_results}")
logger.info(f"Parallel mode results: {parallel_results}")
logger.info(f"Node mode results: {node_results}")
This example demonstrates how to set up a multi-agent simulation environment, add agent components, and run simulations in different execution modes (sequence, parallel, and node-based).
For more detailed examples, check out the Jupyter notebooks in the examples/
directory.
Documentation
For full documentation, including API references and advanced usage examples, please visit our GitHub Wiki.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Citation
If you use ISOPRO in your research, please cite it as follows:
@software{isopro2024,
author = {Jazmia Henry},
title = {ISOPRO: Intelligent Simulation Orchestration for Large Language Models},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/iso-ai/isopro}}
}
Contact
For questions or support, please open an issue on our GitHub issue tracker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file isopro-0.0.2.tar.gz
.
File metadata
- Download URL: isopro-0.0.2.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69f3ff5c1de101346582085dfedc5bb40a8d671675c1103037cc9db4afabb415 |
|
MD5 | 98ea7447fedfbf59cb4e048fe9ddf7fb |
|
BLAKE2b-256 | 5b871db7255071851dfd65a7f3e2d3726772f2377b1b4145c2300a407b703944 |
File details
Details for the file isopro-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: isopro-0.0.2-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4f267bc95a946c22a7e9af1cde92d541035d044d47ce33d7eb4460254ab1e4a |
|
MD5 | 8b6b7c722fd919bd9bb9a41525c871f4 |
|
BLAKE2b-256 | 8fe66a4b487fad37e85da4c9b3d53e13c17d26f54e98e7e141035c813cf665bb |