Authorizations
An Isaacus-issued API key passed as a bearer token via the Authorization
header in the format Authorization: Bearer YOUR_API_KEY
.
Body
A request to classify the relevance of legal documents to a query with an Isaacus universal legal AI classifier.
The Isaacus Query Language (IQL) query or, if IQL is disabled, the statement, to evaluate the texts against.
The query must contain at least one non-whitespace character.
Unlike the texts being classified, the query cannot be so long that it exceeds the maximum input length of the universal classifier.
1 - 5000
"This is a confidentiality clause."
"{IS confidentiality clause} AND {IS clause obligating \"Supplier\"} AND {IS unilateral clause}"
The texts to classify.
Each text must contain at least one non-whitespace character.
[
"I agree not to tell anyone about the document."
]
The method to use for producing an overall confidence score.
auto
is the default scoring method and is recommended for most use cases. Currently, it is equivalent to chunk_max
. In the future, it will automatically select the best method based on the model and inputs.
chunk_max
uses the highest confidence score of all of the texts' chunks.
chunk_avg
averages the confidence scores of all of the texts' chunks.
chunk_min
uses the lowest confidence score of all of the texts' chunks.
auto
, chunk_max
, chunk_avg
, chunk_min
"auto"
Settings for how the texts should be chunked into smaller segments before classification using semchunk.
If null
, the texts will not be chunked and will instead be truncated to the maximum input length of the model less overhead if found to exceed that limit.
Options for how to split text into smaller chunks.
{ "size": 512, "overlap_ratio": 0.1 }
{ "size": 512, "overlap_tokens": 10 }
{ "size": 512 }
Response
The documents have been successfully classified.
Classifications of the relevance of legal documents to a query produced by an Isaacus universal legal AI classifier.
The classifications of the texts, by relevance to the query, in order from highest to lowest relevance score.
[
{
"index": 0,
"score": 0.8825573934438159,
"chunks": [
{
"index": 0,
"start": 0,
"end": 46,
"score": 0.8825573934438159,
"text": "I agree not to tell anyone about the document."
}
]
}
]
Statistics about the usage of resources in the process of classifying the text.
{ "input_tokens": 19 }