From 847e472fa626fbc14e4fabd3328c2098bd371d29 Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Wed, 6 Nov 2024 16:43:46 -0800 Subject: [PATCH] clarify output structure --- docs/cookbook/receipt-digitization.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/cookbook/receipt-digitization.md b/docs/cookbook/receipt-digitization.md index 83743553c..2d723423e 100644 --- a/docs/cookbook/receipt-digitization.md +++ b/docs/cookbook/receipt-digitization.md @@ -130,7 +130,20 @@ image = load_and_resize_image("receipt.png") ## Define the output structure -We'll define a Pydantic model to describe the data we want to extract from the image. After processing the image, the LLM will output data in this format -- in this case, we'll have a list of items, a store name, address, and so on. +We'll define a Pydantic model to describe the data we want to extract from the image. + +In our case, we want to extract the following information: + +- The store name +- The store address +- The store number +- A list of items, including the name, quantity, price per unit, and total price +- The tax +- The total +- The date +- The payment method + +Most fields are optional, as not all receipts contain all information. ```python class Item(BaseModel):