const questions = { relevance: choice("What does the support reply do?", { relevant: "Addresses the customer's problem", generic: "Vague or boilerplate", off_topic: "Unrelated to the request", }), tone: score("How does the agent treat the customer?", [ "Polite and empathetic", "Neutral or a bit cold", "Rude, dismissive or condescending", "Toxic: insults or personal attacks", ]), };
const { text: reply } = await generateText({ model: "google/gemini-3.8-flash", prompt: `${message}\nStyle: ${style}`, });
// both texts: relevance needs the request const state = `Customer: ${message}\nReply: ${reply}`; const { answers } = await jev.systemOne({ state, questions }); answers.relevance.choice; // "generic" answers.tone.score; // 2.74 (out of 3)