Architecture
Fair Forge follows a simple yet powerful architecture designed for extensibility and ease of use.Overview
Data Flow
The core data flow in Fair Forge is:- Retriever loads your conversation data (
list[Dataset],Iterator[Dataset], orIterator[StreamedBatch]) - FairForge base class iterates through datasets
- Metric implementations process each conversation batch
- Results are collected in
self.metrics
1
Load Data
Retriever.load_dataset() returns list[Dataset]2
Process Datasets
FairForge._process() iterates through datasets3
Compute Metrics
Metric.batch() processes each conversation4
Collect Results
Results stored in
self.metricsCore Components
FairForge Base Class
All metrics inherit fromFairForge (fair_forge/core/base.py):
Retriever
Abstract base class for data loading:Data Structures
Dataset: A complete conversation sessionMetric Architecture
Each metric follows this pattern:Statistical Modes
Fair Forge supports two statistical approaches:- Frequentist
- Bayesian
Returns point estimates (floats):
Module Structure
Extension Points
Fair Forge is designed for extensibility:Next Steps
Retriever
Create custom retrievers for any data source
Streaming Retrievers
Process large datasets with streaming modes
Dataset & Batch
Understand data structures