Compass Training: Session Four

Prev Next

This session is for anyone ready to build a custom Diagnostic from scratch. Fair warning: this is the most technically demanding thing you can do in Compass. A Diagnostic meant for nontechnical users has to be highly prescriptive — which means you need to be precise and deliberate when writing it. If you’re coming from Session Three, you know the easier path is to start from an existing Diagnostic Definition and edit it. This session is for when that’s no longer enough. If you’re here, you’ve probably reached that point. Let’s dig in.

1. Create Diagnostic

From the Diagnostic Instances screen, click New Diagnostic. Enter a Name and Domain — the dropdown shows existing domains, or you can type a new one. To save time and compute during development, pick the smallest Entity that covers what you need. Add a Description of what this Diagnostic is designed to analyze. You can add other users (Editors / Viewers) later once it’s ready to share.

The System Prompt holds any instructions that apply to every Session in this Diagnostic — things like a specific table or measure to always use, or a filter that can’t be created as an Entity. For example, if you’re doing a SNF analysis and want to exclude swing beds: “For all queries in this diagnostic, exclude where Utilization Category Type 2 = Swing Bed.” Many Diagnostics will leave this blank.

The Tools section controls what the agent can reach for in this Diagnostic. For most prescriptive Diagnostics, you’ll want to leave out Search Data Model and Full Search Data Model. Those tools let the agent do open-ended searches, which can lead it to pull in unexpected objects and go off-script.

The Prompt Preview window is read-only. It shows the full prompt the agent will receive — tool instructions plus whatever you put in the System Prompt.

When everything looks good, click Create Diagnostic.

2. Creating Your First Session

You’ll land on an empty screen that says “No sessions yet. Create one to get started.” Good advice. Click New Session.

A blank chat window opens. Since this is your first Session, the options are minimal — mostly just space to write. Since this is a prescriptive Diagnostic, resist the urge to be conversational. This is instructions, not conversation.

Start by telling the agent exactly what measure or object to use: “Use the measure URSA-PHF-029 URSA-CORE Encounters per 1000 Member-Years for this analysis.” Be explicit — specify whether it’s a measure or an object, and include its specific code. The agent may not guess well if you’re vague here.

If you’re not sure which measure or object to use, start with an Explorer session first. Have a conversation with the agent to figure out what’s available and what fields you need. This is genuinely good practice — most analysts do a lot of exploratory work in Explorer before writing their first Diagnostic prompt.

With the measure or object established, the next piece is filtering. Tell the agent how to narrow the data. For example: “filtering to where encounter type = ‘Hospital Inpatient Admission.’”

Next, give the agent any context it needs about how to use the measure or perform calculations. This can be simple (“Do a 12-month lookback”) or complex (how to identify cardiologist providers and determine the most recent one for each patient).

One important pattern: instead of specifying a fixed date range, tell the agent how to handle claims lag dynamically. Hard-coding dates means you have to update the prompt every time you run the Diagnostic. The better approach is something like: “Due to claims lag, it is expected that the last few months of data will be incomplete (typically 2-3 months). Start by checking total cost (Document Plan Paid Amount) by month to identify these incomplete months and remove them from the analysis.” That way the Diagnostic stays accurate and repeatable without any edits.

The last piece is the key findings list — be very specific. Lead with “Return the following key findings” and enumerate each one: “1) Admits per K trended by month with a 2-year lookback. 2) Admits per K broken out by admit type using the CMS Admit Type Description column and trended by month with a 2-year lookback.” **The more precise you are, the more consistently the agent will deliver. **

The Session Addendum is also visible here if you need to adjust it for this specific use case. (To update it globally for all Diagnostics, go to Configuration in the left menu.)

3. Test & Iterate

Click Start Session and watch what happens.

Stay close. Since you wrote this prompt from scratch, you’ll want to watch how the agent interprets it. If it searches for the measure and comes up empty, there may be a typo in the identifier — or you forgot to tell it whether it was a measure or an object. These details matter.

If the agent runs cleanly and surfaces the findings you asked for: great, move on to Session 2. If it struggles, you’ll need to iterate — create new versions of this session until it can run consistently and generate the right results.

The easiest way to iterate: click the small paper icon next to the session title to open the session prompt, select all and copy it. Then click the Diagnostic title at the top to return to the main screen, click New Session, paste the prompt in, make your edits, and run it again.

Once the session is working the way you want, go back to the Diagnostic screen and click the pencil beside the version you’re keeping. Rename it “Session 1: [name]” and add a description of the analysis, then click Save.

Then click the pencil on any of the failed attempts and delete them. No need to keep the dead ends.

4. Additional Session Options

Click New Session again to start building Session 2. You’ll notice there are now a few more options on this screen.

The first new section is Disposition Schema. This lets you tell the agent to save a specific result from this session — one that can be used to decide whether a later session should run at all.

Three Disposition types are available: string, number, and custom list. For string and number, you give it a Key — think of it as a field name, like Max Spend or Highest Utilization Category. For a custom list, you also enter the possible values pipe-delimited, like True|False.

The next section is Dependencies. Here you select any earlier sessions whose data or instructions this session needs. Pick a session from the dropdown and click Add Dependency. Once added, you can reference both the prompt instructions and the findings from that earlier session.

Both sections are optional. In practice you’ll use Dependencies fairly often and Dispositions only when you need conditional logic. For now, create one of each so you can see how they behave.

The chat window works the same as in Session 1. Follow the same prompt format, with a few additions if you used Dispositions or Dependencies.

If you added a Disposition, you need to tell the agent how to set it. A few examples: for a string labeled Highest Utilization Category — “Save the utilization category having the highest utilization for the previous month as the Highest Utilization Category disposition.” For a number labeled Max Spend — “Save the maximum total cost for inpatient admissions during the prior 12 months as the Max Spend disposition.” For a True|False custom list labeled SNF Readmissions — “If the rate of SNF Readmissions is greater than 12%, set SNF Readmissions to True, otherwise set to False.”

These instructions belong in the key findings section of the prompt, attached to the finding they relate to. For example: “1) Utilization breakdown by category for the prior month. Save the utilization category having the highest utilization for the previous month as the Highest Utilization Category disposition.”

For Dependencies, reference the prior session wherever it’s relevant in the prompt. For example: “use the same measure and population as listed in Session 1.”

Click Start Session and watch closely. Because you asked for a Disposition, the agent will state what it saved and confirm the value was set at the end of the session.

Assuming Session 2 ran without issues, let’s move to Session 3. Click New Session again, and select the prior session in the Dependency dropdown. You’ll now see a Conditional checkbox. Check it if you want this session to only run when a prior session’s Disposition meets a specific condition. Once this box is checked, a dropdown will appear for you to select the key you want to use as the condition. You will then select the value you wish to use as the condition. For example, for the SNF Readmission custom list disposition, you may only want to run a SNF readmission deep dive session when the disposition = True (meaning the rate of SNF readmits was greater than 12%).

Write your session prompt the same way as before and run it.

5. Wrapping Up

Keep adding sessions until the Diagnostic covers everything you need it to.

A useful finishing touch: many of the prebuilt Diagnostics include a final summary session that asks the agent to review all prior sessions and distill the highlights. To do this, create a new session with all previous sessions as dependencies and use a simple prompt like: “Review the analyses conducted in the previous sessions and surface 1) the baseline insights that would be needed for a high-level overview of this population and 2) the most interesting and / or actionable insights to support the value-based care management of this population. Surface key results (charts & tables) for each insight / recommendation selected.”

And that’s how you build a Diagnostic from scratch. You can probably see why this got its own session. It’s a lot — but you’ve now seen all of it. The more you iterate, the more intuitive it becomes. Have fun with it!