Draft a schema with AI
New to extractions?
Start with the tutorial Your first extraction. In about ten minutes it takes you from a blank schema to a first result with its sources, and this guide will then read as a set of steps you have already taken once.
Have an agent write an extraction schema's item list for you, from a requirements document or description of your own, from example documents, or from both, then review what it proposes and accept it as a schema. Until you accept, the draft cannot be run and only you can see it. Building a schema by hand, running it, and reading results are covered in Extract information from contracts; the limits on a draft are listed in Extraction schemas and results.
Request a draft
- Open the Workflows page, select the Extractions sub-tab, select + beside the Extraction schemas heading, and choose Draft with AI from the menu.
- Give the schema a name and, optionally, a description. The name is what the draft, and the schema you accept from it, will be called; the agent does not choose it.
-
Answer Do you already know what you want to extract? It appears once the schema has a name, and each answer opens its own sections beneath it.
- Yes, I have a requirements document — select Select requirements document and pick a document from your library that already sets out what you need: an abstract form, a checklist, or a data-points spreadsheet you keep for this kind of contract. Use this document confirms it, and its text becomes the agent's brief. A document with no readable text yet, or one over 100 pages, is refused with a message saying so.
- Yes, I will describe the information I need — describe or paste the list of information you need: a client's list of data points, an internal checklist, or a plain description of what you look for.
- No, I want you to infer what to extract from one or more example documents — the agent works out what to extract from the documents alone.
With a requirements document or a description, the agent keeps only the rows a document can answer, gives each a format, and leaves the rest out with a reason. The window then asks Would you also like to provide example target documents?; choose Yes to add some.
To add example documents, select Select documents and tick up to four contracts of the type the schema will run against, then Use selected documents. The section lists them, each with a remove control, and Edit document selection reopens the picker. Together the documents can run to 120 pages.
Why add examples to your requirements? Your requirements say what to find; the examples show how documents of this kind say it. With both, each item is worded in the documents' own terms, shown with the passage that answers it, and given a format the documents bear out, and the agent suggests anything your requirements missed. Because an item's What to extract is the only instruction every later run follows, that wording is where the examples earn their place. On their own, the examples give you the terms a reader of that kind of document needs; your requirements on their own give you their rows, typed, with no passages to show.
When you are working from examples alone and have selected two or more, the window also asks Should the agent focus only on differences? Choose Yes when the documents are instances of one standard form — the same lease, engagement letter, or order form filled in differently each time. The agent then ignores the wording they share and proposes a field for each term that differs between them, with the value it found in each document shown as evidence. A term that is the same in every document is left out.
What the proposal contains for each combination of inputs is set out in What a draft does with your inputs.
-
Say whether you would like a report. Once you have given the agent something to work from, the window asks Would you like to set up a report pro-forma for use with this schema? Results are shown as a table by default; a report pro-forma is a Word document that each run completes from its results, so that a run can also hand you a finished lettings report, checklist, or precedent. No is selected to begin with, and you can set reports up later instead from the schema's ⋮ menu (Other actions) under Customise reports. If your requirements document is itself a suitable Word pro-forma, you can choose Yes, use my requirements document and each run will complete a copy of it. Otherwise choose Yes, use a different document (or Yes, when there is no requirements document to reuse), select Select document, and pick a Word document from your library; a document with no Word version is refused in the picker with a message saying so. Give the report a name, or keep the one taken from the document's title. Written reports, and any changes to this one, are made under Customise reports once the schema is live.
-
Select Draft schema. The window closes once the run has started, and a row marked Drafting… with a spinner appears at the top of your schema list. A message confirms the dispatch straight away, with a Monitor progress on the Activity panel link that opens Activity, where the run's row shows its progress.
The draft is written in the background, in the same way as any run. While it is under way it appears in Activity with a Build pill, named after the draft. See Track agent runs.
From a requirements document or a description, the agent keeps only items that can be answered from a document's text; anything that is process information rather than contract content — a reviewer column, an office-use box, an upload date — is left out, with the reason. From examples, it proposes the parties, money, dates, and obligations the documents actually contain, in the order they appear.
Review the draft
When the draft is ready, its row at the top of your schema list is marked Proposed, and the lines beneath its name give the date and how many of the proposed items are currently selected. Only you can see your drafts. Select the row and the draft opens in the editor, with the same Proposed mark beside the Items to extract heading. Select Notes from the drafting agent to read any whole-draft judgement calls the agent made and, when you drafted from a brief, the rows of it the agent left out. If you set up a report, a Reports line beside those controls names it; if it could not be set up — the form is no longer a Word document your team can use, say — the line says so instead, and you can add a report under Customise reports after accepting. The proposed fields are listed under Items to extract:
- Each proposed field has a tick box. Untick any you do not want. A field the agent drew from the examples but could not point to a passage for starts unticked, marked No evidence. When you drafted from several documents, each field shows how many of them it was found in, for example In 3 of 4 documents; a field found in only one may be a quirk of that document. If you asked the agent to focus only on differences, a field whose value differs between the documents is marked Varies.
- Under each field, a note says where it came from — From your brief, From the examples, or Suggested by the agent — with the agent's reason, and Evidence shows the passage and clause it was drawn from in each document, with the value found there when you asked the agent to focus only on differences.
- Edit any field as you would in the editor: its label, what to extract, and extraction format.
- Excluded from your brief, in the notes window, lists the rows of your brief the agent left out and why; the control that opens it says how many. Select Reinstate to bring one back as a field at the end of the list. The window stays open so you can bring back several, and closing it takes you to the last one.
- Select the + button on the line between two fields to add anything missing, wherever it belongs. A field you add is marked Added by you.
Your edits save as you go, so you can leave the review and come back to it. The draft waits at the top of your schema list until you accept or discard it; nobody else can see it, and it cannot be run.
Accept or discard it
Both controls sit on the draft's row in your schema list, where a schema's Run control would be, so you can act on a draft without opening it.
- Select the tick control, Accept and publish, to turn the draft into a schema made of the ticked fields. The row's count says how many that is, and the control waits until at least one item is ticked. The new schema opens in the editor like any schema you built by hand, appears in your schema list, and you can run it straight away — see Extract information from contracts.
- Select the bin control, Discard draft, to drop the draft. It is removed from your schema list and from Activity.
If a draft could not be read — the message "This draft could not be read." shows in the strip — open it to see the reason and the agent's reply, then select Discard draft (in the editor or on the row) and try again, perhaps with a shorter brief or fewer examples.