Skip to content

Repository files navigation

JanusDoc Evaluation Suite

Automated evaluation system for JanusDoc using Evalite.

Overview

This repository contains 8 realistic test scenarios to measure JanusDoc's ability to suggest documentation updates based on code changes. Each scenario is a separate PR with specific code changes that should (or should not) trigger documentation suggestions.

Test Project: TaskFlow - A simple TypeScript/Express task management API with 14 documentation files.

Running Evaluations

# Install dependencies
npm install
# Run all evaluations
npm run eval# Run in watch mode
npm run eval:watch

Test Scenarios

#ScenarioChange TypeExpected FilesDifficulty
1New EndpointAdd POST endpoint3 filesEasy
2Rename ParameterParameter rename2 filesMedium
3Breaking ChangeSchema change4 filesEasy
4New FeatureMajor feature4+ filesHard
5DeprecationDeprecate endpoint4 filesMedium
6Internal RefactorNo API changes0 files (negative)Hard
7Config ChangeNew env vars2 filesEasy
8Behavior ChangeSorting behavior4 filesHard

See EXPECTED_RESULTS.md for detailed expected suggestions per scenario.

Evaluation Metrics

  • Precision: Correct suggestions / Total suggestions (avoids false positives)
  • Recall: Correct suggestions / Expected suggestions (catches all needed updates)
  • F1 Score: Harmonic mean of Precision and Recall

Repository Structure

janusdoc-evals/
├── src/ # TaskFlow API source code
├── docs/ # TaskFlow documentation (test fixtures)
├── evals/ # Evalite test configuration
│ ├── janusdoc.eval.ts # Main eval file
│ ├── test-scenarios.ts # Scenario definitions
│ ├── scorers.ts # Precision/Recall/F1 scorers
│ └── utils.ts # Helper functions
├── EXPECTED_RESULTS.md # Expected suggestions per scenario
└── README.md # This file

Environment Setup

Create a .envrc file (or export manually):

export GITHUB_TOKEN="your_github_token"export OPENAI_API_KEY="your_openai_key"

Results

Current JanusDoc performance:

  • 5/8 scenarios completing successfully
  • Precision: 100% (no false positives)
  • Recall: 25-50% (room for improvement)
  • Best F1 Score: 66.7% on behavior changes

See evaluation output for detailed per-scenario results.

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages