Universal classification
Classify legal documents without examples
Universal classification or zero-shot classification is the process of determining whether a statement expressed about a document, for example, “this is an indemnity”, is supported by that document.
Unlike traditional classifiers, universal classifiers don’t require you to provide any examples beforehand to classify a document. All you need to do is write out your classification criteria.
In practice, universal classifiers can be used for a wide variety of information retrieval and extraction tasks beyond traditional classification tasks, from pulling out particular types of clauses from contracts all the way to scoring the relevance of search results to legal queries.
Isaacus currently offers two universal classifiers: the Kanon Universal Classifier and the Kanon Universal Classifier Mini. Both of these universal classifiers benchmark as the most accurate and efficient legal AI classifiers of their size.
Our universal classifiers are available via our universal classification endpoint as well as our reranking endpoint, where they can be used to rank legal documents by their relevance to search queries.
Usage
To use our universal classification API endpoint, all you need is a text and a statement to evaluate the text against. The endpoint will then return a score between and representing the model’s estimation of the likelihood that the text supports the statement, with a score above indicating a positive classification.
As an example, if you wanted to pull out indemnities from a contract, you could pass our universal classification endpoint the contract alongside the statement “This is an indemnity.”, as shown below (consult our quickstart guide first if you haven’t set up your Isaacus account and API client).
Because legal documents can often be quite long and AI models can only take in so many words at a time, our universal classification endpoint will automatically break documents up into smaller chunks for you (though this can be disabled). Typically, these chunks will end up corresponding to individual clauses in a document.
Thus, carrying on from the above example, if we wanted to extract the specific clauses from a contract that contain indemnities, we could do so by filtering for chunks with a score over .
Isaacus Query Language (IQL)
In addition to being able to express statements in natural language, it is also possible to express statements in the Isaacus Query Language (IQL).
IQL is a query language designed specifically for analyzing legal documents with AI systems.
Any statement you can think of qualifies as an IQL statement. You just need to wrap it in curly brackets like so: {This is an indemnity.}
.
With IQL, you can use logical operators like AND
, OR
and NOT
to combine multiple statements together as well as parentheses to group statements together.
For example, if you wanted to pull out both confidentiality clauses and indemnities from a contract, you could use the query {This is a confidentiality clause.} OR {This is an indemnity.}
.
IQL also features support for query templates, highly optimized queries that abstract away the need to optimize new idiosyncratic prompts for individual models.
Query templates are invoked using the format {IS <template name>}
. A list of available templates can be found on our templates page.
As an example, the query {This is a confidentiality clause.} OR {This is an indemnity.}
could be replaced with the query {IS confidentiality clause} OR {IS indemnity clause}
to both simplify the query and improve its performance.
We’ve got templates for pulling out warranties, force majeure clauses, caps on liability — even unilateral clauses, clauses that benefit or obligate only a single party, often a key indicator of a contract’s one-sidedness and potential unfairness.
We also have templates that allow you to plug in your own descriptions of what you’re looking for, such as {IS clause called "<clause name>"}
(e.g., {IS clause called "confidentiality"}
) or {IS clause that "<clause description>"}
(e.g., {IS clause that "imposes a duty of confidentiality"}
). These templates are particularly useful for searching for things that are not directly covered by an existing template.
We do not yet have very many templates for non-contractual classifications, however, our models have been trained on an equal mix of contracts, cases and legislation, so you can always write your own queries for anything not covered by an existing template.
We’re working on introducing more templates to cover a wider range of classification problems in the future. You can always reach out to suggest new templates or provide feedback on existing ones.