CHAIR is a comprehensive library for conducting inductive qualitative data analysis using Large Language Models (LLMs) and human-AI collaboration.
CHAIR provides a complete pipeline for inductive qualitative data analysis, featuring:
- Flexible Data Input: Support for text files, Word documents, and structured data formats
- AI-Powered Coding: Support for multiple LLM providers (OpenAI, Google, Anthropic, Groq, Ollama, etc.)
- Multiple Coding Strategies: Item-level, chunk-level, and specialized analysis approaches
- Human-AI Collaboration: Interactive and automatic modes for coding and consolidation
- Advanced Consolidation: Smart merging and refinement of coding results
- Evaluation Framework: Network-based evaluation and visualization tools
- Multi-step Analysis Pipeline: Complete Load → Code → Consolidate → Evaluate workflow
Load your qualitative data from various sources:
- Text files, Word documents, Excel spreadsheets
- REFI-QDA QDPX files (ATLAS.ti, NVivo, MAXQDA)
- Structured JSON with
configuration.js
Apply coding strategies — inductive, deductive, or both:
- Inductive (AI): Item-level, chunk-level, and verb-based analysis strategies
- Deductive (AI): Apply predefined codebooks with three-pass verification
- Human: Import codes from Excel spreadsheets or DOCX comments
- Ensemble: Combine multiple coders via weighted voting for robustness
Merge and refine coding results:
- Simple Merger: Embedding-based label deduplication
- Refine Merger: LLM-powered semantic merging with definitions
- Definition Generator: Auto-generate code descriptions
- For deductive coding: collect codebooks for comparison without merging
Assess and visualize results:
- Evaluate: Network analysis, coverage assessment, interactive visualization
- Reliability: Krippendorff's Alpha, percent agreement, per-code precision/recall
📖 See TUTORIAL.md for complete installation and usage instructions
git clone https://github.com/CIVITAS-John/CHAIR.git
cd CHAIR
# Windows
scripts\setup.bat
# Unix/Mac
./scripts/setup.shThe setup script will:
- Check Node.js installation (v20+)
- Create .env file with API keys
- Install Node.js dependencies
- Build the project
- Setup Python virtual environment
- Install Python dependencies
After installation, run the provided examples to see the framework in action:
# Windows
scripts\run.bat examples\example-automatic.ts
scripts\run.bat examples\example-interactive.ts
scripts\run.bat examples\example-deductive.ts
# Unix/macOS
./scripts/run.sh examples/example-automatic.ts
./scripts/run.sh examples/example-interactive.ts
./scripts/run.sh examples/example-deductive.tsnpm run build # Build main library
./scripts/run.sh --dev examples/example-automatic.ts # Rebuild + run experimentnpm run lint # Run ESLint and Prettier
npm run format # Auto-fix formatting issuessrc/
├── coding/ # Analysis strategies and implementations
├── consolidating/ # Code merging and consolidation logic
├── evaluating/ # Evaluation metrics and visualization
├── loading/ # Data loading implementations
├── steps/ # Pipeline step definitions
├── utils/ # Utilities for LLMs, embeddings, file
examples/ # Example configurations and data
- Fork the repository
- Create a feature branch
- Make your changes with appropriate tests
- Submit a pull request
CHAIR is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. See LICENSE.md for details.
If you use this software in your research, please cite:
@software{chen2025chair,
title={CHAIR: A Library for Collaborative Human-AI Inductive Qualitative Research},
author={Chen, John and Zhang, Yanjia and Cheng, Sihan},
year={2025},
institution={Northwestern University},
url={https://github.com/CIVITAS-John/CHAIR}
}- 📖 Getting Started — Installation, setup, and quick start
- 📂 Data Preparation — Convert TXT, DOCX, QDPX, or other formats
- 📊 Human Coding with Spreadsheets — Generate Excel templates for human coders
- 🤖 Inductive Coding — AI-powered code generation from data
- 📋 Deductive Coding — Apply predefined codebooks using LLMs
- 🐛 Report issues on GitHub Issues
- 💬 Join discussions in GitHub Discussions
- John Chen, Northwestern University - civitas@u.northwestern.edu
- Yanjia Zhang, Northwestern University - fzhang@u.northwestern.edu
- Sihan Cheng, Northwestern University - sihancheng2026@u.northwestern.edu