A minimal FastAPI + Jinja application for exploring the Modality Cornerstone pilot dataset. The app loads Cornerstone session data from local JSON files and provides a small UI for browsing, filtering, and inspecting conversations and MI findings.
- Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- (Optional) Configure environment overrides:
cp .env.example .env
- Ensure Cornerstone data is available:
data/cornerstone_data/conversation_*.json
- Start the development server:
uvicorn app.main:app --reload
The app will be available at http://127.0.0.1:8000/. Navigate to /datasets/cornerstone to browse sessions.
- Session view that groups turns into a readable transcript
- Findings integration for MI skills evaluations (when present)
- User-level views for reviewing MI skills across sessions
The app expects the following files under data/cornerstone_data/:
conversation_*.json- Raw conversation files used for browsing, findings, and progress reports
You can generate MI findings for Cornerstone conversations using the OpenAI API.
export OPENAI_API_KEY=your_key_here
python scripts/evaluate_mi_skills.py "data/cornerstone_data/conversation_*.json"To inspect prompts and schemas without calling the API:
./scripts/test_prompts.shAfter MI findings are generated, you can build per-user progress reports.
# List available users (from evaluated conversations)
python scripts/generate_progress_reports.py --list-users
# Generate a markdown-only report for a specific user
python scripts/generate_progress_reports.py --user "Full Name" --markdown-only
# Generate AI-assisted progress analysis for a specific user
python scripts/generate_progress_reports.py --user "Full Name"
# Generate AI-assisted reports for all users
python scripts/generate_progress_reports.py --allapp/ FastAPI application, templates, static assets
data/cornerstone_data/ Cornerstone JSON files
scripts/ Cornerstone data and evaluation helpers
tests/ Smoke tests for routes
Run the automated checks with:
PYTHONPATH=. pytestPYTHONPATH is required so the test runner can import the local app package.
- Cornerstone data is unlabeled; MI findings are model-generated.
- Findings availability depends on which conversations have been evaluated.