Skip to content

Commit 77b02ab

Browse files
authored
Merge pull request #2049 from oracle-devrel/aliottoman-patch-27
Update README.md
2 parents 534de87 + 63a24bc commit 77b02ab

File tree

1 file changed

+21
-7
lines changed
  • ai/generative-ai-service/smart-invoice-extraction

1 file changed

+21
-7
lines changed

ai/generative-ai-service/smart-invoice-extraction/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
An intelligent invoice data extractor built with **OCI Generative AI**, **LangChain**, and **Streamlit**. Upload any invoice PDF and this app will extract structured data like REF. NO., POLICY NO., DATES, etc. using multimodal LLMs.
44

5+
Reviewed date: 22.09.2025
6+
7+
<img src="./image.png">
8+
</img>
9+
510
---
611

712
## 🚀 Features
813

9-
- 🔍 Automatically identifies key invoice headers using OCI Vision LLM (LLaMA 3.2 90B Vision)
14+
- 🔍 Automatically identifies key invoice headers using OCI Vision LLM (LLaMA 3.2 90B Vision or Llama 4 Maverick)
1015
- 🤖 Lets you choose what elements to extract (with type selection)
1116
- 🧠 Leverages a text-based LLM (Cohere Command R+) for context-aware value extraction
1217
- 🧪 Outputs data in clean **JSON** and saves to **CSV**
@@ -32,16 +37,16 @@ An intelligent invoice data extractor built with **OCI Generative AI**, **LangCh
3237
1. **User Uploads Invoice PDF**
3338
The file is uploaded and converted into an image using `pdf2image` (Ensure you upload one page documents ONLY)
3439

35-
2. **Initial Header Detection (LLaMA-3.2 Vision)**
40+
2. **Initial Header Detection (LLaMA-3.2 Vision or Llama 4 Maverick)**
3641
The first page is passed to the multimodal LLM which returns a list of fields that are likely to be useful (e.g., "Policy No.", "Amount", "Underwriter").
3742

3843
3. **User Selects Fields and Types**
3944
A UI allows the user to pick 3 fields from the detected list, and specify their data types (Text, Number, etc.).
4045

41-
4. **Prompt Generation (Cohere Command R+)**
46+
4. **Prompt Generation (Cohere Command A)**
4247
The second LLM generates a custom system prompt to extract those fields as JSON.
4348

44-
5. **Full Invoice Extraction (LLaMA-3.2 Vision)**
49+
5. **Full Invoice Extraction (LLaMA-3.2 Vision or Llama 4 Maverick)**
4550
Each page image is passed into the multimodal LLM using the custom prompt, returning JSON values for the requested fields.
4651

4752
6. **Data Saving & Display**
@@ -86,8 +91,8 @@ streamlit run app.py
8691
> - Replace all instances of `<YOUR_COMPARTMENT_OCID_HERE>` with your actual **OCI Compartment OCID**
8792
> - Ensure you have access to **OCI Generative AI Services** with correct permissions
8893
> - Update model IDs in the code if needed:
89-
> - Vision model: `meta.llama-3.2-90b-vision-instruct`
90-
> - Text model: `cohere.command-r-plus-08-2024`
94+
> - Vision model: `meta.llama-3.2-90b-vision-instruct` or `meta.llama-4-maverick-17b-128e-instruct-fp8`
95+
> - Text model: `cohere.command-a-03-2025`
9196
9297
---
9398

@@ -104,4 +109,13 @@ streamlit run app.py
104109
},
105110
...
106111
]
107-
```
112+
```
113+
114+
## License
115+
Copyright (c) 2024 Oracle and/or its affiliates.
116+
117+
Licensed under the Universal Permissive License (UPL), Version 1.0.
118+
119+
See [LICENSE](LICENSE.txt) for more details.
120+
121+
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.

0 commit comments

Comments
 (0)