Methodology
How Pramana detects LLM drift through output consistency tracking.
Core Principle
Each submission stores output_hash = sha256(model_id | prompt_id | output). Same prompt + same model + different hash = the model's behavior changed. That's drift. No scoring needed.
Output Hash
Every submission computes a deterministic hash from three fields:
This hash is stored with each CSV record. It captures the exact output for a given (model, prompt) pair without storing raw outputs in the aggregated data.
Drift Detection
During daily aggregation, Pramana tracks the last-seen hash for each (model, prompt) pair. When a prompt's hash changes from one day to the next, it counts as a "drifted prompt."
Per-model, per-day statistics
| Metric | Definition |
|---|---|
submissions | Total submission records for this model on this day |
prompts_tested | Unique prompt IDs submitted |
unique_outputs | Unique output hashes observed |
drifted_prompts | Prompts whose hash differs from the previous day's hash |
Consistency Rate
A consistency rate of 1.0 means all tested prompts returned the same output as the previous day. A rate below 1.0 indicates drift.
| Consistency | Status | Interpretation |
|---|---|---|
| ≥ 95% | Stable | Model behavior is consistent |
| 80% – 95% | Watch | Some outputs have changed |
| < 80% | Drifting | Significant behavioral change detected |
Aggregation Pipeline
- Parse all archive CSVs into flat record list
- Sort records by date
- Track
prevHash: Map<model|prompt, hash>— last-seen hash per prompt - Group records by (date, model)
- For each (date, model) group: compute submissions, prompts_tested, unique_outputs, drifted_prompts
- Store as
chart_data.json
Badge Endpoint
The /api/badge/:model endpoint computes consistency over the last 7 days and returns an SVG badge:
- Green: ≥ 95% consistent
- Yellow: 80%–95% consistent
- Red: < 80% consistent (drifting)