box_ai_extract_structured_enhanced_using_template_tool
Extract structured data from files using AI to populate a single metadata template, combining information from multiple documents into one complete record.
Instructions
Extract structured data from one or more files and return a SINGLE metadata instance (Enhanced version).
This enhanced tool analyzes the provided file(s) and extracts information to populate a single metadata instance based on the specified template. When multiple files are provided, Box AI combines information from ALL files to create ONE complete metadata record.
Enhanced features:
Uses advanced AI models (e.g., Google Gemini) for improved accuracy
Better handling of complex document layouts and image quality
More robust extraction for handwritten or low-quality scans
Use cases:
Single file: Extract metadata from one receipt, invoice, or document
Multiple files: Combine data from multiple sources into one metadata instance (e.g., extract project info from a proposal PDF, budget spreadsheet, and timeline image)
NOT for batch processing: If you need to extract metadata from multiple files as separate instances, call this tool once per file in a loop.
Args: ctx (Context): The context object containing the request and lifespan context. file_ids (List[str]): The IDs of the files to read. template_key (str): The key of the metadata template to use for the extraction. Example: "insurance_policy_template". Returns: dict: The extracted structured data in a json string format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_ids | Yes | ||
| template_key | Yes |