|
| 1 | +# Low Code Modular RAG-based Knowledge Search Engine using OCI Generative AI, OCI Vector Search, and Oracle Integration Cloud |
| 2 | + |
| 3 | +Reviewed: 30.05.2024 |
| 4 | + |
| 5 | +# Introduction |
| 6 | + |
| 7 | +In this article, we'll explore how to enable an enterprise-grade RAG-based Knowledge Search Engine with a low-code approach. |
| 8 | + |
| 9 | +You’ll learn how to use Oracle Integration Cloud to integrate and orchestrate business chanels like a Web Application built in Oracle Visual Builder, productivity channels like OCI Object Storage, local large and small language models (LLMs), and vector databases to ingest live data into the RAG-based Knowledge Search Engine store. |
| 10 | + |
| 11 | +You'll use Oracle Cloud Infrastructure (OCI) Document Understanding to extract information from different document types. Leverage OCI Generative AI for document summarization, generation and synthesis of answers to questions on documents. Use OCI DB Cloud Service 23AI for Document Extraction, Vector Search and Embedding (using ONNX local models to the DB) capabilities , and apply local OCI Data Science models for better answers from advanced RAG. |
| 12 | + |
| 13 | +# Prerequisites |
| 14 | + |
| 15 | +Before getting started, make sure you have access to the following Oracle Cloud Infrastructure (OCI) services: |
| 16 | + |
| 17 | +- OCI Generative AI Service (GenAI) |
| 18 | +- OCI Document Understanding Service |
| 19 | +- Oracle Integration Cloud (OIC) with Visual Builder(VBCS) enabled |
| 20 | +- OCI Object Storage |
| 21 | +- OCI Base Database Cloud Service (23ai) |
| 22 | +- OCI Data Science |
| 23 | + |
| 24 | +And also, make sure you have access to the following Meta services: |
| 25 | + |
| 26 | +- Whats App Business Account |
| 27 | + |
| 28 | +# Solution Architecture |
| 29 | + |
| 30 | +In this section, we'll dive into the building blocks of the solution architecture. |
| 31 | +<img src="./images/5_low-code-modular-rag-knowledge-search-engine-arch.png"></img> |
| 32 | + |
| 33 | +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 extraction, OCI Base Database Cloud Service 23ai for document extraction, local embeddings using onnx models within Oracle 23ai, Generative AI for answer synthesis and OCI Data Science as the Reranker model for advance RAG: |
| 34 | + |
| 35 | +1. Document Evaluation Tool App interface built using VBCS: |
| 36 | + |
| 37 | +- A low-code or no-code approach for the Data Loader and Query Engine flows of your LLM Application with Oracle Integration visual orchestration tools and native adapters for different Social, Productivity and Business Data Channels (users input to the LLM App Engine, either documents, images, business data or queries) and Sources (source of the data used by the LLM App Engine), as well as native adapters to the different OCI Services used by the LLM App Engine (OCI Generative AI REST APIs, Vector Databases or Stores, Oracle Cloud Infrastructure Language REST APIs, Oracle Cloud Infrastructure Data Science Custom Model REST Endpoints and more). This helps to quickly set up your LLM Application Business Flows |
| 38 | + |
| 39 | +2. An event-driven pattern to decouple the Document, Image and Business Data Channels and Sources as well as the Query Channels from the Data Loader and Query Engine modules of the LLM App Engine using the OCI Streaming Service (Oracle managed Kafka Service) and the native adapter we have for this OCI Service in Oracle Integration. This helps to enable a scalable and performant LLM application. |
| 40 | + |
| 41 | +3. A private connection to 3rd party cloud, on-premises apps, systems, and so on, using the Oracle Integration Connectivity Agent, which is the key enabler for hybrid and multicloud integration architectures, specially in an LLM Application where documents, images, business data, query from users can come from those systems and you want to keep the transit for documents and data private and secured. This helps to improve the security of the end-to-end LLM Flow, keeping the traffic within private networks. |
| 42 | + |
| 43 | +4. The possibility to use local LLM models within Oracle 23ai in OCI Base Database Cloud service and dedicate cluster for OCI Generative AI service (orchestrating OCI Base Database Cloud service 23ai ONNX models, OCI Generative AI Model Endpoints or OCI Data Science Model Endpoints using Oracle Integration cloud native adapters and with the connectivity agent for private models). |
| 44 | + |
| 45 | +5. A flexible approach to plug or unplug your own User Interface (UI) for your LLM Application with the LLM APP Engine (in this case whatsapp for uploading documents), or a low-code approach to build the UI either using Visual App Builder under Oracle Integration (using Visual Builder Web App for the Q&A UI) |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +# Application Flow in Detail |
| 50 | + |
| 51 | +In this application: |
| 52 | + |
| 53 | +**Step1.** |
| 54 | + |
| 55 | +# Code |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +# Conclusion |
| 60 | + |
| 61 | + |
| 62 | +### Authors |
| 63 | + |
| 64 | +<a href="https://github.com/jcgocol">@jcgocol</a>, <a href="https://github.com/bobpeulen">@bobpeulen</a> |
| 65 | + |
| 66 | + |
| 67 | +# License |
| 68 | + |
| 69 | +Copyright (c) 2024 Oracle and/or its affiliates. |
| 70 | + |
| 71 | +Licensed under the Universal Permissive License (UPL), Version 1.0. |
| 72 | + |
| 73 | +See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details. |
| 74 | + |
0 commit comments