Skip to content
  • There are no suggestions because the search field is empty.

Edit a Supplier AI Extraction Prompt

Add custom rules and test them against real invoices, so you can teach Lentune how to pick up the right details from a specific supplier.

Overview
Open the AI extraction prompt
Pick an example invoice
Write your prompt
Preview the results
Test your prompt on more invoices
Save your prompt
FAQs

Overview

 When AI extraction is on, you can teach Lentune how to read a specific supplier’s invoices. It’s handy when a supplier puts details somewhere unexpected, like a PO number in a Your Ref field, or when lines on later pages get missed. Just write your instructions in plain English, test them on a real invoice and compare the result with the original PDF. Once you’ve saved the prompt, Lentune remembers the rules and applies them to every invoice from that supplier going forward automatically. 

Open the AI extraction prompt

This prompt lives in the supplier details. The quickest way in is straight from the Check screen. That way you can fix an extraction issue the moment you spot it. 

  1. Go to the Check screen and open an invoice from the supplier you want to update.
  2. Select the Manage menu.
  3. Select Edit supplier AI prompt.

The supplier opens in a popup on the AI extraction prompt tab. The invoice you were checking stays open underneath, so you can pick up where you left off when you’re done. You can also get to the same tab by opening the supplier’s details and selecting AI extraction prompt.

When AI extraction is on, Edit supplier AI prompt replaces the Notify rule correction is required option in the Manage menu. The Teach me and Line OCR tabs are also hidden on the supplier, because the AI takes care of that now. 

Pick an example invoice

First, choose an invoice to test your prompt on. Pick one that shows the problem you want to fix, like an invoice where the PO number came through wrong.

The invoice number and date appear in the selector, and the original PDF loads in the right panel. Extraction doesn’t run straight away, so the middle panel shows No preview yet until you click Extract and preview.

Write your prompt

Type your instructions into the prompt box in plain English, the same way you’d explain it to a colleague. If the supplier doesn’t have a prompt yet, you’ll see some placeholder text to get you started.

Keep each instruction short and specific. The best prompts use the exact label printed on the invoice and include a quick example, such as “The PO number is in the Your Ref field. Keep all letters and leading zeros, e.g. PO-00123.”

Not sure where to start? Click See examples under the prompt box to show a list of common instructions. Click any example to add it to the end of your prompt. Anything you’ve already written stays put. Click Hide examples to close the list. Treat these as a starting point, then tweak them to match what’s actually on the supplier’s invoice.

Preview the results

When your prompt is ready, click Extract and preview. Lentune reads the selected invoice using your prompt and shows the results in the middle panel. It’s a test run, so nothing’s saved yet.

The header section shows the details picked up from the invoice. The lines section shows how many lines were extracted and each line’s amount excluding tax. Click the arrow next to a line to expand it and see the other details extracted for that line.

Under the lines, the Line total (excl tax) is checked against the excluding tax amount from the header. If they match, you’ll see a message like “Matches the excluding tax amount ($177.65)”. If they don’t, you’ll see a warning with the difference. That usually means a line was missed or misread.

Compare the preview with the PDF in the right panel. It can take a couple of goes to get it right, and that’s normal. Adjust your prompt and click Extract and preview again. The date and time of the last run show under the button, so you always know the preview is current.

Test your prompt on more invoices

One prompt covers every invoice from the supplier, so it’s worth testing a few before you save. This catches any instruction that fixes one invoice but trips up another.

  1. Pick a different invoice in the selector. Your prompt stays as it is, the new PDF loads, and the previous preview results are cleared.
  2. Click Extract and preview.
  3. Compare the results with the PDF.

Save your prompt

When you’re happy with the results, save the prompt against the supplier.

If you move to another tab on the supplier screen before saving, your changes are kept for now. Just remember to save before you close. Once it’s saved, Lentune uses the prompt whenever it reads invoices from that supplier. 

FAQs

Q: Does Extract and preview save my prompt?
A: No. It’s a test run that shows you what the AI would extract using your prompt. Your prompt is only stored when you click Save or Save and close.

Q: Why can’t I see Edit supplier AI prompt in the Manage menu?
A: It only shows when AI extraction is turned on for your site and you have the right access. If AI extraction is off, you’ll see Notify rule correction is required instead. Contact Lentune Support if you wish to change your extraction method. 

Q: Will my prompt change how other suppliers’ invoices are read?
A: No. Each prompt belongs to one supplier and only affects that supplier’s invoices.

Q: Our supplier already has a prompt longer than 1,500 characters. What happens to it?
A: It keeps working as it is. If you edit it, you’ll need to trim it to 1,500 characters or fewer before you can save.

Q: Where have the Teach me and Line OCR tabs gone?
A: They’re hidden while AI extraction is on, because the AI reads the invoice details and lines for you. They come back if AI extraction is turned off.

Q: What does it mean if the line total doesn’t match?
A: The extracted lines don’t add up to the excluding tax amount on the invoice. This often happens when lines on later pages are missed, freight is skipped, or amounts are read including GST. Try adding an instruction like “Extract the lines on every page” and preview again.

Last updated: 19 October 2026

Need more help? We’re here!

We hope our article was helpful. If you need more info or want to connect, drop us an email at support@lentune.com.