Skip to main content
The CRM Data Pipeline environment defines five str-based enums that control every aspect of agent behavior. Because all five inherit from both str and Python’s Enum, their values are simultaneously valid Python enum members and plain JSON strings — you can pass either form in your action payloads and Pydantic will accept both. This page documents every enum value, its semantics, the columns or scenarios it applies to, and the reward implications of each choice.

PipelineActionType

PipelineActionType is the discriminator field of CRMPipelineAction. It defines the eight discrete actions available to the agent and determines which other fields the server reads from the payload.
A productive Task 1 episode typically follows the sequence: PROFILE_SOURCE → STANDARDIZE_COLUMN (×3-4) → HANDLE_MISSING (×2) → DEDUPLICATE → SUBMIT_PIPELINE. Each transformation step contributes incremental reward before the final grader evaluation.

StandardizationStrategy

StandardizationStrategy controls how STANDARDIZE_COLUMN mutates a column’s values. The server applies the transformation in-place to every row of the target column in source.

Column-to-Strategy Mapping for Task 1

The Task 1 schema target maps directly to these strategies:
The data generator injects phone values like "(555) 123-4567", "15551234567 ext. 42", and "Invalid Number". EXTRACT_NUMBERS handles the first two but cannot recover the third — follow up with HANDLE_MISSING using FILL_VALUE and fallback_value="" to replace any remaining non-numeric residuals.

MissingStrategy

MissingStrategy controls how HANDLE_MISSING resolves null / NaN values in a specific column. The strategy is applied in-place; the source DataFrame is mutated within the episode’s memory.

Strategy Selection Guide

For the CRM schema, FILL_VALUE with fallback_value="" is the correct strategy for phone and signup_date. The grader compares your output against the ground truth using .fillna("").astype(str).str.strip().str.lower(), so an empty string matches the truth’s empty string exactly. Using FILL_MODE on phone would fill nulls with the most common phone number, which would not match the truth.

DeduplicationStrategy

DeduplicationStrategy controls the matching heuristic used by DEDUPLICATE to identify and remove redundant rows from a source DataFrame.

Reward Calculation

Both strategies earn reward proportional to the fraction of rows removed:
If 12 duplicates are removed from a 60-row source, the reward is (12 / 60) × 0.20 = 0.04.

Usage Examples

The data generator (data_generator.py) deliberately injects duplicate rows with missing email fields and slightly varied names (e.g., "John Smith" → "Mike Smith" with the same phone). Running FUZZY_NAME_PHONE first catches these near-duplicates before EXACT_EMAIL cleans up the remaining identical records.

ConflictRule

ConflictRule controls how MERGE_SOURCES resolves column value conflicts when the same non-key column exists in both source DataFrames. After an outer join, Pandas creates <column>_s1 and <column>_s2 suffix pairs; the conflict rule determines how they are collapsed back into a single <column>.

Task 3 Column-to-Rule Mapping

In Task 3, the observation’s conflict_rules field provides explicit per-column instructions. Map those string labels to ConflictRule values:
ConflictRule is a single value applied uniformly to all conflicting columns in a merge. If Task 3 requires PREFER_S1 for email but PREFER_S2 for phone, you cannot express both in one MERGE_SOURCES call. Use EXECUTE_SQL after merging with COALESCE to apply per-column overrides:

Python Import Reference


JSON Enum Values

Because all enums inherit from str, their serialized form is the raw string value. No special encoding or wrapping is applied: