Skip to main content
INFORMATIVEACTIVEDocumentation Governance

Learning Sample Schema

1. Purpose​

This document describes the LearningSample schema structure, which defines the format for capturing execution data that can be used for offline analysis, model iteration, or quality assessment.

Source Schemas:

  • schemas/v2/learning/mplp-learning-sample-core.schema.json
  • schemas/v2/learning/mplp-learning-sample-intent.schema.json
  • schemas/v2/learning/mplp-learning-sample-delta.schema.json

2. Schema Overview​

2.1 Schema Hierarchy​

LearningSampleCore (base)
├── LearningSampleIntent (extends)
└── LearningSampleDelta (extends)

Family-specific schemas use allOf to extend the Core Schema.

2.2 Core vs. Family-Specific​

SchemaPurposeWhen to Use
Core SchemaBase structure with required fieldsAll learning samples
Intent SchemaExtended fields for intent resolutionsample_family == intent_resolution
Delta SchemaExtended fields for delta impactsample_family == delta_impact

Other families (pipeline_outcome, confirm_decision, graph_evolution, multi_agent_coordination) use the Core Schema directly with recommended field conventions.

3. Core Schema (mplp-learning-sample-core.schema.json)​

Schema ID: https://mplp.dev/schemas/v1.0/learning/mplp-learning-sample-core.schema.json

3.1 Required Fields​

FieldTypeDescription
sample_idstring (uuid)Unique identifier of the learning sample (UUID v4)
sample_familystringLearningSample family identifier
created_atstring (date-time)ISO 8601 timestamp when sample was generated
inputobjectAbstracted representation of input conditions
outputobjectAbstracted representation of actual outcomes

3.2 Optional Fields​

FieldTypeDescription
stateobjectSnapshot of relevant system state before execution
metaobjectMetadata, labels, quality signals, provenance IDs

3.3 Meta Object Structure​

FieldTypeDescription
source_flow_idstringFlow ID that generated this sample (e.g., FLOW-01)
source_event_idsarray<uuid>Observability event IDs referenced by this sample
project_idstring (uuid)Project context identifier
human_feedback_labelenumHuman quality assessment: approved, rejected, not_reviewed
quality_scorenumber (0.0-1.0)Automated quality score

3.4 Core Schema Example​

{
"$schema": "https://mplp.dev/schemas/v1.0/learning/mplp-learning-sample-core.schema.json",
"sample_id": "550e8400-e29b-41d4-a716-446655440000",
"sample_family": "pipeline_outcome",
"created_at": "2025-12-06T12:00:00.000Z",
"input": {
"step_id": "step-001",
"step_type": "code_generation"
},
"output": {
"status": "completed",
"duration_ms": 1500
},
"meta": {
"source_flow_id": "FLOW-01",
"human_feedback_label": "approved"
}
}

4. Intent Resolution Schema (mplp-learning-sample-intent.schema.json)​

Schema ID: https://mplp.dev/schemas/v1.0/learning/mplp-learning-sample-intent.schema.json

Family: intent_resolution

Extends Core Schema via allOf reference.

4.1 Input Fields​

FieldTypeRequiredDescription
intent_idstring✓Intent identifier from IntentEvent
raw_request_summarystring✓Abstracted user request (PII-scrubbed)
constraints_summarystringTimeline, budget, resources
dialog_turns_countintegerDialog exchanges before resolution

4.2 State Fields​

FieldTypeDescription
project_phasestringgreenfield, brownfield, maintenance
psg_node_countintegerPSG size before intent
existing_plan_countintegerExisting plans in context

4.3 Output Fields​

FieldTypeRequiredDescription
final_intent_summarystring✓Refined intent after resolution
plan_idstring (uuid)Generated Plan UUID
plan_step_countintegerSteps in generated plan
resolution_quality_labelenumgood, acceptable, bad, unknown

4.4 Meta Extensions​

FieldTypeDescription
clarification_roundsintegerRounds needed before resolution
ambiguity_flagsarray<string>vague_scope, missing_constraints, etc.

5. Delta Impact Schema (mplp-learning-sample-delta.schema.json)​

Schema ID: https://mplp.dev/schemas/v1.0/learning/mplp-learning-sample-delta.schema.json

Family: delta_impact

Extends Core Schema via allOf reference.

5.1 Input Fields​

FieldTypeRequiredDescription
delta_idstring✓Delta Intent identifier
intent_idstringOriginal intent being modified
change_summarystringAbstracted summary of requested change
delta_typeenumrefinement, correction, expansion, reduction, pivot

5.2 State Fields​

FieldTypeDescription
affected_artifact_countintegerNumber of artifacts potentially affected
risk_levelenumRisk level: low, medium, high, critical
psg_complexity_scorenumberPSG complexity metric before change

5.3 Output Fields​

FieldTypeRequiredDescription
actual_impact_summarystring✓Summary of actual impact after analysis
impact_scopeenum✓Scope: local, module, system, global
comp_plan_requiredbooleanWhether compensation plan was needed
comp_plan_appliedbooleanWhether compensation was actually applied
rollback_usedbooleanWhether rollback mechanism was triggered

5.4 Meta Extensions​

FieldTypeDescription
impact_analysis_duration_msintegerTime spent on impact analysis
predicted_vs_actual_accuracyenumaccurate, underestimated, overestimated

6. Other Family Schemas​

The following families use the Core Schema directly without extensions:

Family IDDescriptionRecommended Input FieldsRecommended Output Fields
pipeline_outcomePipeline stage success/failurepipeline_id, stage_idstatus, duration_ms, error_info
confirm_decisionApproval/rejection decisionsconfirm_id, target_type, risk_labeldecision, reasoning
graph_evolutionPSG structural changestrigger_event_id, change_typenodes_added, edges_added
multi_agent_coordinationSA/MAP collaborationsession_id, coordination_modetotal_turns, outcome

These families follow Core Schema structure but use field conventions documented inSee: Learning Taxonomy.

7. Sample Families Reference​

Based on Core Schema sample_family examples:

Family IDDescriptionPrimary Schema
intent_resolutionUser intent clarification and plan generationmplp-learning-sample-intent.schema.json
delta_impactChange effect analysis and compensation planningmplp-learning-sample-delta.schema.json
pipeline_outcomePipeline stage success/failure patternsCore Schema
confirm_decisionApproval/rejection decisions and reasoningCore Schema
graph_evolutionPSG structural changes over timeCore Schema
multi_agent_coordinationSA/MAP collaboration patternsCore Schema

Schemas: 3 (1 core + 2 family-specific) Sample Families: 6 Source: schemas/v2/learning/*.schema.json