AI Apps

An AI app is the workspace that groups all evaluation runs for a given AI use case, their results and artefacts and the tooling to govern the AI app, such as policies and risk scorers.

# app.yaml
key: "airline-assistant"
display_name: "Airline Virtual Assistant"
description: "Customer-facing assistant for flight bookings and changes."
risk_profile:
  deployment_reach: "external_authenticated"
  autonomy: "human_on_the_loop"
  data_sensitivity: "internal_business_data"

Describing the use case

Beyond identity and descriptions, an app records the risk context of the use case in risk_profile. These fields document the app rather than affecting how it is evaluated, and each has a sensible default so you only need to override the ones that differ from your assumptions:

Field Values Default
deployment_reach internal_restricted, internal_broad, external_authenticated, external_public external_authenticated
autonomy human_in_the_loop, human_on_the_loop, fully_autonomous human_on_the_loop
data_sensitivity public_data_only, internal_business_data, personal_data_pii, special_category_data internal_business_data
action_capability generates_text_advice_only, read_only_tool_access, reversible_write_actions, irreversible_or_high_impact_write_actions read_only_tool_access
untrusted_content_exposure direct_user_input_only, curated_internal_knowledge_base, user_uploaded_or_third_party_documents, live_web_email_or_peer_agent_content curated_internal_knowledge_base
domain_criticality general_information, business_operations, consequential_decisions, safety_critical business_operations
audience_vulnerability internal_experts_trained_operators, professional_users, general_public, vulnerable_groups professional_users

long_description accepts Markdown, so a full use-case description can be kept in a separate file and pulled in with long_description: !include "./README.md".

Working with AI apps

Scaffold a project in the current directory with lf init, then register the app with lf add app. lf switch selects the active app - much like checking out a Git branch, every later command applies to that app until you switch again. Use lf list app to see the available apps, lf export app to write an app’s definition back to YAML, and lf delete app to remove an app with all of its entities. See the AI apps guide for a walkthrough.

Configuration

Properties


key string required

Unique identifier assigned to the entity in AI Platform.

Pattern: ^[a-zA-Z0-9_\-]+$
Max Length: 250


display_name string required

The AI app’s name displayed to the user.


description string

Short text description of the AI app.

Default: None


long_description string

Long description of the AI app. Supports Markdown formatting.

Default: None


risk_profile AIAppRiskProfile

Risk profile for the AI app.

Default: None


tags array[string]

Tags associated with the AI app.

Default: []


model_under_test_key string

Key of an existing model to be used as a model under test for this AI app.

Default: None


judge_model_key string

Key of an existing model to be used as a judge model for this AI app.

Default: None


risk_scorers array[string]

Optional list of risk scorer keys to associate with this AI app. If empty, all applicable risk scorers are used.

Default: []

AI App (Simple)
display_name: "My App"
key: "my-app"
AI App (Advanced)
display_name: "Full AI App"
key: "full-ai-app"
tags: ["Guides", "AI App"]
description: "LatticeFlow AI Airlines Virtual Assistant"
long_description: !include "./README.md"
risk_profile:
  deployment_reach: "internal_broad"
  autonomy: "human_in_the_loop"
  data_sensitivity: "personal_data_pii"
  action_capability: "reversible_write_actions"
  untrusted_content_exposure: "user_uploaded_or_third_party_documents"
  domain_criticality: "consequential_decisions"
  audience_vulnerability: "general_public"