When software needs to classify a message, assess a request, or decide where to route it, asking a language model to generate text and then trying to interpret that text can make the process more complicated. Jev, TypeSafe AI’s model, was built to answer structured questions about a given context and return results that code can use directly.
Instead of producing a prose response, Jev receives a state, such as the text of a support ticket, and one or more typed questions. Its answers can include structured values and probabilities. For Choice and Score questions, Jev also provides a confidence measure. An application can use these results in rules, filters, and workflows. Jev documentation
Three ways to ask a question
TypeSafe offers three question types:
Choice: selects an option from a list, such as the team responsible for a support ticket.
Score: evaluates the state using a defined scale, such as a customer’s level of frustration.
Noul: estimates whether a statement is true and returns a value between 0 and 1. For example, it can assess whether a message expresses urgency.
You can send multiple questions together, and Jev evaluates each one independently against the same state. For more useful results, give each question a single, clear objective. If an assessment involves several factors, ask about each factor separately and combine the results in your code.
How to get started
To try Jev without writing code, open the TypeSafe Playground, sign in, and paste some text as the state. Then add a question, such as “Does this message express urgency?”, and review the answer. You can also combine Choice, Score, and Noul questions in the same call. Quickstart guide
To integrate Jev into an application, the guide offers two options:
Using the API: Get an API key from the TypeSafe dashboard and send a POST request to https://api.typesafe.ai/v1/systemone with the state, the jev-latest model, and your questions in JSON.
Using the Python SDK: Install the typesafe-sdk package, which requires Python 3.10 or later, and set the TYPESAFE_API_KEY environment variable. Then use TypeSafeClient and define your questions with the system_one method:
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
client = TypeSafeClient()
response = client.system_one(
state="I've been trying to connect my account for three days, but the integration keeps failing.",
questions={
"team": Choice(
instructions="Which team should handle this issue?",
criteria={
"technical": "Bugs or integration issues",
"billing": "Payment or subscription issues",
},
),
"urgent": Noul(
instructions="Does the message express urgency?"
),
"frustration": Score(
instructions="How frustrated does the customer seem?",
criteria=["Calm", "Frustrated", "Very angry"],
),
},
)
print(response.answers["team"].choice)
print(response.answers["urgent"].noul)
print(response.answers["frustration"].score)Jev is useful when an application needs to turn information into structured assessments that guide an action. Start by clearly defining the context, the available options or scoring scale, and the question the system needs to answer. For configuration details and response formats, see the official quickstart guide.







टिप्पणियाँ0
टिप्पणी करने के लिए कृपया साइन इन करें।