Skip to main content
Version: 6.4.0

Run Missions

This page provides information and instructions for deploying Campaigns and Missions and invoking Missions.

Prerequisites

Before you can deploy Campaigns and Missions the follow prerequisites must be met:

  • Each Intervention must be configured with an Action. To set an Action for an Intervention select the Skill you developed and deployed for that intervention.

  • All Action Skills selected for interventions must be deployed. If they have not been deployed, the Compile Checker displays a warning and the deployment fails.

  • The Mission Goal KPI expression must specify mission_name, so it can reflect Feedback during runtime.

  • Each Mission must be in a "DEPLOYABLE" or "READY_TO_DEPLOY" status. (To be deployable the Mission configuration is completed, the simulation has been run, and plans have been refined).

    Mission workflow - ready to deploy

    Mission deployable

Deployment and Execution

You may deploy Missions independently or collectively as part of a Campaign. When you deploy a Campaign, all of the Missions associated with the Campaign, are also deployed.

You may deploy/undeploy a Campaign from the Campaign List page (kebab menu) or from the action menu at the top right of the Campaign Summary page in SENSA Fabric Console.

Deploy a campaign

Missions are deployed from the CLI (instructions below) or from the Console in the Mission Control view on the Workflow panel (at the bottom right) and from the Mission Card kebab menu in the Missions list view.

Deploying the Campaign and/or Missions:

  • Runs the Compile Checker to ensure that the Campaign or Mission can be successfully invoked. Messages are displayed that identify impediments to deployment (e.g. logic expressions that cannot be resolved, missing dependencies like secrets, artifacts that are not in a deployable status).
  • Sets the Campaign/Mission status to deployed, so that Missions can be invoked.

Mission invoke runs the Skills configured as Intervention Actions. These Skills are assembled into Cortex Agents by the system. These Intervention-Action Skills along with other system-Skills execute the runtime cycle that collects feedback and rewards to train the models.

At this time users have no visibility into this system-controlled orchestration.

Deploy and Invoke a Mission

  1. Log in to the Fabric CLI for your Project.

  2. Get a list of Campaigns for your Project by running:

    cortex campaigns list --project myProject
  3. Use the Campaign name from the list generated to get the Missions that have been configured for that Campaign by running:

    cortex missions list myCampaign --project myProject
  4. Verify the status of the Mission(s) you want to deploy either by viewing the status in the list generated by the CLI command above or by viewing the status in the Fabric Console.

    Mission states in Console

  5. Use the Mission name from the list generated to deploy the desired Mission.

    cortex missions deploy myCampaign myMission --project myProject

    When a Mission is deployed the Compile Checker is run to verify that all of the prerequisites are in place for the Mission to be invoked. A message is returned stating that the Mission has been deployed successfully (or The Compile Checker returns a warning with details about why the Mission was not deployed).

  6. After the Mission is deployed successfully, it can be invoked by running:

    cortex missions invoke myCampaign myMission --params `{"payload":{"campaign_name":"myCampaign", "mission_name":"myMission","profile_schema":"schemaName,"batch_size":int}}`

    Where

  • campaign_name is the same in the command and payload.

  • mission_name is the same in the command and payload.

  • profile_schema is the Profile Schema name. To get the profile_schema NAME:

      1. Login to Fabric Console.
      1. Click Profiles in the left menu.
      1. Click to open the vertical ellipsis menu on the Profile Schema card.
      1. Click Edit to open the schema metadata.
      1. Find the NAME field and copy the entry.
  • batch_size is the number of cohort records to include in each cohort subset expressed as an integer.

    Example

    cortex missions invoke increase-preventative-care get-flu-shot --params '{"payload":{"campaign_name":"increase-preventative-care","mission_name":"get-flu-shot","profile_schema":"member-profile","batch_size":10}}'

    Invoking a Mission kicks off the Mission Runtime cycle.

Halt a Mission

To stop a Mission that has been invoked simply undeploy the Campaign from the Action Menu on the list view card or at the top of the Summary page.

Mission Runtime Cycle

System Overview

It is useful to know how the Mission runtime works once the Mission has been invoked, however, there is little visibility into the system components described below.

Three System-Agents are employed durning runtime to fetch the configuration and dependencies, collect feedback, apply rewards, and train the model. They are as follows:

  • Online Learner Agent: Is a Reinforcement Learning (RL) engine that iteratively learns about the environment by balancing between Exploration and Exploitation. The system starts without knowing anything about the environment, but once it receives feedback, it starts learning. The Models are trained based on the Feedback and Rewards collected at runtime. Rewards are applied using the following GQL API endpoint:

    • Predict Endpoint GQL: Retrieves the interventions rewards file from managed content. This file contains details about profile (demographic, clinical etc.), interventions, probability, feedback and rewards for each profile in the Cohort subset.
  • Mission Executer Agent: Invokes the following System-Skills:

    • Cohort Selector Skill: Fetches the profile data of a Cohort subset and loads it to Managed Content; generates the Interventions Logging file.
    • Skill Router Skill: Invokes the Intervention actions for the Cohort batch records and generates the Watchlist for the run.
    • Action Executer Skills: provide an interface with the customer system that delivers the intervention strategy (e.g. sends an email) to Cohort members and defines the feedback expected for each intervention strategy.
  • Feedback Generator Agent: Waits for and collects Feedback from the invoked Interventions by running the following System-Skills:

    • Feedback Generator Skill: Reads the Watchlist and retrieves feedback signals from the cohort members for a given intervention and updates the Interventions Logging file. This Skill also invokes:

      • Feedback Aggregator job: Checks if a Connection already exists for the current run, and if it doesn't, the job creates a new Feedback Connection, Feedback Data Source, and Feedback Profile. The Goal KPI is updated based on the data collected from this job.

        note

        DO NOT edit the feedback artifacts that are created by the system!

    • Rewards Estimator Skill: Reads the Intervention logging file and calculates the Rewards for a given cohort member based on the Interventions chosen and the Feedback received. The rewards data is appended to the Interventions Logging file, and the file is uploaded to Managed Content. The Reward function comes either from the customer's side as a business rule or is learned if historical data is provided.

Mission start

When you invoke the Mission, the system Agents and Skills are executed synchronously.

  1. a Cohort (comprised of the Mission targeted profiles) is requested from the Campaign Profile store.
  2. The Intervention Action Skills selected for this Mission are requested from the Campaign Mission configuration.
  3. The Mission enters a learn-predict-action-reward cycle.

Learn-Predict-Action-Feedback-Reward cycle

  1. A subset of Cohort profiles is randomly fetched from the Cohort, and the related feature set or context for each Profile is retrieved from the Campaign Profile store.
  2. Using the Cohort subset and context, as well as any Rewards from previous intervention runs, the Mission learns and predicts the best intervention for each individual Profile in the Cohort subset.
  3. For each profile-intervention pairing, an intervention action is triggered, and the action Skill is invoked.
  4. Once all Intervention-Action Skills are invoked, the Profile references are written to a parquet file called a Watchlist. The Watchlist also includes start and stop times taken from the interventions' Wait-time. The time-delta is a period of time a profile intervention should be watched to collect feedback. Each Intervention has a different configured wait-time. Feedback is not collected past this time, but the Intervention run continues until the longest Intervention wait-time has elapsed.
  5. The Watchlist file can also be used by the Campaign Profile store to gather information on the progress of the Mission.
  6. Once a stop time has been reached for a Cohort subset, a Reward value is calculated based on the success of the Feedback collected for the intervention.
  7. The Reward is then used to train the model used in the next Intervention cycle to improve the Rewards for future cycles.

Mission end

  1. The Mission cycles continue until all the Profiles from the Cohort have been run.
  2. The Mission terminates, is considered COMPLETE, and the ActivationId for the Agent is returned.
  3. The user can query the ActivationId to get the Mission results.