Extractive question answering
Extract answers to questions from legal documents
Extractive question answering or answer extraction is the process of extracting answers to questions from documents, for example, “what is the governing law of this contract?” or “who is the defendant in this case?”.
Extractive QA can be used to solve a diverse range of information extraction problems whether its as simple as pulling out key dates from a contract or as complex as highlighting legal doctrines relied upon in a judgment.
Because answers are taken directly and exclusively from users’ inputs, extractive QA can often prove faster, more precise and more cost-effective than generative QA.
Isaacus offers two extractive QA models, Kanon Answer Extractor and Kanon Answer Extractor Mini, available through our extractive QA API endpoint.
Usage
Our extractive QA API endpoint accepts a question and one or more documents and returns answers to the question extracted from the documents.
If our answer extractors do not think that there is an answer to the question that can be extracted from any of the documents, it will not return any answers. You can override that behavior by setting the ignore_inextractability
parameter to true
, which you will want to do if you are already using one of our reranking models to identify documents that answer questions.
The code snippet below demonstrates how you could use our extractive QA endpoint to extract the governing law of a contract.