Prompt library Civil servants, Intermediate, Across government, Data extraction
Pull data from documents into a table
Extract names, figures and dates from reports, forms or scanned tables into a clean table you can paste into a spreadsheet.
Last reviewed: . Reviewer: Muhammad Asadullah.
Before you paste anything: replace names, CNIC numbers and other personal details with placeholders and never use classified material. Use only AI tools your department allows.
When to use it
Information you need sits inside reports, returns or scanned tables and you want it in rows and columns without retyping everything.
The prompt
Extract information from the document below into a table.
[Paste the text or attach the document if your approved tool allows files]
Columns, in this order:
1. [Column name], format: [e.g. text]
2. [Column name], format: [e.g. number without commas]
3. [Column name], format: [e.g. date as DD-MM-YYYY]
Rules:
- One row per [record, e.g. district / school / application].
- Copy values exactly. Do not calculate, round or correct anything.
- If a value is missing or unreadable, write MISSING. Never guess.
- Add a last column called "Source" with the page or section where each row was found.
Output the table as tab-separated text so it can be pasted into a spreadsheet.
How to fill it in
- Name every column and its format. Vague requests produce inconsistent tables.
- For long documents, extract in batches and check each batch before continuing.
Before you use the result
- Count the rows. Does the number match the document?
- Spot-check at least one value in five against the source. AI misreads digits (especially in scans) and shifts values between columns without warning.
- Add up any totals yourself and compare them with the document's own totals.
Related guide: How to pull data out of documents.