How to Use Jev as a Decision Model for Email Classification
Use Jev as a decision model for email classification. Explore business use cases and a free, customizable example of Apache Camel AI workflows.
Every shared inbox is a queue of business decisions. Who should handle this message? Does the customer need help, want to buy, or intend to cancel? What needs a person's attention before a response goes out?
Using Jev as a decision model for email classification gives a business a way to turn those messages into consistent categories. Our new email workflow recipe uses Apache Camel to pair Jev's analysis with a separately generated reply draft, giving teams a starting point for reviewing incoming work and preparing responses.
The opportunity is to reduce the repeated sorting and interpretation that sits between an email arriving and the right team taking responsibility.
Why Jev fits email classification
In Introducing System One Models & Jev, TypeSafe presents Jev as a model built for structured decisions that software can use directly. You define the possible answers, supply the information to assess, and receive a decision within that defined structure. Jev gives up free-form text generation to focus on that role.
That fits an inbox process with known categories: billing, technical support, sales, account issues or feedback. The business defines what each category means; Jev evaluates the message against those definitions.
TypeSafe's documentation also explains that choice questions return probabilities and confidence. Those signals can inform when a workflow should act on a classification and when it should request review.
flowchart LR E[Incoming email] --> J[Jev decision model] Q[Business questions<br/>and allowed answers] --> J J --> D[Structured decisions<br/>probabilities and confidence]
Your business defines the questions and allowed answers. Jev evaluates the email and returns structured decisions that the surrounding workflow can use.
A valid category can still be the wrong business judgment. Before using classifications to assign work automatically, check them against emails your team has already reviewed.
Three decisions that make an email useful
The recipe uses Jev to assess three separate aspects of each email:
| Decision | Business question | Example |
|---|---|---|
| Topic | Which area of the business does this concern? | Billing |
| Intent | What does the sender want to happen? | A refund |
| Sentiment | What tone is the sender expressing? | Frustration |
A billing label alone does not tell the team whether someone wants an invoice explained, a payment corrected or money returned. Separating topic from intent makes the classification more useful for deciding who should respond and what they need to address.
Sentiment adds context for the reviewer. A frustrated refund request may deserve a different response from a routine invoice question. It is one signal to consider alongside the request and the customer's circumstances.
Business use cases for Jev email classification
The same decision pattern can support several inbox processes:
| Business area | How the classification could be used | Where people remain involved |
|---|---|---|
| Customer support | Separate technical issues from account access problems and general feedback, helping identify the appropriate team. | Investigating the problem and approving the response. |
| Billing and finance | Distinguish invoice questions, refund requests and cancellation requests before assigning them to an owner. | Checking records and authorizing refunds or account changes. |
| Sales | Identify pricing enquiries and purchase intent so a team can prepare a relevant follow-up. | Qualifying the opportunity and agreeing pricing or terms. |
| Customer retention | Surface cancellation intent and negative feedback for a customer success review. | Understanding the customer's situation and choosing an appropriate intervention. |
These are possible business applications of the analysis. The current recipe saves classifications and drafts; connecting them to a helpdesk, CRM or approval queue is the next integration step.
The categories should reflect how your business assigns work. A useful classification is one that helps an owner make a decision or take a specific next action.
Keep customer communication under review
Jev handles the classification decisions. A separate language model prepares the reply text. This lets each model serve a clear purpose: interpreting the message within defined choices, or composing a response for someone to review.
The recipe saves drafts without sending them. Its drafting instructions ask the model to acknowledge the concern, request missing information and avoid inventing policies, prices, refunds or actions already taken.
A reviewer can check the facts, apply company policy and approve the wording. That is especially relevant when the message concerns money, account changes or commitments to a customer.
Confidence-based review is another possible extension. Your team can evaluate Jev's confidence signals against its own examples and establish which decisions require a person. The recipe does not currently apply confidence thresholds or automate routing.
Try the example: Apache Camel AI workflows with Jev
Try the open-source example
Explore email classification with Jev and reply drafting in an Apache Camel AI workflow. Free, customizable code with setup instructions, sample emails and tests for your technical team.
Technical teams can use this example to explore how Jev fits into Apache Camel AI workflows. The code is available under the Apache 2.0 license. Live model calls require provider credentials and may incur API charges.
This example illustrates how Jev can be used in an email workflow. It may not reflect the complete workflow solution your business needs. Review steps, assignment rules and connections to your helpdesk or CRM depend on your operating process.
Here is a simplified view of the example:
flowchart TD E[Email files or optional inbox] --> C[Apache Camel workflow] C --> J[Jev: topic, intent and sentiment] C --> R[Reply model: prepare draft] J --> A[Combine outcomes] R --> A A --> S[(Save analysis and drafts)]
Apache Camel runs the two model calls in parallel and saves the email, results and draft to SQLite. The reply model reads the email independently of Jev's analysis. If one call fails, the other result can still be saved. No reply is sent.
The repository includes setup instructions, sample emails and tests with mock APIs. Your engineering team can change the classification categories and reply instructions, choose a compatible reply provider, and extend the workflow to fit your systems and approval process.
Start with one inbox and a measurable decision
A useful pilot starts with a process your team can already explain: one inbox, a small set of categories, a named owner for each category and a clear rule for review.
Agree how to assess the result before expanding it:
- Classification quality: How often does Jev agree with the team's reviewed decisions, and which mistakes matter most?
- Assignment speed: How long does it take for an incoming message to reach the right owner?
- Review effort: How much correction do classifications and reply drafts need?
- Customer outcomes: Are responses more timely and relevant, without increasing incorrect commitments?
Those measures help determine whether the workflow improves the process and where it needs more context or human judgment. Any business benefit should be demonstrated on your own inbox and operating requirements.
To explore a pilot, bring your inbox process to a scoping call: the types of messages you receive, the systems involved, the decisions that delay a response and the approvals your team needs to retain.