fill_schema fills a field only where the source states the value, returns the words the value came from, and tells an empty field apart from a part of the source that was not read.
a quarterly reportyour fieldsrevenuegrowthoutlookmargindividendauditorEUR 4.1 bn12%raisedshown, with no valuethe report does not sayon a page not reada value only where the source states it
Send your fields
Describe the fields as a JSON Schema whose root is an object. Send it with the id of a record, which is the copy of a source that getclean stores after a fetch or an upload. This request sends a template of 6 fields for a company’s quarterly report.CONTENTS_ID with the id of a record.
Read each value with its words
The response has the values in the shape of your schema, and beside them one status for each field. This response is cut to those 2 parts.200 OK
text has the words of the source that each was taken from. A status also says where those words are: the section and the block, on a document the page, and inside a table the row and the column. A reviewer can open each cell of your template at its place in the source.
The other 3 fields are not in schema_values at all, and each says why. The report shows the operating margin without a value. It says nothing about a dividend. And the auditor could be named in a part of the document that was not read. No plausible value was put into any of them.
Know why a field is empty
A status says which of 5 things happened.
The difference between
absent and unread decides what a report can say. “The company does not disclose its scope 3 emissions” is a finding, and it rests on absent. With unread it would be a guess, because the pages where the figure could be were not read.
contract A: every page readabsentthe clause is not therea finding you can reportcontract B: one page read badlyunreadit could be on that pagea person reads one pagean empty field says which it is
absent on a web page can still be on the page, outside its main content. If the record’s left_out is not empty, fill the schema again with scope set to whole_page.
Fill the fields while you fetch
fetch_contents and upload_contents take the same json_schema, so one call can fetch a source and fill your fields. A search takes it for the results that it fetches, in contents.json_schema, so one search can return a filled row for each of its first results.
Check what a fill costs
A fill costs one model step. The key needs the scopecontents:model. A request that sends deterministic_only as true cannot ask for a fill, because a fill is the work of a model.