Overview
Form schema (form_schema ) is an optional edit endpoint configuration that templatizes the editable fields in your document. A form schema contains the bounding boxes for each editable widget, along with a type (text or checkbox) and description to help Reducto map instructions correctly.
Studio offers an easy drag-and-drop interface for creating and editing your form schema.
Benefits of adding a form schema:
- Better edit accuracy (field locations and instruction matching)
- Faster edit endpoint latency
- More consistent results even with different instructions
- Ability to add form widgets to documents missing some
How to create a form schema using Studio
Use Studio to automatically detect editable widgets, add widgets, edit descriptions, and adjust their locations. Studio will generate the edit endpoint call so you can copy and paste the API call directly into your code.1
Create a new edit pipeline
First, hit “Add pipeline+” and select the “Edit” pipeline option. Choose a name, and press “Create”.
2
Upload a file and add edit instructions
Before a form schema can be created, the edit pipeline must be run. Upload a file, add editing instructions, and run the pipeline.
3
View and adjust the form schema
On the “Configuration” tab, you can view the form schema below edit instructions.The file viewer is now an interactive drop-and-drop interface for adjusting your widgets in the form schema. You can move and change the size of each widget.Each form schema field has settings that allow you to update the title, duplicate, or delete the widget. The field description is what the LLM uses to determine what data should fill the widget.
4
Create a new widget
Let’s add a new widget. Hit the ”+” button in the form schema options. This activates “Creation Mode”, allowing you to create a widget by clicking and dragging on the file viewer. Hit “escape” to exit creation mode.You can then click on the new field to change its description in the form schema.
5
Copy the edit endpoint API call
After finalizing your form schema, the edit endpoint API call is accessible by clicking the ”</> Deploy” button. The code is available to copy and paste under the “Direct API Call” tab in Python, Typescript, and REST. If you want to save lines of code, deploy a Pipeline ID and call it directly.