Skip to content

Commit 50e81e6

Browse files
committed
creating new document classification article
1 parent c05ab9a commit 50e81e6

30 files changed

+215
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2024 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Document Evaluation Tool using Oracle Generative AI, OCI Document Understanding and Oracle Integration Cloud
2+
3+
Reviewed: 14.03.2024
4+
5+
In this article, we'll explore how to make a handy tool that helps to evaluate documents using Oracle Generative AI, OCI Document Understanding, and Oracle Integration Cloud (OIC).
6+
This application combines a loow-code approach to orchestrate LLM AI services and applications using Oracle Integration Cloud
7+
and Generative AI prompting techniques for tasks like document key criteria extraction, summarization and evaluation.
8+
9+
10+
# When to use this asset?
11+
12+
See the README document in the /files folder.
13+
14+
# How to use this asset?
15+
16+
See the README document in the /files folder.
17+
18+
# License
19+
20+
Copyright (c) 2024 Oracle and/or its affiliates.
21+
22+
Licensed under the Universal Permissive License (UPL), Version 1.0.
23+
24+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Document Evaluation Tool using Oracle Generative AI, OCI Document Understanding and Oracle Integration Cloud
2+
3+
Reviewed: 14.03.2024
4+
5+
# Introduction
6+
In this article, we'll explore how to make a handy tool that helps to evaluate documents using Oracle Generative AI, OCI Document Understanding, and Oracle Integration Cloud (OIC).
7+
This tool can be super useful in different situations:
8+
For example, it could help recruiters in identifying the top nN% of resumes to get the best candidate for a job, as well it could help to check the RFP compliance in a vendor bid, or easily figure out what's in a bunch of email attachments without opening each one, but these are only few cases out of hundreads, you just name it. It can be applied to any industry, adaptable to any department like HR, Procurement, Marketing, Customer Service and others.
9+
10+
Here are just 2 examples on how you may use the document evaluation application :
11+
12+
A CV Evaluation App as part of a recruitment process:
13+
14+
<img src="./images/1_CVEvaluation.png"></img>
15+
<img src="./images/2_CVEvaluationResults.png"></img>
16+
17+
18+
A Supplier Proposal Evaluation App as part of a vendor bid.
19+
20+
<img src="./images/3_RFPEvaluation.png"></img>
21+
<img src="./images/4_RFPEvaluationResults.png"></img>
22+
23+
In this Article we will use as a case study: **“CV Evaluation APP”**
24+
# Prerequisites
25+
26+
Before getting started, make sure you have access to the following Oracle Cloud Infrastructure (OCI) services:
27+
28+
- Oracle Generative AI Service (GenAI)
29+
- Oracle Document Understanding Service
30+
- Oracle Integration Cloud (OIC) with Visual Builder(VBCS) enabled
31+
- Oracle Object Storage
32+
33+
34+
# Solution Architecture
35+
36+
In this section, we'll dive into the building bocks of the solution architecture.
37+
<img src="./images/5_SolutionArchitecture-oci-lowcode-ai-rag-logical-blocks.png"></img>
38+
39+
We've built the application using Oracle Visual Builder (as part of OIC), and it smoothly runs through Oracle Integration Cloud as the main, low code orchestration tool. OCI Document Understanding is there to handle the document processing, and Generative AI Multi-Chain Prompt technique for extracting key information from these CVs, summarizing them and help to facilitate the decision making process:
40+
41+
1. Document Evaluation Tool App interface built using VBCS:
42+
43+
- The “CV Evaluation App” discussed in this context is crafted within the VBCS platform. Oracle Visual Builder Cloud Service serves as a hosted environment for building your application development infrastructure. It offers an open-source, standards-based development service for creating, collaborating on, and deploying applications within the Oracle Cloud.
44+
45+
2. Document Processing with OCI Document Understanding.:
46+
- The role of OCI Document Understanding is to extract content from document images and other document file types, as CVs can be in different formats..
47+
- The service employs machine learning and optical character recognition capabilities(OCR) to analyze and extract information from various types of documents.
48+
49+
3. Key Criteria Extraction using OCI Generative AI Service:
50+
- The extracted CV data from Document Understanding is sent to the OCI Generative AI Service to perform the following two tasks: CV Summarization and evaluation criteria extraction. This action is performed via one single prompt, that we will later explore in the section “Prompting with Oracle Generative AI”.
51+
52+
4. Integration and orchestration using OIC:
53+
- Oracle Integration Cloud adopts a low-code approach, allowing to create integrations and workflows with minimal coding effort and this accelerates the development process. OIC includes monitoring and analytics tools that provide real-time visibility into integration flows. This helps to track performance, identify bottlenecks, change and optimize LLM integration flows like the one we are exploring here.
54+
55+
5. Document Evaluation using Generative AI:
56+
- The decision-making process could be facilitated in this case with the help of Oracle Generative AI. We are using prompting techniques to help recruiters with useful information that they can use in the decision-making process.
57+
58+
59+
60+
# Application Flow in Detail
61+
62+
In this application:
63+
64+
**Step1.** The File Picker action in VBCS allows the Recruiter to upload all the CVs .
65+
66+
<img src="./images/6_Step1VBCS_FilePicker.png"></img>
67+
68+
<img src="./images/7_Step1VBCS_FilePicker2.png"></img>
69+
70+
**Step2.** Evaluator select hard and soft criteria(input fields) from a predifined list.
71+
72+
<img src="./images/8_Step2VBCS_CriteriaSelection.png"></img>
73+
74+
**Step3.** Evaluator press the button “Evaluate”
75+
76+
<img src="./images/9_Step3VBCS_Evaluation1.png"></img>
77+
<img src="./images/10_Step3VBCS_Evaluation2.png"></img>
78+
79+
**Step4.** After pressing the button “Evaluate”, each CV is processed via Document Understanding, triggering the **OIC Data Loader Low-Code Child Integration Flow** (CVs Data Extraction with Document Understanding REST API)
80+
81+
<img src="./images/11_Step4OIC_DataLoader.png"></img>
82+
<img src="./images/12_Step4OIC_DataLoaderConfig.png"></img>
83+
<img src="./images/13_Step4OIC_DataLoaderRestInvoke.png"></img>
84+
<img src="./images/14_Step4OIC_DataLoaderSampleJson.png"></img>
85+
<img src="./images/15_Step4OIC_DataLoaderSapleJson2.png"></img>
86+
<img src="./images/16_Step4OIC_DocUnderstanding.png"></img>
87+
88+
89+
**Step5.** At this step, using Generative AI the summary of the CV is created and also evaluation criteria are extracted, triggering the **OIC Query Engine Low-Code Parent Integration Flow** (CV Summary Generation and Evaluation Criteria extraction with Generative AI Inference REST API).
90+
91+
<img src="./images/17_Step5OIC_Summarization.png"></img>
92+
<img src="./images/18_Step5OIC_SummarizationProperties.png"></img>
93+
<img src="./images/19_Step5OIC_SummarizationJsonDetails1.png"></img>
94+
<img src="./images/20_Step5OIC_SummarizationJsonDetails2.png"></img>
95+
<img src="./images/21_Step5OIC_SummarizationJsonDetails3.png"></img>
96+
<img src="./images/22_Step5OIC_GenAIPrompt.png"></img>
97+
98+
**Step6.** Decision logic together with Evaluator Criteria and Extracted Criteria from the Candidate CV are sent to Generative AI Inference REST API, in order to obtain one of the response “Good Fit”/ “No Fit”
99+
100+
<img src="./images/23_Step6OIC_Evaluation.png"></img>
101+
<img src="./images/24_Step6OIC_GenAIPrompt.png"></img>
102+
103+
**Step7.** The list of all candidates is shown on the screen together with the response if the canditate is a good fit or not. Also a summary of each CV is available.
104+
105+
<img src="./images/25_Step6OIC_VBCSEvaluationResult.png"></img>
106+
107+
# Prompting with Oracle Generative AI
108+
109+
In the following CV Evaluation APP usecase we are using a Generative AI Multi-Chain Prompting technique in order to get the results. It consists of 2 prompts:
110+
111+
**Important Note:**
112+
**All examples and data presented in this article are purely fictive and for showcasing purposes only. Any resemblance to real persons, or actual companies is purely coincidental. Dummy users and entities have been created for this demo, and no real data or information about individuals or organizations is being disclosed. We prioritize privacy and ethical considerations in the presentation of information, and any similarities to real-world entities are unintentional.**
113+
114+
## Prompt 1: Summarization and Key Criteria extraction
115+
116+
In order to extract the right skills from the CV that matches the Evaluator input, we have created a prompt in a Zero-shot technique, where we explicity mentioning the output we need to gather out of the document:
117+
118+
119+
<img src="./images/22_Step5OIC_GenAIPrompt.png"></img>
120+
121+
Please access the full prompt <a href="./images/CVEvaluationAppPrompts.pdf">here</a>
122+
123+
## Prompt 2: Final candidate skills evaluation
124+
125+
In order to evaluate all the CVs, a single prompt was build using two combined techniques: **Few-shot Prompting** and **Chain-of-Thought Prompting**.
126+
127+
<img src="./images/24_Step6OIC_GenAIPrompt.png"></img>
128+
129+
Please access the full prompt <a href="./images/CVEvaluationAppPrompts.pdf">here</a>
130+
131+
# Code
132+
VBCS app - RecruitmentApp-1.0.zip
133+
OIC CV Summary Generation and Evaluation Criteria extraction Parent Integration Flow - CV_JOB_MATCH_FINDER_01.00.0000.iar
134+
OIC CVs Data Extraction Child Integration Flow - AIDOCUMENTPROCESSING_01.00.0000.iar
135+
Generative AI Prompts: CVEvaluationAppPrompts.pdf
136+
CV Samples - cv_samples folder
137+
138+
Please find the **document_evaluation_app_resources.zip** archive in <a href="./document_evaluation_app_resources.zip">/files/document_evaluation_app_resources.zip</a>
139+
140+
# Conclusion
141+
142+
In conclusion, using Oracle Generative AI, OCI Document Understanding, and Oracle Integration Cloud (OIC) you may built a nice solution that may sort and help in evaluating documents across various industries and departments. It's adaptability and ease of use can become a handy tool for streamlining document management processes, saving time, and helping in enhancing productivity across a wide range of business scenarios.
143+
144+
### Authors
145+
146+
<a href="https://github.com/jcgocol">@jcgocol</a>, <a href="https://github.com/clemnaru">@clemnaru</a>
147+
148+
149+
# License
150+
151+
Copyright (c) 2024 Oracle and/or its affiliates.
152+
153+
Licensed under the Universal Permissive License (UPL), Version 1.0.
154+
155+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
156+
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)