Skip to main content

Examples Overview

Fair Forge provides comprehensive examples for different deployment scenarios.

Available Examples

Example Categories

Metrics Examples

Interactive Jupyter notebooks demonstrating each metric:
MetricNotebookDescription
Toxicitytoxicity.ipynbDIDT framework with Frequentist and Bayesian modes
Biasbias.ipynbGuardian-based bias detection with visualization
Contextcontext.ipynbLLM judge for context alignment
Conversationalconversational.ipynbGrice’s Maxims evaluation with radar charts
Humanityhumanity.ipynbNRC emotion analysis with entropy
BestOfbestof.ipynbTournament comparison between assistants

Deployment Examples

Serverless functions for production use:
ModuleLambdaDescription
Generatorsgenerators/aws-lambdaGenerate test datasets from context
Runnersrunners/aws-lambdaExecute tests against AI systems

Jupyter Notebooks

# Clone and run notebooks
git clone https://github.com/Alquimia-ai/fair-forge
cd fair-forge/examples

# Toxicity example
cd toxicity/jupyter
jupyter lab toxicity.ipynb

AWS Lambda

# Deploy generators Lambda
cd examples/generators/aws-lambda
./scripts/deploy.sh generators us-east-2

# Deploy runners Lambda
cd examples/runners/aws-lambda
./scripts/deploy.sh runners us-east-2

Getting Started

  1. Choose your metric - Pick the metric that matches your evaluation needs
  2. Try the notebook - Run the interactive example to understand the API
  3. Deploy to production - Use Lambda for serverless execution

Next Steps