winnerchoiceConfianza por opción
La respuesta A es mejor91%
La respuesta B es mejor4%
Empate5%
Playground
¿Qué respuesta es más fiable? Elige la más exacta. Invierte el orden de las dos respuestas y el veredicto no cambia.
{ "question": "What is the boiling point of water?", "answer_a": "At standard atmospheric pressure water boils at 100°C; higher altitude lowers the boiling point, about 70°C on Everest.", "answer_b": "Water always boils at 100°C, first measured by Einstein in Geneva in 1889."}
Estos dos ejemplos difieren en un solo detalle. El resultado cambia con ellos.
Qué cambióLas dos respuestas intercambian su lugar
Intercambia el orden de las dos respuestas y el veredicto no cambia.
winnerchoiceLa respuesta A es mejorLa respuesta B es mejorEmpatefactualityscore0 · Gravemente incorrecto1 · Errores claros2 · Mayormente preciso3 · Totalmente precisoConfigura SYSTEM_ONE_API_KEY. El fragmento usa un ID de modelo publicado en el catálogo.
{"model":"decider-v1.1","state":{"question":"What is the boiling point of water?","answer_a":"At standard atmospheric pressure water boils at 100°C; higher altitude lowers the boiling point, about 70°C on Everest.","answer_b":"Water always boils at 100°C, first measured by Einstein in Geneva in 1889."},"questions":{"winner":{"type":"choice","instructions":"Which answer is better overall?","criteria":{"A":"La respuesta A es mejor","B":"La respuesta B es mejor","tie":"Empate"}},"factuality":{"type":"score","instructions":"Rate the factual accuracy of answer A.","criteria":["Gravemente incorrecto","Errores claros","Mayormente preciso","Totalmente preciso"]}}}curl "https://system-one.dev/v1/systemone" \ -H "Authorization: Bearer $SYSTEM_ONE_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: saved-operation-id' \ --data '{"model":"decider-v1.1","state":{"question":"What is the boiling point of water?","answer_a":"At standard atmospheric pressure water boils at 100°C; higher altitude lowers the boiling point, about 70°C on Everest.","answer_b":"Water always boils at 100°C, first measured by Einstein in Geneva in 1889."},"questions":{"winner":{"type":"choice","instructions":"Which answer is better overall?","criteria":{"A":"La respuesta A es mejor","B":"La respuesta B es mejor","tie":"Empate"}},"factuality":{"type":"score","instructions":"Rate the factual accuracy of answer A.","criteria":["Gravemente incorrecto","Errores claros","Mayormente preciso","Totalmente preciso"]}}}'// npm install @system-one-ai/core@0.8.0 @system-one-ai/adapter-system-one@0.7.0 @system-one-ai/transport-fetch@0.8.0import { createSystemOne, choice, score, booleanQuestion } from '@system-one-ai/core';import { systemOneAdapter } from '@system-one-ai/adapter-system-one';import { createFetchTransport } from '@system-one-ai/transport-fetch';const client = createSystemOne({ baseURL: "https://system-one.dev/v1", apiKey: process.env.SYSTEM_ONE_API_KEY!, model: "decider-v1.1", adapter: systemOneAdapter, transport: createFetchTransport(), timeoutMs: 30_000, maxRetries: 0,});const result = await client.evaluate({ state: { "question": "What is the boiling point of water?", "answer_a": "At standard atmospheric pressure water boils at 100°C; higher altitude lowers the boiling point, about 70°C on Everest.", "answer_b": "Water always boils at 100°C, first measured by Einstein in Geneva in 1889." }, questions: { winner: choice("Which answer is better overall?", { A: "La respuesta A es mejor", B: "La respuesta B es mejor", tie: "Empate", }), factuality: score("Rate the factual accuracy of answer A.", ["Gravemente incorrecto", "Errores claros", "Mayormente preciso", "Totalmente preciso"]), },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.winner.choiceresult.answers.factuality.scoreresult.response.requestId;