- Reimbursement scenarios have different types of documents such as restaurant invoices, taxi invoices, flight itineraries that need classification
- Logistics import/export scenarios have materials such as import customs declarations, export customs declarations, freight insurance policies, certificates of origin that need classification
Classification templates must be configured in the Docflow workspace to use the classification function.
Docflow performs the complete parsing->classification->extraction workflow by default.
If you only want classification results, please refer to the Classification Only documentation.
If you only want classification results, please refer to the Classification Only documentation.
Classification Principle
After configuring sample files for classification in Docflow, the files are first parsed. The title, file type, field configuration, classification prompts, and other attributes of the sample files are then vectorized and analyzed. Once new files are uploaded and their parsing is completed, algorithms compare them with the configured classification samples to determine the best-matching classification result.Get Classification Results
You can query through the result retrieval interfacefile/fetch
.The interface returns a JSON structure, with file classification information in the
result.files[].category
field.
Classification Result Structure and Status
In the return fromfile/fetch
, key fields for each file include:
id
: File IDname
: File namecategory
: Classification result (e.g.,invoice
)recognition_status
: Recognition status
RecognitionStatus
for complete values):
0
Pending recognition1
Recognition successful (when complete workflow ends)2
Recognition failed3
Classifying10
Classification complete (only appears as final state when uploading withtarget_process=classify
)