Human reviewAP & expenses

Expense GL coding with AI: prompt for account and department suggestions

Suggest GL account, department and class for uncoded invoices or card transactions from your own coding history, with a reason and a confidence for each, and a flag for anything that shouldn't be expensed at all.

When to use it

Use it for uncoded card transactions, AP invoices from new or irregular vendors, or a batch that a new team member coded and you want a second pass on. It works best when you can give it your own history: how you coded the same vendor before is better evidence than any general knowledge the model has.

If your spend platform already auto-codes with rules, use this on the exceptions only.

Input data

  • Uncoded transactions: date, vendor, amount, memo/line description, cardholder or requester department.
  • Chart of accounts with descriptions (expense accounts at minimum), plus department/class lists.
  • Coding history: the last 6–12 months of coded transactions (vendor, description, account, department).
  • Your coding rules: capitalization threshold, prepaid threshold and policy, accounts that require approval (e.g. legal, consulting), and accounts nobody should use (suspense, miscellaneous).

The prompt

Replace the [bracketed] items. Paste it with your files attached. It works in any capable assistant; tool-specific notes are in the steps.

Prompt
You are helping code expense transactions to our general ledger.

Attached:
- Uncoded transactions: [file]
- Chart of accounts and department list: [file]
- Coding history (last [12] months): [file]
- Our coding policy: capitalization threshold $[X]; prepaid if the service period extends beyond the current month and the amount exceeds $[Y]; never use [suspense/misc accounts].

For each uncoded transaction, return a table with:
transaction ID | vendor | amount | suggested account (number and name) | suggested department | basis | confidence (high/medium/low) | flags

Rules for "basis":
- "History": the same vendor was coded consistently before. Cite how many prior transactions and the account used.
- "History – inconsistent": the vendor was coded to more than one account before. List them and explain your choice.
- "Description": no history, so inferred from the description. Confidence can't be high.

Flags (use all that apply):
- CAPEX? : amount ≥ capitalization threshold and the description suggests equipment, software implementation or a long-lived asset
- PREPAID? : annual/multi-month subscription, insurance, maintenance contract, deposit
- ACCRUAL/CUTOFF? : service date appears to be in a different period from the transaction date
- PERSONAL/POLICY? : looks non-business or outside expense policy
- INTERCOMPANY? : vendor is an affiliate
- NEEDS INFO : you cannot code it from the data

Do not guess when the data doesn't support a choice; mark NEEDS INFO. Use only accounts that exist in the chart of accounts provided. At the end, summarize counts by confidence and list every flagged item.

Steps

  1. Export the history with the same vendor naming as the uncoded batch (vendor ID if you can, since names vary).
  2. Run the prompt. Sort the output by confidence and by flags.
  3. Accept "History / high" lines after a sample check. Review every medium, low and flagged line individually.
  4. Route CAPEX?, PREPAID? and ACCRUAL/CUTOFF? flags to whoever owns fixed assets, prepaids and accruals. Those are separate decisions, not coding choices.
  5. Import the approved coding through your normal AP or card-platform workflow (with its approvals). Don't paste AI output straight into the ledger.
  6. Each month, feed corrections back into your vendor coding rules so fewer lines need AI next time.

Control map

What the AI may do, step by step. How ratings work.

RatingStep
Safe to automateApplying coding where vendor history is consistent and the amount is under your review threshold, if your policy allows and a sample is checked.
Human reviewDescription-based suggestions, inconsistent-history vendors and anything flagged.
Never automateCapitalize-vs-expense decisions, policy exceptions and approval of the transactions themselves.

Audit trail

  • Keep the AI output table with the batch, including the basis and confidence columns. They show the reviewer why each line was coded that way.
  • Note who reviewed and accepted the coding, and which lines were changed from the suggestion.
  • Approvals stay in the AP or spend system. AI suggestions are not approvals.

Failure modes

  • Propagating past mistakes. If a vendor was miscoded for a year, history-based coding repeats it confidently. Check high-volume vendors against the account description once.
  • Invented account numbers or departments that don't exist. The prompt restricts it to the list provided, but validate on import.
  • Missing capitalization and prepaids on invoices with vague descriptions ("Services – Q1–Q4").
  • Vendor-name drift ("AWS", "Amazon Web Services", "AMZN*WEB") splits the history. Normalize vendor names first.

Data handling

  • Use a company-approved AI workspace whose terms say your inputs are not used for model training. Check your plan; don't assume it.
  • Strip or mask what the task doesn't need: employee names, bank account numbers, customer PII, SSNs or TINs.
  • If you are a public company, treat pre-release results as material non-public information and keep them inside approved systems.

Practitioner guidance, not accounting, audit or legal advice. Your policies, materiality thresholds, auditors and the applicable standards control.

Related workflows

Human reviewAccruals & prepaids

Accrual identification

Compare expected recurring spend, open POs and post-period invoices against what's been booked, to produce a list of candidate accruals with evidence. A person decides what gets booked.

ClaudeChatGPTClaude for Excel
Human reviewAccruals & prepaids

Prepaid amortization schedule

Turn invoices for annual subscriptions, insurance and maintenance into a prepaid schedule with formulas, a monthly amortization entry and a roll-forward that ties to the GL.

Claude for ExcelCopilot in ExcelChatGPT
Human reviewClose management

Journal entry review

Screen the full journal entry population for the characteristics auditors look at (manual, post-close, unusual users, round amounts, seldom-used accounts), then check that support and approvals exist. Approval stays human.

ClaudeChatGPTClaude for Excel