Skip to content

The-Strategy-Unit/qualigraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QualiGraph

QualiGraph is an AI-powered qualitative analysis tool that automates theme extraction from interview transcripts and questionnaire responses.

Overview

This proof-of-concept application performs inductive coding on text documents, automatically identifying themes and their associated codes without predefined categories. This approach allows researchers to discover patterns emerging directly from the data, accelerating the qualitative analysis process.

Current Features

  • Automated Inductive Coding: Extracts themes and codes organically from the text without predetermined categories
  • Theme Classification: Categorizes extracted information into various theme types (PERSON, ORGANIZATION, LOCATION, etc.)
  • Web Interface: Simple upload interface for text files
  • Large Document Processing: Handles lengthy documents by chunking them into manageable pieces
  • Database Storage: Preserves documents, themes, and codes in SQLite locally for now

Roadmap: Graph-Based Analysis

The next development phase will focus on graph capabilities - the most powerful aspect of the tool:

  • Relationship Mapping: Creating connections between interviewed individuals, their organizations, work contexts, and identified themes
  • Network Visualization: Revealing how different stakeholders' perspectives overlap or diverge
  • Knowledge Graph Construction: Building a comprehensive view of the interconnected qualitative data
  • Pattern Discovery: Identifying hidden connections across multiple interviews or responses

These graph capabilities will transform the current inductive coding tool into a comprehensive qualitative research platform that reveals deeper insights about relationships between people, organizations, and themes.

Technical Implementation

  • Python FastHTML for the web interface
  • Local LLM integration via Ollama
  • Azure OpenAI integration available as alternative
  • SQLite database for theme and code storage
  • Environment configuration through dotenv files

Getting Started

Requirements

  • Python 3.12+
  • Local LLM server (Ollama) or Azure OpenAI access
  • uv package manager from Astral

Installation

# Clone the repository
git clone https://github.com/The-Strategy-Unit/qualigraph.git
cd qualigraph

# Create and activate virtual environment with uv
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies with uv
uv sync

# Or install in development mode
uv pip install -e ".[dev]"

Configuration

Create a .env file in the project root or in ~/.config/qualigraph/.env with your settings:

# For Ollama (default)
ENDPOINT=http://localhost:11434/v1
MODEL=mistral:instruct
API_KEY=ollama

# For Azure OpenAI (alternative)
# ENDPOINT=https://your-resource.openai.azure.com
# API_VERSION=2024-12-01-preview
# API_KEY=your_api_key
# DEPLOYMENT=your_deployment_name

Running the Application

# Start the application
qualigraph

# With custom options
qualigraph --host localhost --port 8000 --db data/themes.db --model mistral:instruct

Usage

  1. Access the web interface at http://localhost:8000
  2. Upload text files (TXT or Markdown) containing interview transcripts or responses
  3. View the extracted themes, codes, and their relationships in the interface

License

MIT

About

GraphRAG-powered qualitative analysis tool for rapid theme extraction from qualitative data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages