Connect Jev AI to Maia: Custom Connector and Shared Pipelines
Learn how to bring Jev AI decisioning into your data pipelines. In this walkthrough, a principal solution architect imports the TypeSafe API into a Maia custom connector, stores the API key in a secret manager, and gives Maia a short problem statement in Mission Control.
Maia plans and builds three shared pipelines for evaluating a single record, looping over a table, and unpacking answers, plus five example pipelines and a Jev AI skill. The demo then runs the support ticket triage example, shows the Jev request and response, and shares the pipelines across the team.
This video is part of the Building with Maia and Jev series. Read the full write-ups:
Hi, and welcome to Building with Maia. My name is Joe, Principal Solution Architect. Today, we're gonna be building a TypeSafe Jev AI integration, shared pipelines and connectors so that we can start leveraging the Jev capabilities inside of our pipelines and problems that we're looking to build for.
So here I'm gonna navigate to our custom connectors page. I've got my API reference from TypeSafe. I'm gonna just, take a copy of that URL, paste it directly here into custom connectors, and have Maia build me out a connector here to evaluate the state of my Jev models. So Maia is now gonna go ahead and read that TypeSafe API. It's gonna bring us back an evaluate state endpoint. I can see here, I can import that endpoint across.
I've got a token that I'm just gonna go and paste as well. So let me just go and fetch that token and paste that in here. And Maia is then gonna be able to configure this connector for me. So here you can see I'm gonna paste that in. Hit send. Maia is then gonna go and build that out. So I've got this nice TypeSafe API. I'm just gonna call this TypeSafe. TypeSafe.
And I've got this evaluate state and it's already matched it to the POST endpoint. I can have the list models endpoint as well should I require to. So I'm gonna save this connector in here, and now I'm gonna come into Mission Control. So to get... I'm just gonna come over here to Mission Control, and I'm gonna add a task. And I wanna be working in my sandbox environment.
So I've got some branches in here already that I wanna be sort of working in, and I'm gonna go ahead and create a new project. Sorry. A new feature inside of a new branch off of main. And the problem statement I'm gonna give Maia is I wanna build a way in which I can integrate to Jev. I've got a custom connector called TypeSafe, and I wanna build a series of shared pipelines that enables me to embed the Jev models as part of a process that requires decisioning.
I'm gonna give you some more context on the Jev models in a second. But first of all, go and identify the connector, and I will add in any secret managers that we need to... For those API keys too. So I'm gonna give Maia sort of a bit of a head start on just thinking around this. I'm gonna give it access to go into plan mode and start thinking.
Now in my research, what we did is we took this effectively pointed Claude towards this site and had it build me out almost like a manifest file for all the different types of models that Jev's able and choices and decisions that Jev's able to handle. I've got a bit of detail that I'm gonna add into Maia in a moment's time and that I've essentially got Claude describe for me from the website. And I'm gonna just add this information in here so you can see the kind of level that I'm gonna get to.
So I'm gonna open this up in Designer. I'm gonna add a file. You can see I've got a pretty bare bones branch in here. So I'm gonna add a markdown file. I'm gonna call this System One Design Principles. So this is directly from the TypeSafe documentation, and I'm simply gonna paste in here. You can see System One integration to Maia. So some documentation around how we can leverage and use the Jev models for evaluating and how that can get unpacked as well.
So now I'm gonna say to Maia, right, okay, I'm... You know, I've added the System One Design Principles doc. Read through your plan. Go find the custom connector. I'll add the secret key called JH-Jev into my secret manager. So Maia is now gonna go ahead and start thinking and reading and digesting this integration design pattern here as part of this ongoing conversation with Maia.
And I'm gonna also just duplicate this tab. I'm gonna come up a level for a second and just add in my API secret key. So this is the project view. So these are all my different branches. I can come along here to connections and I can add a connection to any particular sort of secret that I would like. I'm gonna give this one called JH-Jev. I'm gonna give it a description, Joe's API connector to Jev.
I'm gonna select my runner, so I've got some different AWS, Azure, and Snowflake configurations set up in here. I'm gonna go ahead and find the relevant secret that I have inside of my AWS Secrets Manager that has my API key within it and I'm gonna select that API key in here and it's as simple as that. I can just add that in. The one precursor step I needed to do is just add that to the secret manager that this Elastic Container Service has access to read and write from.
So here inside of my Designer, I'm gonna say JH-Jev is the secret name, present a plan for the shared pipelines that we can build. I'd also like five examples with how we can leverage evaluate functionality of Jev to be built as well, and an accompanying skill so that we can leverage the Jev AI integrations for future data products as well.
So what Maia is doing at the moment is capturing all of this context around what I wanna build. So you can see here it's looking for the connector. If I open up a new orchestration pipeline, I'll just call this one tests to begin with. And in here, I go and just point Maia towards the TypeSafe connector that I have. Perhaps not given it the right name that it was after. So I'm gonna come back and just let Maia know.
Oh, there it's found it. That's fine. So it searched through the components. It found that custom connector and it's got the evaluate state endpoint. So might need to go through and actually add a, an additional state to this connector. So I'm gonna just search for that TypeSafe. I'm gonna come in here. Oh, it's already got Content-Type application/json in which is absolutely fine.
And it's got my, it should have my eval calls in here as well. Let me just check what we've got. Yep. POST. Yep. That all looks correct. Here we go. So let's have a look at Maia's plan. So it's gonna build three core pipelines to be published as shared pipelines, five example pipelines, and a skill as well.
Perfect. So evaluate in batch. Yep. This all looks correct. Evaluate the table and unpack the answers and it's got some example pipelines in here too. Perfect. Okay. I'm gonna accept that plan. Maia is now gonna go ahead and build us this series of pipelines and shared pipelines that allow us to take advantage of Jev and check back in on the progress as it builds through.
Great. So Maia has made some really strong progress in building this out. So let's have a look at the child pipeline. So this is the child pipeline. It's gonna take that bearer token and it's gonna send a dynamic message out to Jev via the API with a set of questions, the model, and some text as well.
So what it's also going to do is then effectively get a response back that it's gonna store directly in Snowflake as a Jev raw responses target table. And then it's gonna loop through a series of rows inside of a table with all of the different questions and key columns that we need to pass down into that source. So this is the parent pipeline that's gonna run this.
I'm gonna accept Maia's request here to push this out to my Git repository, and then we're gonna walk through a couple of examples of how this can be used. So let's come and have a look here, support ticket triage. You'll see here that Maia... There we go. I'm gonna say add some source tables and examples into the canvas of support ticket triage and an example of the message sent to Jev.
So I just wanted to bring this to life because it's really quite straightforward and simple. This pipeline here is gonna take tickets from a source table inside of Snowflake, Redshift, Databricks, or BigQuery. In this case, it's Snowflake and pass this down into the child pipeline so that we can share repeatable logic across all of our examples across all of our environments and then it's gonna bring us back a result and unpack that in here.
Now so that I can share this logic with the team, Maia has built me this Jev folder with batch and table and I'm just gonna simply come in here and right click share and I'm gonna then allow Maia to request that these are all required outputs when it's building and leveraging the shared pipeline for other environments too. Share this, do the same here.
So these are all of the dynamic variables that Maia has inputted into this pipeline logic as it's designed and built this and so then this series of pipelines here, the evaluate batch and table, are able to be shared across projects inside of this Matillion Hub account. And I've got some examples that are gonna ship with this folder as well as the skill that I'm looking for Maia to build, this System One evaluation skill.
So let's have a look and see how Maia is getting on with creating the examples for us. Perfect. So here's the source table. It's gonna have some ticket data in and it's gonna have, it's then gonna insert that ticket data in. This is in fact the body of the POST that's going out in this sub child step, the evaluate tickets. You can see the state, the questions, sentiment. Fantastic. And then the expected Jev response back over here on the right hand side.
Now I'd actually like it to go ahead and do this for real and add the output response back. So I'm gonna tell it that. Actually run the pipeline, and also bring back the real Jev responses from a table that is loaded into Snowflake as a result of using this pipeline, and then perform the same updates to all of my example pipelines with the creation of the tables, the insertion of the sample data, as well as the Jev API POST body snippet as you have done on here.
So Maia is now gonna take that task and work through the other pipelines as well just so that we can bring some of these examples to life, and then we're gonna have a walk through and see what the inputs and outputs look like for the different evaluations that we can call on Jev to do for us. So Maia is now gonna go ahead and execute this pipeline inside. There you go. You can see it's just kicked off.
It's gonna go and create that source table, populate that with some ticket data, and then run that through this now shared pipeline which enables us to loop through multiple rows in a table and call out to those evaluate models. Let's come back here and see how Maia is getting on. And what I really love about the evaluate models from Jev is that it's not just the composability of it, but it's also the variance in the types of evaluations you can have it perform.
So in this instance, we're looking at one of their two of them. We've got a choice and we've got a null. So we want a sentiment of being sort of positive or negative, and we're expecting a choice around the questions on urgency and intent. We're providing some options as well for that ticket and how it can be routed. And then in our document classification, when we see that one in a second, we'll... We should see some of the choices for those documents being classified into sort of relevance and usability for research, for instance.
Let's give Maia a moment to finish this run. And, yeah, it's gonna go ahead and overwrite the files for efficiency purposes. So using our own token optimization here to create better sample examples inside of our Git repository. Okay. So Maia has finished building. We've now got some example pipelines of how we can use the different eval types from Jev.
So first of all, the support ticket triage, taking a ticket, and getting it to route it out to different teams, so billing, technical account manager, or feature request, and the responses, as well as the document classifier. So being able to take a doc and have it classified based on the different options in that department. We've also got content moderation. So I'm thinking of using, again, the choice eval to then take a user content and some content text and have that sort of categorized, as well as a sort of a spam likelihood.
Null, which gives an indicator of whether or not there is a certainty in this sort of spam or not for that content piece. Lead scoring, so taking some leads, Acme Health Systems for instance, and having this being fed through Jev to work out which industry vertical they're associated with and whether or not there is a purchase intent as well.
And then lastly, product review analysis. So bringing all of this together, taking some review IDs, some products, some text around the review, having it perform a sentiment score, so giving us some levels of sentiment, getting some helpfulness. It... It's either not helpful or is helpful as a review, and then also identifying a theme through the choice evaluation, working out what theme this applies to.
So just some examples of how you can use the choice, the null, and the score evaluations, and all of this is underpinned with a shared pipeline that I can then share with my team, the batch, table, and unpack answers pipelines as well as the custom connector that goes out and calls the APIs to the evaluate API endpoint of Jev. Thanks for watching.
Featuring
You might also like
Our latest resources
Data management



