Skip to main content
POST
LMUnit

Authorizations

Authorization
string
header
required

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

Body

application/json

LMUnit input request object.

query
string
required

The prompt to which the model responds

response
string
required

The model response to evaluate

unit_test
string
required

A natural language statement or question against which to evaluate the response

Response

Successful Response

LMUnit result object.

score
number
required

The response is scored on a continuous scale from 1 to 5 on the unit test. The discrete scores 1, 2, 3, 4, and 5 roughly correspond to "Strongly fails," "Fails," "Neutral," "Passes," and "Strongly passes," respectively.