How to Reshape Extracted Data into a Custom Structure with an AI Prompt

Datafromfile's workspace lets you run a free-text AI prompt on your already-extracted table to split columns, merge fields, categorize rows, or reformat values, beyond what a fixed template covers.

How to Reshape Extracted Data into a Custom Structure with an AI Prompt

Most document extraction tools give you one output shape: whatever their template decided. That works fine until the result doesn't quite match what you actually need, you wanted the address split into street, city, and postal code, or the item descriptions categorized by expense type, and now you're doing that part manually anyway. Datafromfile's workspace has a feature built for exactly this gap: a custom AI prompt you can run directly on your extracted table.

How it fits into the workflow

Every extraction, PDF, image, or spreadsheet, first produces a structured table using automatic detection, so you're never starting from a blank page. From there, the workspace's AI Action Menu offers both one-click presets (clean data, remove duplicates, standardize dates, standardize currencies, categorize line items, fill missing values) and a free-text custom prompt field for anything the presets don't cover.

What a custom prompt can actually do

Because the prompt runs against your real, already-extracted rows, not the original document, it can restructure the table itself, not just clean values:

  • "Split the full_name column into first_name and last_name."
  • "Combine the quantity and unit_price columns into a new line_total column."
  • "Categorize each row as Software, Hardware, or Services based on the description."
  • "Reformat every date to YYYY-MM-DD and every amount to two decimal places."

Writing prompts that get consistent results

  • Name the exact column(s) involved, using the header text as it appears in your table.
  • Describe the target format precisely when there's ambiguity ("two decimal places," not just "clean up the numbers").
  • Keep one instruction per prompt when the change is structural (splitting or merging columns), chaining multiple structural changes in one prompt is more error-prone than running them one at a time and checking the result between steps.
  • Review the table after each run. This is a review-and-edit workflow, not a black box, every cell stays directly editable if the AI action needs a manual touch-up.

Where this is most useful

Custom prompts earn their keep on documents that don't fit a category perfectly, an internal report with unusual field names, a spreadsheet import that needs re-columning before it matches your accounting software's format, or line items that need categorizing by a rule specific to your business rather than a generic preset. It's the difference between "the tool decided the structure" and "you decided the structure, and the AI applied it."

Try it on your own data

Upload a document to get an initial extraction, then open the AI Action Menu in the workspace and try a custom prompt on the result, no credit card required to test it on a real file.

For the extraction step itself, see our guide on extracting tables from PDF documents with AI.

Keep reading