Skip to main content

Use Jev with qbash Tasks

Alex Blom

Jev is TypeSafe's decision model, and it is quick at classification work. You give it a piece of text and a set of typed questions, and it returns one answer per question as JSON. This video sets it up in qbash and calls it from a Task that routes support tickets.

What's covered

  • Adding a TypeSafe API key and enabling Jev on the Models page
  • Creating an inline prompt with Jev as its model
  • A test run over four sample tickets, with the JSON Jev returns for each

A Jev prompt inside a Task

TypeSafe has its own card on the Models page. You add your TypeSafe API key there as you would for any other provider, then enable Jev. From then on it is available in every qbash prompt and Task.

The demo Task, Jev Test, has a main.py with four sample tickets: a Stripe integration that keeps failing, a request for an invoice with a VAT number, a question about moving 40 people onto the team plan, and an SEO backlink pitch. For each ticket the script calls qbash.ai.run_prompt("jevtest", {"question": ticket}) and prints the answers.

To make a Jev prompt of your own, choose New inline prompt from Add New in the Package panel and switch the model to Jev, as described in inline prompts. The form then asks for Text to evaluate, which here holds {{question}}, and a list of Questions you define in the builder or paste as raw JSON. jevtest.prompt asks which department should handle the ticket (a Pick one between billing, technical and sales), how urgent it is (a Score from 0 for "Can wait a week" to 3 for "Losing money right now"), and whether it is spam (a Yes or no).

The test run

Test run on main.py sends each ticket through the prompt, and the console prints a structured answer for every question. The Stripe ticket came back as technical with a confidence of 0.94, an urgency score of 3.0, and an is_spam probability of 0.03.

The team is putting out more Jev videos over the next week. Jev decision prompts covers the question types and response shape in detail, and the Jev AI guide shows how to call Jev directly with qbash.ai.raw and route tickets on the answers.

Open qbash →

Video transcript

Hi everybody, Alex, the founder of qbash here. Today I wanted to take you on a very fast demo of how to use Jev inside of qbash. If you're not familiar, Jev is a new model. It's not an LLM, but it's great and fast for classifications and stuff like that. Now, to get started, what you need to do in the build section of qbash is come to this models section here.

Scroll down and you'll see TypeSafe, the provider of Jev here, where you will come in and set up your Jev API key like you would for any other model, and enable the Jev model. Now, once that's done, Jev is supported in all qbash prompts and all qbash tasks. I'm going to demo that on a task today, and we have this one that's already been set up. There's a very basic main.py here with some examples asking for classifications of tickets. And you'll see this task is very basic.

It just goes through for each ticket. It runs a prompt and asks Jeb for a classification. Now, if you wanted to create a Jeb prompt yourself before I show you the one we've created, you'd press this plus button or add new down here. And we would create an inline prompt to the task just like you do for any of your other prompts, whether that's Fable, Astra, GPT, doesn't matter. In this case, you would add Jev as a model.

And you'll see that the form gets changed a little bit because Jev is not a conversational model and what we provide is a little bit different. uh you pass in the text to evaluate as well as setting up the uh set of data here that you can use with the builder that will give you a structured setup or if you prefer to paste raw JSON. Now to explain this a little bit better for those familiar with Jev, we ask it to go through and score things like department and we give it the options and a set of instructions as well as asking it whether it should pick one, score the rankings or do a yes or no. So we're asking for each of these tickets which department should it be routed to? What is the urgency as a score with our score being defined this way?

And is it spam? Yes or no. This is what a Jev prompt looks like. It's a little bit different. We're basically saying here is what we would like you to give the output.

And it's going to give us that output as a structured JSON. Just to do a test run here, I can come back to my main.py and press test run. And it's actually going to go through and run that jev prompt on each of them. And you'll see it's giving us this nice structured output with department. There's a confidence of the choice.

And you know what it's doing is spam. And we can kind of see all this output is coming through. Now through the next week, the team is going to have a lot of Jev demonstration videos, but I thought a quick video showing you just how to come in and set up and use a J prompt would be helpful for today. Thank you very much.

Stay in the loop

Product updates, tutorials, and AI insights. No spam.