Add ROBERTA classifier ranking PoC, with 77pc off the bat

This commit is contained in:
William Jeynes
2026-03-13 11:24:51 +00:00
parent f09e36e740
commit 8311556855
8 changed files with 85 additions and 32 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { MessagesState } from "../state";
import { BaseMessage } from "@langchain/core/messages";
//TODO: Each of these might need different weights
const keys = ["CONFIDENCE", "RAGAS", "RELATION"];
const keys = ["CONFIDENCE", "RELATION", "RAGAS", "ROBERTA"];
const mapping = {
VERYHIGH: 1.0,
@@ -16,7 +16,7 @@ const mapping = {
type Priority = keyof typeof mapping;
function mapResponse(value: string | undefined | null): number {
if (!value) return 0;
if (!value) return 1;
const trimmed = value.trim();
const num = parseFloat(trimmed);