For more control over the extraction process, you can create custom strategies tailored to your specific document types or complex extraction tasks.
Create a Custom Strategy
Create a class implements the Strategy
interface.
Doing so by extending the Extractor
class is a good starting point for custom strategies as it contains some useful methods that you probably don’t want to implement yourself.
Implement the Strategy
Implement your strategy in the run()
method, which takes the artifacts as an array.
The array
that the run method returns is used as the final output data.
Register the Strategy
Call Magic::registerStrategy('my-custom-strategy', MyCustomStrategy::class)
in your boot()
method in the service provider.
Now your custom strategy is usable in the Data Wizard settings UI.
Next Steps
Step by step guide to extract data from documents using Data Wizard.
Learn how to define and configure data extraction tasks.
Understand different data processing strategies.
Set up your Large Language Model API keys.
Embed Data Wizard into other applications using iFrames or APIs.