LLM-readable documentation index

Submit Enrich Ground Truth

Hand off to an LLM

Submit ground-truth re-ranking for an enrich event.

An enrich output ranks candidates per enriched field, each candidate carrying a stable id. This endpoint records the client's own ranking of those candidates (by id) as ground truth, for later ranking-quality metrics.

Per field, rankings gives each candidate a 1-based rank (lower = better); ties and gaps are allowed, and candidates left out are treated as unranked. Every id must appear in that field's enrich output. Re-submitting overwrites.

Non-enrich events return 400, matching POST /v3/events/{eventID}/feedback, which reports an unsupported function type the same way. A body that is structurally invalid (missing path, empty rankings, rank < 1, duplicate ids) also returns 400; a body that is well-formed but does not match the output (unknown field path, unknown candidate id) returns 422.

POST
/v3/events/{eventID}/enrich-feedback
x-api-key<token>

Authenticate using API Key in request header

In: header

Path Parameters

eventID*string

The unique identifier of the enrich event.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.bem.ai/v3/events/string/enrich-feedback" \  -H "Content-Type: application/json" \  -d '{    "fields": [      {        "path": "string",        "rankings": [          {            "id": "string",            "rank": 0          }        ]      }    ]  }'
{
  "eventID": "string",
  "functionType": "string",
  "fields": [
    {
      "path": "string",
      "rankings": [
        {
          "id": "string",
          "rank": 0
        }
      ]
    }
  ],
  "createdAt": "2019-08-24T14:15:22Z"
}

See also