Skip to content

Commit

Permalink
Merge branch 'main' into synuora-data-development-devops-db-supp-feat…
Browse files Browse the repository at this point in the history
…ures
  • Loading branch information
SyNuOra authored Jan 19, 2024
2 parents 079d3b2 + 6b41714 commit b8d447b
Show file tree
Hide file tree
Showing 48 changed files with 1,229 additions and 60 deletions.
8 changes: 8 additions & 0 deletions ai-and-app-modernisation/ai-services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ Oracle Cloud Infrastructure (OCI) AI Services is a collection of services with p
# Table of Contents

- [Useful Links](#useful-links)
- [Reusable Assets](#reusable-assets)

# Useful Links

- [Oracle AI Services Oracle.com Page](https://www.oracle.com/artificial-intelligence/ai-services/)
- [Oracle’s Generative AI strategy](https://blogs.oracle.com/ai-and-datascience/post/generative-ai-strategy)
- [OCI AI Foundations Certification](https://mylearn.oracle.com/ou/component/-/127179/198553)
- [AI use cases - 10 examples](https://www.oracle.com/a/ocom/docs/gated/ai-use-cases-ebook.pdf)
- [Availability of AI Services across OCI datacenters](https://www.oracle.com/uk/cloud/public-cloud-regions/service-availability/#commercial)

# Reusable Assets
- [Smarter Applications with AI Services](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)
- [Oracle AI Strategy and Platform webinar](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)

# License

Expand Down
1 change: 1 addition & 0 deletions ai-and-app-modernisation/ai-services/ai-speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ OCI Speech is an AI service that applies automatic speech recognition technology

- [Oracle AI Speech on oracle.com](https://www.oracle.com/uk/artificial-intelligence/speech/)
- [Oracle AI Speech documentation](https://docs.oracle.com/en-us/iaas/Content/speech/home.htm)
- [Oracle Speech AI service now supports diarization](https://blogs.oracle.com/ai-and-datascience/post/oracle-speech-ai-service-now-supports-diarization)


# License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ most performant and cost-effective platform to host their AI services.

# Team Publications

- [Oracle Generative AI webinar](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)
- [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)
- [Summarize any document using Oracle Generative AI](https://www.youtube.com/watch?v=6A3KGyKy91Q)
- [Dubai Citizen's Dream: An Oracle GenAI-Powered Oracle BOT to Answer All Your Questions (RAG on websites)](https://www.youtube.com/watch?v=5Y_k1r34Mp0)
- [Document Chatbot with Oracle Generative AI](https://www.youtube.com/watch?v=vyJAZvYKY34)
Expand All @@ -29,21 +31,20 @@ most performant and cost-effective platform to host their AI services.
- [Enabling a WhatsApp Customer HelpMate using OCI Generative AI, AI-Language & Integration](https://youtu.be/ryo3wVB_69E?si=SxSuTVawoRcbhReU)
- 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
- Learn how Oracle Integration Cloud and Oracle Cloud Infrastructure (OCI) Streaming allow real-time capture of WhatsApp messages.
- All this automation using OCI Generative AI and AI Language Services APIs orchestrated by Oracle Integration Cloud (using no-code integration approach)
- All this automation using OCI Generative AI and AI Language Services APIs orchestrated by Oracle Integration Cloud (using a no-code integration approach)
- [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)
- The reference architecture shows generative AI models deployed to an OCI GPU instance for image and text generation.
- [Running 3rd party LLMs on OCI](https://github.com/oracle-devrel/oci-generative-ai)
- Terraform script to start a stable-diffusion, bloom, and dreambooth in compute instance using an Nvidia GPU in OCI.
- [Generative AI in OCI](https://medium.com/oracledevs/generative-ai-in-oci-c0467e1a68f7)
- Blog post explaining how to use generative AI models in OCI.
- [Introduction to Oracle AI Platform](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)
- Webinar series, where you will learn about Artificial Intelligence, Oracle AI infrastructure and solutions.
- [Oracle Generative AI Webinar](https://go.oracle.com/LP=138234?elqCampaignId=489428&src1=:so:ch:or:dg::::&SC=:so:ch:or:dg::::&pcode=WWMK230822P00010)
- Deep dive into Oracle Generative AI platform.


# Useful Links

- [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)
- [Oracle and Generative AI](https://docs.oracle.com/en-us/iaas/Content/Resources/Assets/whitepapers/oracle-and-generative-ai.pdf)
- [Oracle’s generative AI strategy - blog by Greg Pavlik](https://blogs.oracle.com/ai-and-datascience/post/generative-ai-strategy)
- [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/)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Generative AI Approach Workshop

## Overview

This Approach workshop is targeted to LOB and Digital Officers to discover and design powerful use cases for Oracle Generative AI.

## Common Challenges

Many clients are currently seeking to identify use cases for Generative AI. This workshop aims to guide participants in understanding the main advantages of Generative AI and the common solution architectures observed in the enterprise sector. More importantly, it will help pinpoint those use cases within your own organization. Furthermore, we'll look more closely at a specific use case, incorporating elements of design thinking. We will then view it from a solution architecture standpoint to identify its essential components.

## Benefits

- Deeper understanding of the value of Generative AI; use cases exploration.
- Persona and Design thinking based to uncover real value.
- High level understanding of target architecture; what are the data sources, how to deal with guardrails and agents.

## More Details

- How to request this workshop: Please reach out to your Oracle Account Team
- Delivered by: Cloud Solution Specialists - AI
Services
- How it is delivered: Zoom & Whiteboarding Tools
- Customer audience: LoB Representatives, Digital
Officers
- Workshop Duration: 2-4 Hours

## AGENDA

1. Introduction & Goals
2. Ideate:
- Persona’s – understand the users & their needs
- Data sources
- UI/channels
3. Solution Design:
- Prompting / Guardrails
- Integrations/Agents
4. Next Steps

# License

Copyright (c) 2023 Oracle and/or its affiliates.

Licensed under the Universal Permissive License (UPL), Version 1.0.

See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Copyright (c) 2024 Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both

(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),

without restriction, including without limitation the rights to copy, create
derivative works of, display, perform, and distribute the Software and make,
use, sell, offer for sale, import, export, have made, and have sold the
Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.

This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

# Creating a RAG (Retrieval-Augmented Generation) with Oracle Generative AI Service in just 21 lines of code

## Introduction
In this article, we'll explore how to create a Retrieval-Augmented Generation (RAG) model using Oracle Gen AI, llama index, Qdrant Vector Database, and SentenceTransformerEmbeddings. This 21-line code will allow you to scrape through web pages, use llama index for indexing, Oracle Generative AI Service for question generation, and Qdrant for vector indexing.

<img src="./RagArchitecture.svg">
</img>

## Limited Availability

Oracle Generative AI Service is in Limited Availability as of today when we are creating this repo.

Customers can easily enter in the LA programs. To test these functionalities you need to enrol in the LA programs and install the proper versions of software libraries.

Code and functionalities can change, as a result of changes and new features

## Prerequisites
Before getting started, make sure you have the following installed:

- Oracle Generative AI Service
- llama index
- qdrant client
- SentenceTransformerEmbeddings

## Setting up the Environment
1. Install the required packages:
```bash
pip install oci==2.112.1+preview.1.1649 llama-index qdrant-client sentence-transformers
```

## Loading data

You need to create a sitemap.xml file where you can specify or list the webpages which you want to include in your RAG.
Here we have used SentenceTransformerEmbeddings to create the embeddings but you can easily use any embeddings model . In the next blog we will show how easily you can use Oracle Generative AI Service embeddings model.

In this example we have used some Oracle documentation pages and created a xml file for the same and have placed it in Oracle object storage.

sitemap used : https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/frpj5kvxryk1/b/thisIsThePlace/o/combined.xml

## Entire code

```bash
from genai_langchain_integration.langchain_oci import OCIGenAI
from llama_index import VectorStoreIndex
from llama_index import ServiceContext
from llama_index.vector_stores.qdrant import QdrantVectorStore
from llama_index.storage.storage_context import StorageContext
from qdrant_client import qdrant_client
from langchain.embeddings import SentenceTransformerEmbeddings
from llama_hub.web.sitemap import SitemapReader
loader = SitemapReader()
documents = loader.load_data(sitemap_url='https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/frpj5kvxryk1/b/thisIsThePlace/o/combined.xml')
client = qdrant_client.QdrantClient(location=":memory:")
embeddings = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
llm = OCIGenAI(model_id="cohere.command",service_endpoint="https://generativeai.aiservice.us-chicago-1.oci.oraclecloud.com",compartment_id = "ocid1.tenancy.oc1..aaaaaaaa5hwtrus75rauufcfvtnjnz3mc4xm2bzibbigva2bw4ne7ezkvzha",temperature=0.0)
system_prompt="As a support engineer, your role is to leverage the information in the context provided. Your task is to respond to queries based strictly on the information available in the provided context. Do not create new information under any circumstances. Refrain from repeating yourself. Extract your response solely from the context mentioned above. If the context does not contain relevant information for the question, respond with 'How can I assist you with questions related to the document?"
service_context = ServiceContext.from_defaults(llm=llm, chunk_size=1000, chunk_overlap=100, embed_model=embeddings,system_prompt=system_prompt)
vector_store = QdrantVectorStore(client=client, collection_name="ansh")
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(documents, storage_context=storage_context, service_context=service_context)
query_engine = index.as_query_engine()
response = query_engine.query("can i use OCI document understanding for files in french ?")
print(response)
```



## Conclusion

In this article, we've covered the process of creating a RAG model using Oracle Generative AI Service, llama index, Qdrant, and SentenceTransformerEmbeddings. Feel free to experiment with different web pages and datasets to enhance the capabilities of your model.

In a future blog post, we'll explore how to integrate Oracle Vector Database and Oracle Gen AI embeddings model into this RAG setup.

Feel free to modify and expand upon this template according to your specific use case and preferences. Good luck with your article!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions ai-and-app-modernisation/content-management/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Content Management

Oracle Content Management (OCM) is Oracle’s strategic Cloud Native Content Hub which is a Managed PaaS Service running on next-generation Oracle Cloud Infrastructure. It covers Digital Asset Management and Video Production(Sauce), Document Collaboration, Capture and Enterprise Content Management, Digital Experience Platform (Low Code and Headless Development) as well as packaged applications within OCM like Video Hub, Email Builder, Sales Accelerator, and more to be added. All under one OCI service with its associated SKU(s).
Oracle's content management offering is Oracle WebCenter which is the center of engagement for business powering exceptional experiences for customers, partners, and employees. Namely, it consists of Oracle WebCenter Content (covering Document Management/Enterprise Content Management, Records Management, Imaging, Capture and Forms Recognition), WebCenter Sites (Digital Experience/Web Content Management platform) & Oracle WebCenter Portal platform for creating intranets, extranets, composite applications, and self-service portals.

Oracle's on-premise content management offering is Oracle WebCenter which is the center of engagement for business powering exceptional experiences for customers, partners, and employees. Namely, it consists of Oracle WebCenter Content (covering Document Management/Enterprise Content Management, Records Management, Imaging, Capture and Forms Recognition), WebCenter Sites (Digital Experience/Web Content Management platform) & Oracle WebCenter Portal platform for creating intranets, extranets, composite applications, and self-service portals.
Oracle WebCenter can be hosted either on-premises or on Oracle Cloud Infrastructure.

Oracle Content Management (OCM) was Oracle’s strategic Cloud Native Content Hub; it acted as a Managed PaaS Service running on next-generation Oracle Cloud Infrastructure. The service is still available for existing customers. It covers Digital Asset Management and Video Production(Sauce), Document Collaboration, Capture and Enterprise Content Management, Digital Experience Platform (Low Code and Headless Development) as well as packaged applications within OCM like Video Hub, Email Builder, Sales Accelerator.

# License

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Content Management Cloud

Oracle Content Management (OCM) is a cloud-based content hub to drive omni-channel content management and accelerate experience delivery. It offers powerful collaboration, workflow management, and development capabilities to streamline the creation and delivery of content and improve customer and employee engagement.
Oracle Content Management (OCM) is a cloud-based content hub to drive omnichannel content management and accelerate experience delivery. It offers powerful collaboration, workflow management, and development capabilities to streamline the creation and delivery of content and improve customer and employee engagement.

It covers Digital Asset Management & Video Production(Sauce), Document Collaboration, Capture & Enterprise Content Management, Digital Experience Platform (Low Code & Headless Development) as well packaged applications within OCM like Video Hub, Email Builder, Sales Accelerator and more to come.
It covers Digital Asset Management and video Production(Sauce), Document Collaboration, Capture and Enterprise Content Management, Digital Experience Platform (Low Code and Headless Development) as well as packaged applications within OCM like Video Hub, Email Builder, Sales Accelerator.

# Useful Links

Expand Down
22 changes: 22 additions & 0 deletions app-dev/devops/ansible-jenkins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ansible-jenkins

## Getting started

This Terraform code provisions a new OCI instance and installs Jenkins directly through an Ansible playbook.
To optimize and be more cost-efficient, the instance shape is locked to VM.Standard.A1.Flex, but this code
can eventually be modified or forked.

## Features and limitations
* Get quickly started with the latest Jenkins version on OCI
* Manage plugins and the installation through Ansible and Jenkins Configuration as Code
* Tested on Oracle Linux 8
* Instance generated only if it is in a public subnet network
* Port 22 must be opened on the instance, as OCI Resource Manager will need to connect to the instance through SSH
* Jenkins port can't be between 0 and 1024, as those are Linux reserved ports and would require further configurations to be exposed
* To access Jenkins, the instance and Jenkins port must be reachable
* As the instance will be updated, it will take a while during the first run

Although these limitations might not fit every use case, the code can be used as a reference and there are ways to lift them.

[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/raw/main/app-dev/devops/ansible-jenkins/ansible-jenkins-rm.zip)

Binary file not shown.
Loading

0 comments on commit b8d447b

Please sign in to comment.