Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Agori is a Python package that implements various decision-making frameworks powered by generative AI. It aims to enhance group decision-making processes by leveraging the capabilities of large language models.
The Nominal Group Technique is a structured decision-making method that helps groups reach consensus through a systematic process of idea generation and evaluation. Our implementation enhances this process using AI to:
pip install agori
Here's a simple example using the NGT framework:
import asyncio
from agori.decision_frameworks.ngt import NGTProcessor
from langchain_community.document_loaders import PyPDFLoader
async def analyze_document(document_path: str, query: str):
# Load document
loader = PyPDFLoader(document_path)
pages = loader.load()
# Initialize NGT processor
ngt = NGTProcessor(
deployment="your-deployment",
endpoint="your-endpoint",
api_key="your-api-key",
api_version="your-api-version",
verbose=True
)
# Add documents
ngt.add_documents(pages)
# Run analysis
result = await ngt.run_ngt_analysis(query)
return result
# Run analysis
document_path = "your_document.pdf"
query = "What strategic decisions should we make based on this document?"
result = await analyze_document(document_path, query)
The NGT processor accepts various configuration parameters:
from agori.decision_frameworks.ngt.models import Config
config = Config(
MAX_TOKENS_PER_REQUEST=126000,
CHUNK_SIZE=31500,
CHUNK_OVERLAP=2000,
MAX_WORKERS=3,
MAX_PARALLEL_REQUESTS=3,
VERBOSE=True
)
ngt = NGTProcessor(
deployment="your-deployment",
endpoint="your-endpoint",
api_key="your-api-key",
api_version="your-api-version",
config=config
)
You can also run the NGT process step by step:
# Generate experts
experts = await ngt.generate_experts(query)
# Generate expert responses
expert_responses = await ngt.analyze_with_experts(experts, query)
# Synthesize results
synthesis = await ngt.synthesize_ngt_results(expert_responses)
The package includes custom exceptions for better error handling:
from agori.decision_frameworks.ngt import (
NGTError,
ExpertGenerationError,
IdeaGenerationError,
SynthesisError
)
try:
result = await ngt.run_ngt_analysis(query)
except ExpertGenerationError as e:
print(f"Error generating experts: {e}")
except IdeaGenerationError as e:
print(f"Error generating ideas: {e}")
except SynthesisError as e:
print(f"Error synthesizing results: {e}")
except NGTError as e:
print(f"General NGT error: {e}")
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is actively under development. The NGT framework is the first implementation, with more decision-making frameworks planned for future releases.
If you use Agori in your research, please cite:
@software{agori2024,
title = {Agori: AI-Powered Decision Frameworks},
year = {2024},
url = {https://github.com/govindshukl/agori}
}
For questions and feedback, please open an issue on the GitHub repository.
FAQs
AI-powered decision-making frameworks for enhancing group decisions
We found that agori demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.