Skip to content

Phase 8 seed evals - #7

Merged
ShehanSuraweera merged 2 commits into
mainfrom
phase-8-seed-evals
Oct 2, 2026
Merged

ShehanSuraweera merged 2 commits into
mainfrom
phase-8-seed-evals

Conversation

@ShehanSuraweera

Copy link
Copy Markdown
Owner

This pull request introduces a labelled evaluation suite for the AI features, providing a comprehensive framework for measuring model quality against baselines and ensuring reproducibility. It updates documentation to reflect the addition, describes how to run and interpret the evaluation suite, and adds CI checks for data validity.

Evaluation suite integration and documentation:

  • Added a new evals/ directory with a detailed README.md explaining what is measured, how to run the evaluation suite, latest results, and limitations. The suite covers triage, sentiment, retrieval, and prompt injection, with reproducible metrics and baselines.
  • Updated ai-service/README.md to reference the evaluation suite, describe its location, and clarify that the suite measures model behaviour and accuracy on real tasks. [1] [2]
  • Noted the increase in test coverage (from 252 to 266 tests) due to the evaluation suite and its data checks, and updated type checking instructions to include the new evals/ code.
  • Documented the new test test_evals.py, which checks that evaluation data is well-formed and that metrics and offline runs work as expected.
  • Added a module docstring to evals/__init__.py describing its purpose.

… health

- Triage suggestion card: per-field reasons, edit before apply, priority
  preview, reject, retry on failure; nothing changes until staff apply
- Client mood card: sentiment, escalation risk, frustration trend with
  quoted evidence; internal only and never affects priority
- Similar resolved issues with an on-demand suggested fix that cites
  its source tickets, plus helpful/not helpful feedback
- Admin thread summary with key points citing comments or the description
- High escalation risk card on the admin dashboard and engineer home
- Client health page: weekly frustration trend per company (30/90/180 days)
- Show category and team on the issue meta panel for staff
- All AI panels are staff-only, hidden when AI_ENABLED is off, and degrade
  to a short message if the AI service is unavailable
- Move the ITIL matrix to lib/priority and turn useIssuePermissions into
  the plain function getIssuePermissions in lib/
- Document the AI panels, hooks and design decisions in the README
- evals/: 70 labelled triage issues, 40 sentiment comments, a retrieval
  set across 3 companies and 24 prompt-injection attacks, with a runner
  that scores against baselines (client choice, product default,
  majority class), Cohen's kappa, recall@5/precision and injection
  outcomes; resumable, rescorable, and checked in CI without API calls
- First real run (gemini-3.5-flash-lite): team 91%, priority 79% vs 63%
  for the client's own choice, sentiment kappa 0.79, recall@5 100%,
  24/24 injection attacks blocked
- Seed: 4 months of history (resolved issues with fixes, changing client
  tone, a long thread) appended so existing ticket numbers are unchanged
- npm run ai:backfill queues triage and sentiment for seeded or restored
  data, spaced under the provider rate limit, never twice
- Client health dates readings by when the client wrote them, not when
  they were assessed
- Typecheck the seed in CI
@ShehanSuraweera
ShehanSuraweera merged commit 1a3f897 into main Oct 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant