- Python 3.8 or higher
- pip package manager
git clone [email protected]:USAFA-AI-Center/fair_llm_demos.git
cd fair-llm-demosSimply install everything needed using the requirements file:
pip install -r requirements.txtThis will install:
fair-llm>=0.1- The core FAIR-LLM packagepython-dotenv- For environment variable managementrich- For beautiful terminal outputanthropic- For Anthropic Claude integrationfaiss-cpu- For vector search capabilitiesseaborn- For data visualizationpytest- For testing
Create a .env file in your project root:
# Copy the example file
cp .env.example .env
# Or create a new one
echo "OPENAI_API_KEY=your_openai_api_key_here" > .env
echo "ANTHROPIC_API_KEY=your_anthropic_api_key_here" >> .envOr export them as environment variables:
export OPENAI_API_KEY="your_openai_api_key_here"
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"Run the verification script:
python verify_setup.pyYou should see a colorful output showing all components are properly installed!
Once installed, try the demo scripts:
# Basic grading
python demos/demo_committee_of_agents_essay_autograder.py \
--essays essay_autograder_files/essays_to_grade/ \
--rubric essay_autograder_files/grading_rubric.txt \
--output essay_autograder_files/graded_essays/
# With RAG fact-checking
python demos/demo_committee_of_agents_essay_autograder.py \
--essays essay_autograder_files/essays_to_grade/ \
--rubric essay_autograder_files/grading_rubric.txt \
--output essay_autograder_files/graded_essays/ \
--materials essay_autograder_files/course_materials/# Static analysis only (safer)
python demos/demo_committee_of_agents_coding_autograder.py \
--submissions coding_autograder_files/submissions/ \
--rubric coding_autograder_files/rubric.txt \
--output coding_autograder_files/reports/ \
--no-run
# With test execution (requires sandbox)
python demos/demo_committee_of_agents_coding_autograder.py \
--submissions coding_autograder_files/submissions/ \
--tests coding_autograder_files/tests/test_calculator.py \
--rubric coding_autograder_files/rubric.txt \
--output coding_autograder_files/reports/To upgrade to the latest versions:
# Upgrade all packages
pip install --upgrade -r requirements.txt
# Or just upgrade fair-llm
pip install --upgrade fair-llmIf you get import errors, ensure all requirements are installed:
pip install -r requirements.txt --force-reinstallThe demos will create sample files if they don't exist, but ensure your API keys are set:
python -c "import os; print('OpenAI Key:', 'Set' if os.getenv('OPENAI_API_KEY') else 'Not Set')"Always use a virtual environment to avoid conflicts:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtAfter installation, you'll have:
- ✅ The complete FAIR-LLM framework
- ✅ Multi-agent orchestration capabilities
- ✅ Document processing tools
- ✅ Vector search with FAISS
- ✅ Beautiful terminal output with Rich
- ✅ Complete demo applications
- Run
python verify_setup.pyto confirm everything is working - Explore the
demos/folder for examples - Set up and run some demos
- Start building your own multi-agent demo files!
Developed by the USAFA AI Center team:
Ryan R ([email protected]) Austin W ([email protected]) Eli G ([email protected]) Chad M ([email protected])