Launch Week 02 wrapped — explore all five launches

Update Golden

PUThttps://api.confident-ai.com/v1/datasets/{alias}/goldens/{goldenId}

Updates a single golden by its goldenId in the dataset identified by alias. The golden's fields are replaced with the values you send, tags and custom columns are left unchanged unless you include them.

Provide the fields for a single-turn golden, or a multi-turn golden, matching the dataset type.

PUT/v1/datasets/{alias}/goldens/{goldenId}
curl -X PUT "https://api.confident-ai.com/v1/datasets/{alias}/goldens/{goldenId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "How is the weather like in NYC?",
  "expectedOutput": "Sunny with a chance of rain.",
  "finalized": true
}'
200
{
  "success": true,
  "data": {
    "id": "golden-id"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/datasets/<DATASET-ID>",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • aliasstringRequired

    The alias of the dataset containing the golden.

  • goldenIdstringRequired

    The unique id of the golden, returned when the dataset is pulled.

Request body

  • GoldenRequestDataobject

    Show 13 propertiesHide 13 properties
    • inputstringRequired

      The input to your LLM application.

    • actualOutputstring

      The actual output from your LLM application.

    • expectedOutputstring

      The ideal output from your LLM application.

    • retrievalContextlist of strings

      The retrieval context used by your LLM application.

    • contextlist of strings

      The ideal retrieval context for your LLM application.

    • toolsCalledlist of objects

      The tools called by your LLM application.

      Show 5 propertiesHide 5 properties
      • namestringRequired

        This is the name of the tool.

      • descriptionstringRequired

        This is the description of the tool.

      • inputParametersobject

        This is the input parameters that are passed to the tool.

      • outputstring

        This is the output of the tool.

      • reasoningstring

        This is the reasoning your LLM provided for the tool call.

    • expectedToolslist of objects

      The tools expected to be called by your LLM application.

      Show 5 propertiesHide 5 properties
      • namestringRequired

        This is the name of the tool.

      • descriptionstringRequired

        This is the description of the tool.

      • inputParametersobject

        This is the input parameters that are passed to the tool.

      • outputstring

        This is the output of the tool.

      • reasoningstring

        This is the reasoning your LLM provided for the tool call.

    • additionalMetadataobject

      Additional metadata to associate with the golden.

    • commentsstring

      Comments to associate with the golden.

    • sourceFilestring

      The source file associated with the golden.

    • finalizedboolean

      Whether the golden is ready to use in evaluations.

    • customColumnKeyValuesobject

      Custom dataset column values keyed by column name.

    • tagslist of strings

      Tags to associate with the golden.

  • OR
  • ConversationalGoldenRequestDataobject

    Show 11 propertiesHide 11 properties
    • scenariostringRequired

      A description of the conversation context.

    • userDescriptionstring

      A description of the user in the conversation.

    • expectedOutcomestring

      The ideal outcome or conversation flow.

    • turnslist of objects

      The conversation turns.

      Show 5 propertiesHide 5 properties
      • roleenumRequired

        The role of the turn, either user or assistant.

        Show 2 enum valuesHide 2 enum values
        • user
        • assistant
      • contentstringRequired

        The message content of the turn.

      • userIdstring

        The user ID associated with the turn.

      • retrievalContextlist of strings

        The contexts retrieved to generate the LLM response for this turn.

      • toolsCalledlist of objects

        The tools called to generate the LLM response for this turn.

        Show 5 propertiesHide 5 properties
        • namestringRequired

          This is the name of the tool.

        • descriptionstringRequired

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

    • contextlist of strings

      Context for the conversation.

    • additionalMetadataobject

      Additional metadata to associate with the golden.

    • commentsstring

      Comments to associate with the golden.

    • sourceFilestring

      The source file associated with the golden.

    • finalizedboolean

      Whether the golden is ready to use in evaluations.

    • customColumnKeyValuesobject

      Custom dataset column values keyed by column name.

    • tagslist of strings

      Tags to associate with the golden.

Response

  • successboolean

    This is true if the golden was successfully updated.

  • dataobject

    Show 1 propertyHide 1 property
    • idstring

      This is the ID of the updated golden.

  • linkstring

    A link to the dataset the golden belongs to.

  • deprecatedboolean

    This is true if this datasets endpoint is deprecated.

Built byConfident AI