Skip to content

Commit 3757745

Browse files
authored
Merge branch 'main' into hqureshi-10
2 parents 251b845 + c687179 commit 3757745

File tree

273 files changed

+14956
-912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+14956
-912
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.AppleDouble
44
.LSOverride
55
.vscode
6+
.bak
67

78
# Icon must end with two \r
89
Icon

ai-and-app-modernisation/ai-services/generative-ai-service/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Generative AI service
22

3-
Oracle’s AI strategy is to make artificial intelligence (AI) pervasive across its cloud
4-
applications and cloud infrastructure. We serve business users who want to
5-
improve business processes and outcomes through prebuilt AI capabilities, data
6-
scientists and developers who want complete control to build and deploy AI
7-
models of any kind, and independent software vendors (ISVs) who want the
8-
most performant and cost-effective platform to host their AI services.
3+
Oracle’s AI strategy is to make artificial intelligence (AI) pervasive across its cloud applications and cloud infrastructure. We serve business users who want to improve business processes and outcomes through prebuilt AI capabilities, data scientists and developers who want complete control to build and deploy AI models of any kind, and independent software vendors (ISVs) who want the most performant and cost-effective platform to host their AI services.
94

105
Reviewed: 30.01.2024
116

127
# Team Publications
138

9+
- [Enable a Low Code Modular LLM App Engine using Oracle Integration and OCI Generative AI](https://docs.oracle.com/en/solutions/oci-generative-ai-integration/index.html)
10+
- This reference architecture lets you understand the necessary considerations and recommendations to enable an AI-based, modular and event-driven LLM App Engine using a low-code approach with Oracle Integration as the LLM orchestrator, OCI Generative AI and other OCI services
11+
- Build enterprise-grade, modular, scalable, secure & maintainable LLM Apps
1412
- [Oracle Generative AI webinar](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)
1513
- Deep dive into Oracle Generative AI platform
1614
- [Creating a RAG (Retrieval-Augmented Generation) with Oracle Generative AI Service in just 21 lines of code](https://github.com/oracle-devrel/technology-engineering/tree/main/ai-and-app-modernisation/ai-services/generative-ai-service/rag-genai)
@@ -20,9 +18,9 @@ Reviewed: 30.01.2024
2018
- [Build a knowledge search solution by implementing Retrieval Augmented Generation with Generative AI](https://www.youtube.com/watch?v=lJptksR5omo&t=1530s)
2119
- [Gen AI-powered document search (Generative AI with custom UI)](https://youtu.be/vyJAZvYKY34)
2220
- [Enabling a WhatsApp Customer HelpMate using OCI Generative AI, AI-Language & Integration](https://youtu.be/ryo3wVB_69E?si=SxSuTVawoRcbhReU)
23-
- Use OCI Generative AI (in pre-availability) for "Customer Service Quick Replies" Generation for Whatsapp Neutral Messages (customer questions, queries, etc.), sentence-level sentiment analysis from OCI AI Language to uncover overall sentiment and set service ticket severity for negative Whatsapp messages, automatically classify Customer Service tickets through OCI AI Language custom text classification and aspect-based sentiment analysis (ABSA) services
21+
- Use OCI Generative AI (in pre-availability) for "Customer Service Quick Replies" Generation for Whatsapp Neutral Messages (customer questions, queries, etc.), sentence-level sentiment analysis from OCI AI-Language to uncover overall sentiment and set service ticket severity for negative Whatsapp messages, automatically classify Customer Service tickets through OCI AI-Language custom text classification and aspect-based sentiment analysis (ABSA) services
2422
- Learn how Oracle Integration Cloud and Oracle Cloud Infrastructure (OCI) Streaming allow real-time capture of WhatsApp messages.
25-
- All this automation using OCI Generative AI and AI Language Services APIs orchestrated by Oracle Integration Cloud (using a no-code integration approach)
23+
- All this automation using OCI Generative AI and AI-Language Services APIs orchestrated by Oracle Integration Cloud (using a no-code integration approach)
2624
- [Deploy 3rd party generative AI models to OCI](https://docs.oracle.com/en/solutions/deploy-generative-ai-to-oci/index.html#GUID-5567B1F2-4733-4D9C-B4BE-5B5429CA8C02)
2725
- The reference architecture shows generative AI models deployed to an OCI GPU instance for image and text generation.
2826
- [Running 3rd party LLMs on OCI](https://github.com/oracle-devrel/oci-generative-ai)
@@ -34,11 +32,14 @@ Reviewed: 30.01.2024
3432

3533
# Useful Links
3634

35+
- [Navigating the frontier: Key considerations for developing a generative AI integration strategy for the enterprise](https://blogs.oracle.com/ai-and-datascience/post/considerations-generative-ai-integration-strategy)
3736
- [The Future of Generative AI: What Enterprises Need to Know](https://blogs.oracle.com/ai-and-datascience/post/future-generative-ai-what-enterprises-need-to-know)
3837
- [Announcing the general availability of OCI Generative AI](https://blogs.oracle.com/ai-and-datascience/post/ga-oci-generative-ai)
3938
- [Oracle Embeds Generative AI Across the Technology Stack to Enable Enterprise AI Adoption at Scale](https://www.oracle.com/news/announcement/oracle-announces-availability-oci-generative-ai-service-2024-01-23/)
4039
- [Implement Oracle Cloud Infrastructure Generative AI based on Cohere Large Language Model - Blog & Architecture](https://docs.oracle.com/en/solutions/oci-generative-ai-llm/index.html#GUID-76987F35-F646-40CF-9CF2-42724BA57191)
4140
- [Generative AI Chatbot using LLaMA-2, Qdrant, RAG, LangChain & Streamlit](https://blogs.oracle.com/ai-and-datascience/post/ai-chatbot-llama2-qdrant-rag-langchain-streamlit)
41+
- [Developing AI applications with OCI Generative AI and LangChain](https://blogs.oracle.com/ai-and-datascience/post/developing-ai-apps-oci-generative-ai-langchain)
42+
- [Guide to prompt engineering: Translating natural language to SQL with Llama 2](https://blogs.oracle.com/ai-and-datascience/post/prompt-engineering-natural-language-sql-llama2)
4243
- [Oracle and Generative AI](https://docs.oracle.com/en-us/iaas/Content/Resources/Assets/whitepapers/oracle-and-generative-ai.pdf)
4344
- [Oracle’s generative AI strategy - blog by Greg Pavlik](https://blogs.oracle.com/ai-and-datascience/post/generative-ai-strategy)
4445
- [Oracle to Deliver Powerful and Secure Generative AI Services for Business](https://www.oracle.com/news/announcement/oracle-to-deliver-powerful-and-secure-generative-ai-service-for-business-2023-06-13/)
@@ -49,8 +50,6 @@ Reviewed: 30.01.2024
4950
- [Generative AI on Oracle.com](https://www.oracle.com/artificial-intelligence/generative-ai/)
5051
- [Generative AI product documentation](https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm)
5152

52-
53-
5453
# License
5554

5655
Copyright (c) 2024 Oracle and/or its affiliates.
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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Document Evaluation Tool using Oracle Generative AI, OCI Document Understanding, and Oracle Integration Cloud
2+
3+
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).
4+
This application combines a low-code approach to orchestrate LLM AI services and applications using Oracle Integration Cloud
5+
and Generative AI prompting techniques for tasks like document key criteria extraction, summarization, and evaluation.
6+
7+
Reviewed: 14.03.2024
8+
9+
# When to use this asset?
10+
11+
See the README document in the /files folder.
12+
13+
# How to use this asset?
14+
15+
See the README document in the /files folder.
16+
17+
# License
18+
19+
Copyright (c) 2024 Oracle and/or its affiliates.
20+
21+
Licensed under the Universal Permissive License (UPL), Version 1.0.
22+
23+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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+
7+
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).
8+
This tool can be super useful in different situations:
9+
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 a few examples. It can be applied to any industry and is adaptable to any department like HR, Procurement, Marketing, Customer Service, and others.
10+
11+
Here are 2 use cases for how you may use the document evaluation sample application:
12+
13+
A CV Evaluation App as part of a recruitment process:
14+
15+
<img src="./images/1_CVEvaluation.png"></img>
16+
<img src="./images/2_CVEvaluationResults.png"></img>
17+
18+
19+
A Supplier Proposal Evaluation App as part of a vendor bid.
20+
21+
<img src="./images/3_RFPEvaluation.png"></img>
22+
<img src="./images/4_RFPEvaluationResults.png"></img>
23+
24+
In this article we will use as a case study: **"CV Evaluation APP"**
25+
26+
# Prerequisites
27+
28+
Before getting started, make sure you have access to the following Oracle Cloud Infrastructure (OCI) services:
29+
30+
- Oracle Generative AI Service (GenAI)
31+
- Oracle Document Understanding Service
32+
- Oracle Integration Cloud (OIC) with Visual Builder(VBCS) enabled
33+
- Oracle Object Storage
34+
35+
36+
# Solution Architecture
37+
38+
In this section, we'll dive into the building blocks of the solution architecture.
39+
<img src="./images/5_SolutionArchitecture-oci-lowcode-ai-rag-logical-blocks.png"></img>
40+
41+
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 helping to facilitate the decision-making process:
42+
43+
1. Document Evaluation Tool App interface built using VBCS:
44+
45+
- 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.
46+
47+
2. Document Processing with OCI Document Understanding.:
48+
- 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.
49+
- The service employs machine learning and optical character recognition capabilities(OCR) to analyze and extract information from various types of documents.
50+
51+
3. Key Criteria Extraction using OCI Generative AI Service:
52+
- 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, which we will later explore in the section “Prompting with Oracle Generative AI”.
53+
54+
4. Integration and orchestration using OIC:
55+
- Oracle Integration Cloud adopts a low-code approach, allowing the creation of 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, and change and optimize LLM integration flows like the one we are exploring here.
56+
57+
5. Document Evaluation using Generative AI:
58+
- 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.
59+
60+
61+
62+
# Application Flow in Detail
63+
64+
In this application:
65+
66+
**Step1.** The File Picker action in VBCS allows the Recruiter to upload all the CVs.
67+
68+
<img src="./images/6_Step1VBCS_FilePicker.png"></img>
69+
70+
<img src="./images/7_Step1VBCS_FilePicker2.png"></img>
71+
72+
**Step2.** Evaluator select hard and soft criteria(input fields) from a predifined list.
73+
74+
<img src="./images/8_Step2VBCS_CriteriaSelection.png"></img>
75+
76+
**Step3.** Evaluator press the button “Evaluate”
77+
78+
<img src="./images/9_Step3VBCS_Evaluation1.png"></img>
79+
<img src="./images/10_Step3VBCS_Evaluation2.png"></img>
80+
81+
**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)
82+
83+
<img src="./images/11_Step4OIC_DataLoader.png"></img>
84+
<img src="./images/12_Step4OIC_DataLoaderConfig.png"></img>
85+
<img src="./images/13_Step4OIC_DataLoaderRestInvoke.png"></img>
86+
<img src="./images/14_Step4OIC_DataLoaderSampleJson.png"></img>
87+
<img src="./images/15_Step4OIC_DataLoaderSapleJson2.png"></img>
88+
<img src="./images/16_Step4OIC_DocUnderstanding.png"></img>
89+
90+
91+
**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).
92+
93+
<img src="./images/17_Step5OIC_Summarization.png"></img>
94+
<img src="./images/18_Step5OIC_SummarizationProperties.png"></img>
95+
<img src="./images/19_Step5OIC_SummarizationJsonDetails1.png"></img>
96+
<img src="./images/20_Step5OIC_SummarizationJsonDetails2.png"></img>
97+
<img src="./images/21_Step5OIC_SummarizationJsonDetails3.png"></img>
98+
<img src="./images/22_Step5OIC_GenAIPrompt.png"></img>
99+
100+
**Step6.** Decision logic together with Evaluator Criteria and Extracted Criteria from the Candidate CV are sent to Generative AI Inference REST API, to obtain one of the responses “Good Fit”/ “No Fit”
101+
102+
<img src="./images/23_Step6OIC_Evaluation.png"></img>
103+
<img src="./images/24_Step6OIC_GenAIPrompt.png"></img>
104+
105+
**Step7.** The list of all candidates is shown on the screen together with the response if the candidate is a good fit or not. Also, a summary of each CV is available.
106+
107+
<img src="./images/25_Step6OIC_VBCSEvaluationResult.png"></img>
108+
109+
# Prompting with Oracle Generative AI
110+
111+
In the following CV Evaluation APP use case we are using a Generative AI Multi-Chain Prompting technique to get the results. It consists of 2 prompts:
112+
113+
**Important Note:**
114+
**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.**
115+
116+
## Prompt 1: Summarization and Key Criteria Extraction
117+
118+
To extract the right skills from the CV that match the Evaluator input, we have created a prompt in a Zero-shot technique, where we explicitly mention the output we need to gather out of the document:
119+
120+
121+
<img src="./images/22_Step5OIC_GenAIPrompt.png"></img>
122+
123+
Please access the full prompt <a href="./images/CVEvaluationAppPrompts.pdf">here</a>
124+
125+
## Prompt 2: Final candidate skills evaluation
126+
127+
To evaluate all the CVs, a single prompt was built using two combined techniques: **Few-shot Prompting** and **Chain-of-Thought Prompting**.
128+
129+
<img src="./images/24_Step6OIC_GenAIPrompt.png"></img>
130+
131+
Please access the full prompt <a href="./images/CVEvaluationAppPrompts.pdf">here</a>
132+
133+
# Code
134+
VBCS app - RecruitmentApp-1.0.zip
135+
OIC CV Summary Generation and Evaluation Criteria extraction Parent Integration Flow - CV_JOB_MATCH_FINDER_01.00.0000.iar
136+
OIC CVs Data Extraction Child Integration Flow - AIDOCUMENTPROCESSING_01.00.0000.iar
137+
Generative AI Prompts: CVEvaluationAppPrompts.pdf
138+
CV Samples - cv_samples folder
139+
140+
Please find the **document_evaluation_app_resources.zip** archive in <a href="./document_evaluation_app_resources.zip">/files/document_evaluation_app_resources.zip</a>
141+
142+
# Conclusion
143+
144+
In conclusion, using Oracle Generative AI, OCI Document Understanding, and Oracle Integration Cloud (OIC) you may build a nice solution that may sort and help in evaluating documents across various industries and departments. Its adaptability and ease of use can become a handy tool for streamlining document management processes, saving time, and helping enhance productivity across a wide range of business scenarios.
145+
146+
### Authors
147+
148+
<a href="https://github.com/jcgocol">@jcgocol</a>, <a href="https://github.com/clemnaru">@clemnaru</a>
149+
150+
151+
# License
152+
153+
Copyright (c) 2024 Oracle and/or its affiliates.
154+
155+
Licensed under the Universal Permissive License (UPL), Version 1.0.
156+
157+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
158+
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)