datarobot_genai.core.pipeline_interactions
pipeline_interactions
Pipeline-interaction primitives for agent runs.
Each framework agent records its run as a MultiTurnSample: an ordered list of
HumanMessage / AIMessage / ToolMessage turns. The chat layer serialises
that sample to JSON and ships it as the pipeline_interactions field, which
DataRobot moderations reads back to score the run (e.g. agent goal accuracy).
These types used to come from ragas (ragas.MultiTurnSample and
ragas.messages). ragas is an unmaintained package with a large, CVE-heavy
dependency chain, and we only ever used it to build and JSON-serialise this
payload. datarobot-moderations now ships dependency-light equivalents of the
message primitives, so we reuse those and keep only a slim, locally-owned
MultiTurnSample here. That lets us drop the ragas dependency entirely.
MultiTurnSample
Bases: BaseModel
A multi-turn conversation between the human, the agent and its tools.
Slim replacement for ragas' MultiTurnSample. The only field the downstream
moderations consumer reads is user_input; reference is kept for parity
with the moderations model.