Launch Week 02 wrapped — explore all five launches

Create Golden

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

Creates a single golden in the dataset identified by alias. The dataset's type (single- or multi-turn) determines how the golden is interpreted. Optionally target a specific datasetVersion; omitting it uses the latest version.

POST/v1/datasets/{alias}/goldens
curl -X POST "https://api.confident-ai.com/v1/datasets/{alias}/goldens" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "golden": {
    "input": "What is the capital of France?",
    "expectedOutput": "Paris.",
    "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 to add the golden to.

Request body

  • goldenobject | objectRequired

    The golden to create. Provide single-turn or multi-turn fields matching the dataset type.

    Show 2 variantsHide 2 variants
    • 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.

  • datasetVersionstring

    Optional dataset version to add the golden to. Omitting it targets the latest version (or unversioned if the dataset has no versions).

Response

The golden was created successfully.

  • successboolean

    This is true if the golden was successfully created.

  • dataobject

    Show 1 propertyHide 1 property
    • idstring

      This is the ID of the created golden.

  • linkstring

    A link to the dataset the golden belongs to.

  • deprecatedboolean

    This is true if this datasets endpoint is deprecated.

Built byConfident AI