first commit of v.02 application

This commit is contained in:
KS Jannette
2026-05-07 23:20:30 -04:00
commit a6b0a95dfc
98 changed files with 21028 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
const LEVEL_LABELS = {
green: 'High score. Factually reliable response.',
gold: 'Average score. Reliable response, may exhibit minor drift from source.',
red: 'Low score. Unreliable response, factually inaccurate or hallucination.',
};
function GroundednessScore({ score }) {
if (score == null) return null;
const pct = Math.round(score * 100);
let level = 'red';
if (pct >= 75) level = 'green';
else if (pct >= 50) level = 'gold';
return (
<span className={`groundedness-score ${level}`}>
Grounded: {pct}% &ndash; {LEVEL_LABELS[level]}
</span>
);
}
export default GroundednessScore;