Agent dataset builder (GraphQL)

Related queries and mutations in Agent traces and evaluations. Each has its own section.

Queries

getAgentDatasetBuilderCandidates (query)

getAgentDatasetBuilderCandidates is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

One dataset's conversations in rank order, with their scores and clusters. Holds no question or answer text. Conversations come from the last 30 days. A single-turn conversation is one with a single turn in that window.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!
datasetTypeAgentDatasetBuilderDatasetType!
workflowStringNull for an agent without workflows.

Returns

AgentDatasetBuilderCandidates!

Example

query GetAgentDatasetBuilderCandidates($traceTableMcon: String!, $agentName: String!, $datasetType: AgentDatasetBuilderDatasetType!) {
  getAgentDatasetBuilderCandidates(traceTableMcon: $traceTableMcon, agentName: $agentName, datasetType: $datasetType) {
    datasetType
    workflow
    windowStart
    windowEnd
    clustered
    clusterContentWithheldReason
  }
}

Types used only by getAgentDatasetBuilderCandidates

AgentDatasetBuilderCandidate

Object type.

FieldTypeDescription
conversationIdString!
askedAtDateTime!
scores[AgentDatasetBuilderScore!]!The latest score for each counted eval.
intentClusterStringNull when unclustered or not shown.
issueClusters[String!]!Issue clusters, for improvement candidates only.
isPinnedBoolean!
mcUrlString!The conversation's page.
AgentDatasetBuilderCandidates

Object type.

FieldTypeDescription
datasetTypeAgentDatasetBuilderDatasetType!
workflowString
windowStartDateTime!
windowEndDateTime!
settingsAgentDatasetBuilderSettings!
clusteredBoolean!False when cluster content is withheld or there's no usable space.
clusterContentWithheldReasonRawContentWithheldReasonWhy clusters are hidden, or null when the user can see them.
candidates[AgentDatasetBuilderCandidate!]!In rank order, pinned conversations first, at most the dataset size.
AgentDatasetBuilderScore

Object type.

FieldTypeDescription
monitorUuidUUID!
evalNameString!
scoreFloat!
scaleMaxFloat
passedBooleanAlways null. Only number-scored evals count, and the floor and ceiling judge them.
higherIsBetterBooleanWhether a higher score is better.
reasoningStringThe judge's reasoning. Null without access to raw agent content.

Related types

AgentDatasetBuilderDatasetType, AgentDatasetBuilderSettings, DateTime, RawContentWithheldReason, UUID

getAgentDatasetBuilderExport (query)

getAgentDatasetBuilderExport is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

An export's status. Poll until COMPLETED, FAILED or STALE. Only the user who started it can read it.

Arguments

ArgumentTypeDescription
uuidUUID!

Returns

AgentDatasetBuilderExport!

Example

query GetAgentDatasetBuilderExport($uuid: UUID!) {
  getAgentDatasetBuilderExport(uuid: $uuid) {
    uuid
    status
    datasetType
    workflow
    conversationCount
    error
    createdTime
  }
}

Related types

AgentDatasetBuilderExport, UUID

getAgentDatasetBuilderExportFile (query)

getAgentDatasetBuilderExportFile is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

A completed export's file in the chosen format. It reads the saved query result, or runs the query again when the result is gone, so it can answer RUNNING: ask again, one request at a time. Content can differ from the first run, and conversations that no longer come back are listed as missing. Only the user who started the export can download it.

Arguments

ArgumentTypeDescription
uuidUUID!
formatAgentDatasetBuilderFormat!

Returns

AgentDatasetBuilderExportFile!

Example

query GetAgentDatasetBuilderExportFile($uuid: UUID!, $format: AgentDatasetBuilderFormat!) {
  getAgentDatasetBuilderExportFile(uuid: $uuid, format: $format) {
    status
    error
    workflow
    fileName
    mimeType
    content
    exampleCount
    skippedConversationIds
    truncatedConversationIds
    leftOutConversationIds
    missingConversationIds
  }
}

Types used only by getAgentDatasetBuilderExportFile

AgentDatasetBuilderExportFile

Object type.

FieldTypeDescription
statusAgentDatasetBuilderContentStatus!
errorStringWhy the file is UNAVAILABLE or FAILED.
workflowStringNull for an agent without workflows.
fileNameStringSet when COMPLETED.
mimeTypeStringSet when COMPLETED.
contentStringThe whole file. Set when COMPLETED.
exampleCountIntExamples in the file. Set when COMPLETED.
skippedConversationIds[String!]!Left out because a newer conversation asked the same question.
truncatedConversationIds[String!]!Examples with a field cut to its size limit.
leftOutConversationIds[String!]!Examples the file leaves out: the chosen format can't hold them, or, in a golden file, their reply was not recorded.
missingConversationIds[String!]!Exported conversations whose content or metadata no longer came back, such as conversations past the 30-day retention.

Related types

AgentDatasetBuilderContentStatus, AgentDatasetBuilderFormat, UUID

getAgentDatasetBuilderPreview (query)

getAgentDatasetBuilderPreview is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

One conversation as a dataset example in the chosen format. Answers RUNNING until the warehouse read finishes, so ask again with the same attemptId. Needs access to the agent's raw content.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!
datasetTypeAgentDatasetBuilderDatasetType!
conversationIdString!
formatAgentDatasetBuilderFormat!
attemptIdUUID!One id per preview opened. Keep it while polling and when the format changes. A new id reads the conversation again.

Returns

AgentDatasetBuilderPreview!

Example

query GetAgentDatasetBuilderPreview($traceTableMcon: String!, $agentName: String!, $datasetType: AgentDatasetBuilderDatasetType!, $conversationId: String!, $format: AgentDatasetBuilderFormat!, $attemptId: UUID!) {
  getAgentDatasetBuilderPreview(traceTableMcon: $traceTableMcon, agentName: $agentName, datasetType: $datasetType, conversationId: $conversationId, format: $format, attemptId: $attemptId) {
    status
    error
    rendered
    guidance
    truncatedFields
  }
}

Types used only by getAgentDatasetBuilderPreview

AgentDatasetBuilderField

Object type.

FieldTypeDescription
nameString!The platform's own field name.
valueStringNull when the format leaves it for the reviewer.
AgentDatasetBuilderPreview

Object type.

FieldTypeDescription
statusAgentDatasetBuilderContentStatus!
errorStringWhy the preview is UNAVAILABLE or FAILED.
scoredFields[AgentDatasetBuilderField!]What the platform scores against. Set when COMPLETED.
referenceFields[AgentDatasetBuilderField!]What the reviewer sees and the platform ignores. Set when COMPLETED.
renderedStringThe example exactly as it appears in the file.
guidance[String!]What to check.
truncatedFields[String!]Fields cut to their size limit, such as answer or tool_calls[3].output.

Related types

AgentDatasetBuilderContentStatus, AgentDatasetBuilderDatasetType, AgentDatasetBuilderFormat, UUID

getAgentDatasetBuilderSettings (query)

getAgentDatasetBuilderSettings is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

An agent's dataset builder settings, with every conversation eval monitor on the agent and whether it counts. Defaults when nothing was saved.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!

Returns

AgentDatasetBuilderSettings!

Example

query GetAgentDatasetBuilderSettings($traceTableMcon: String!, $agentName: String!) {
  getAgentDatasetBuilderSettings(traceTableMcon: $traceTableMcon, agentName: $agentName) {
    traceTableMcon
    agentName
    floor
    ceiling
    goldenSize
    improvementSize
  }
}

Related types

AgentDatasetBuilderSettings

getAgentDatasetBuilderSummary (query)

getAgentDatasetBuilderSummary is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Counts for each of an agent's golden and improvement datasets, one pair per workflow, or why it has none. Conversations come from the last 30 days. A single-turn conversation is one with a single turn in that window.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!

Returns

AgentDatasetBuilderSummary!

Example

query GetAgentDatasetBuilderSummary($traceTableMcon: String!, $agentName: String!) {
  getAgentDatasetBuilderSummary(traceTableMcon: $traceTableMcon, agentName: $agentName) {
    unavailableReason
    clusterContentWithheldReason
    windowStart
    windowEnd
  }
}

Types used only by getAgentDatasetBuilderSummary

AgentDatasetBuilderDatasetSummary

Object type.

FieldTypeDescription
datasetTypeAgentDatasetBuilderDatasetType!
candidateCountInt!Conversations in the dataset, at most its size. The file can hold fewer, because the export leaves out duplicate questions.
clusteredBoolean!Whether the dataset is spread across clusters. False when cluster content is withheld or the agent has no usable cluster space; the dataset is then in score order.
intentClustersCoveredIntNull when the dataset isn't clustered.
issueClustersCoveredInt0 for golden. Null when the dataset isn't clustered, or has no usable issue space.
pinnedCountInt!
pinsNotIncludedInt!Live pins left out because the dataset was full.
AgentDatasetBuilderSummary

Object type.

FieldTypeDescription
unavailableReasonAgentDatasetBuilderUnavailableReasonNull when datasets are available, even when they are empty.
clusterContentWithheldReasonRawContentWithheldReasonWhy clusters are hidden, or null when the user can see them.
windowStartDateTime!
windowEndDateTime!
workflows[AgentDatasetBuilderWorkflowDatasets!]!Each workflow with candidates, most candidates first. An agent without workflows has one entry with a null workflow. Empty when datasets are unavailable.
AgentDatasetBuilderUnavailableReason

Enum type. Why an agent has no datasets. NO_CONVERSATION_EVALS: no conversation eval monitor counts. UNSUPPORTED_AGENT: datasets aren't built for this kind of agent.

ValueDescription
NO_CONVERSATION_EVALS
UNSUPPORTED_AGENT
AgentDatasetBuilderWorkflowDatasets

Object type.

FieldTypeDescription
workflowStringNull when the agent has no workflows.
goldenAgentDatasetBuilderDatasetSummary!
improvementAgentDatasetBuilderDatasetSummary!

Related types

AgentDatasetBuilderDatasetType, DateTime, RawContentWithheldReason

Mutations

pinAgentDatasetBuilderConversation (mutation)

pinAgentDatasetBuilderConversation is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Pin a conversation into the golden or improvement dataset of its workflow, or move its pin to the other one. Only single-turn conversations from the last 30 days can be pinned.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!
conversationIdString!
datasetTypeAgentDatasetBuilderDatasetType!

Returns

AgentDatasetBuilderPin!

Example

mutation PinAgentDatasetBuilderConversation($traceTableMcon: String!, $agentName: String!, $conversationId: String!, $datasetType: AgentDatasetBuilderDatasetType!) {
  pinAgentDatasetBuilderConversation(traceTableMcon: $traceTableMcon, agentName: $agentName, conversationId: $conversationId, datasetType: $datasetType) {
    conversationId
    datasetType
    pinnedBy
    pinnedAt
    expiresAt
  }
}

Related types

AgentDatasetBuilderDatasetType, AgentDatasetBuilderPin

startAgentDatasetBuilderExport (mutation)

startAgentDatasetBuilderExport is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Start exporting a dataset's checked conversations. Poll getAgentDatasetBuilderExport, then download with getAgentDatasetBuilderExportFile. Needs access to the agent's raw content.

Arguments

ArgumentTypeDescription
agentNameString!
conversationIds[String!]!1 to 50 single-turn conversations from the last 30 days, all in the workflow.
datasetTypeAgentDatasetBuilderDatasetType!
traceTableMconString!
workflowStringNull for an agent without workflows.

Returns

StartAgentDatasetBuilderExport

Example

mutation StartAgentDatasetBuilderExport($agentName: String!, $conversationIds: [String!]!, $datasetType: AgentDatasetBuilderDatasetType!, $traceTableMcon: String!) {
  startAgentDatasetBuilderExport(agentName: $agentName, conversationIds: $conversationIds, datasetType: $datasetType, traceTableMcon: $traceTableMcon) {
    export {
      uuid
      status
      datasetType
      workflow
      conversationCount
      error
      createdTime
    }
  }
}

Types used only by startAgentDatasetBuilderExport

StartAgentDatasetBuilderExport

Object type.

FieldTypeDescription
exportAgentDatasetBuilderExport!

Related types

AgentDatasetBuilderDatasetType, AgentDatasetBuilderExport

unpinAgentDatasetBuilderConversation (mutation)

unpinAgentDatasetBuilderConversation is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Remove a conversation's pin. Always true, also when it had none.

Arguments

ArgumentTypeDescription
traceTableMconString!
agentNameString!
conversationIdString!

Returns

Boolean!

Example

mutation UnpinAgentDatasetBuilderConversation($traceTableMcon: String!, $agentName: String!, $conversationId: String!) {
  unpinAgentDatasetBuilderConversation(traceTableMcon: $traceTableMcon, agentName: $agentName, conversationId: $conversationId)
}

updateAgentDatasetBuilderSettings (mutation)

updateAgentDatasetBuilderSettings is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Save an agent's dataset builder settings.

Arguments

ArgumentTypeDescription
inputUpdateAgentDatasetBuilderSettingsInput!

Returns

AgentDatasetBuilderSettings!

Example

mutation UpdateAgentDatasetBuilderSettings($input: UpdateAgentDatasetBuilderSettingsInput!) {
  updateAgentDatasetBuilderSettings(input: $input) {
    traceTableMcon
    agentName
    floor
    ceiling
    goldenSize
    improvementSize
  }
}

Types used only by updateAgentDatasetBuilderSettings

UpdateAgentDatasetBuilderSettingsInput

Input object type.

FieldTypeDescription
traceTableMconString!
agentNameString!
deselectedMonitorUuids[UUID!]!The agent's conversation eval monitors whose scores don't count.
floorInt!1 to 5, above the ceiling.
ceilingInt!1 to 5, below the floor.
goldenSizeInt!1 to 50.
improvementSizeInt!1 to 50.

Related types

AgentDatasetBuilderSettings, UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.