POST
/
api
/
v1
/
judge
/
reliability
curl --request POST \
  --url https://api.collinear.ai/api/v1/judge/reliability \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "context": "<string>",
  "conv_prefix": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ],
  "response": {
    "role": "<string>",
    "content": "<string>"
  },
  "judge_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "space_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "judgement": 123,
  "extra": {},
  "category": "<string>"
}

Parameters

  • context: This is the context document for the judge. It contains the document which is used to evaluate whether the query is hallucinated or not.

  • conv_prefix: This is the conversation prefix in OpenAI format. It should be a list of dictionaries with keys role and content.

  • response: This is the response from the model. It should be in OpenAI format.

  • judge_id: The unique identifier for the judge. Learn more about obtaining a judge ID.

  • space_id: The unique identifier for your space. Learn more about obtaining a space ID.

Response

The response will be a JSON object with the following fields:

judgement : The reliability judgement of the model output. The possible values are

  • 1: Which means the output is reliable
  • 0: Which means the output is unreliable

extra: Contains the raw output from the judge for further inspection.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
context
string
required
conv_prefix
object[]
required
response
object
required
judge_id
string
required
space_id
string
required

Response

200
application/json
Successful Response
judgement
integer
required
extra
object | null
category
string | null