Skip to content

Commit

Permalink
WMS id is: 11619, RAG lab for AI Vector Search (#127)
Browse files Browse the repository at this point in the history
* New repo for RAG and Oracle AI Vector Search

Files for RAG and Oracle AI Vector Search LiveLabs

* Only available in green button

Removing folder for running on your own tenancy.  Only green button for the lab. for now.

* Added links to Oracle 23ai documentation

* Added step to copy ocid to jupyter clipboard

ocid copied to clipboard

* Small edit to prep-env

save to saved

* Updated AI Vector Search RAG LiveLab

Updated with easier to use instructions.  No longer need to copy compartment OCID.

* Small changes to improve instructions

Update image to streamlit with AI Vector Search name

Update instruction to open terminal

* Update rag1.md to change search algo

Change distance search from max inner to do product.

* Update AI Vector Search RAG lab

Updated with review from David and Michelle.  Improve lab step description

* Minor sentence update

Match lab guide with VM steps

* Update notebook name

Update notebook name with \_, still printing red instead of _

* Few more _ to make visible

\_ arg!

* Few more updates

Change is a constant.

Adjustments to title and texts.

* Chang md file names

Change file names to match folder names
  • Loading branch information
mw-orcl authored May 13, 2024
1 parent 4faf1da commit 9c0ca46
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
12 changes: 7 additions & 5 deletions langchain-rag-23ai/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ And that’s where RAG comes in. RAG allows important context to be included wi

In this workshop, you will build a simple, yet powerful RAG application using Oracle AI Vector Search and the LangChain framework that can be used as a blueprint for many use cases. A vector store will be needed to store the relevant context and Oracle Database 23ai is ideal for this.

Estimated Time: 0 hours 15 min
Estimated Time: 15 min

### **About Oracle AI Vector Search**

Expand All @@ -34,12 +34,14 @@ The labs in this workshop focus on the following:

See below for more information on Oracle Database 23ai and Oracle AI Vector Search

* [About Oracle Database 23ai](https://docs.oracle.com/en/database/oracle/oracle-database/)
* [Oracle AI Vector Search](https://blogs.oracle.com/database/post/oracle-announces-general-availability-of-ai-vector-search-in-oracle-database-23ai)
* [Oracle Database 23ai Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/)
* [Oracle AI Vector Search User's Guide](https://docs.oracle.com/en/database/oracle/oracle-database/23/vecse/index.html)
* [Oracle AI Vector Search Blog](https://blogs.oracle.com/database/post/oracle-announces-general-availability-of-ai-vector-search-in-oracle-database-23ai)


You may now [proceed to the next lab](#next).

## Acknowledgements
* **Authors** - Milton Wan, Vijay Balebail, Douglas Hood
* **Last Updated By/Date** - Milton Wan, April 2024
* **Authors** - Vijay Balebail, Milton Wan
* **Contributors** - Douglas Hood, Rajeev Rumale
* **Last Updated By/Date** - Milton Wan, May 2024
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,15 @@ Click **Run** to execute the congrats code.
print("Congratulations! You've completed your RAG application with AI Vector Search in Oracle Database 23ai using LangChain")
```

### Conclusion

By using AI Vector Search in Oracle Database 23ai, you can build RAG applications with important context without having to retrain the LLM. The context is stored, searched and retrieved from Oracle Database 23ai and passed to the LLM to generate accurate, up to date, and targeted responses to your prompts. Businesses and enterprises can use RAG with AI Vector Search in Oracle Database 23ai and an LLM to securely respond to important business questions or to generate content for many use cases using private, internal business information.


You may now [proceed to the next lab](#next).


## Acknowledgements
* **Authors** - Vijay Balebail, Milton Wan, Douglas Hood, Rajeev Rumale
* **Last Updated By/Date** - Milton Wan, April 2024
* **Authors** - Vijay Balebail, Milton Wan
* **Contributors** - Douglas Hood, Rajeev Rumale
* **Last Updated By/Date** - Milton Wan, May 2024
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Lab 2: Run the same RAG Application interactively with the Streamlit User Interface
# Lab 2: Run the same RAG Application interactively

## Introduction

Estimated Time: 5 min

### Objectives

In this lab you will run the RAG application interactively using the Streamlit user interface. You can select and load from several PDF documents, and ask your own question in the prompt. This is the same application with the 7 essential RAG steps as the previous lab but demonstrates use through a user interface.
In this lab you will run the RAG application interactively using a simple user interface. You can select and load from several PDF documents, and ask your own question in the prompt. This is the same application with the 7 essential RAG steps as the previous lab but demonstrates use through a user interface.

### Prerequisites

* VM environment running Oracle Database 23ai


## Task 1: Run Streamlit
## Task 1: Run application

1. From the terminal, go to directory

```
$ cd /home/oracle/AIdemo
```
2. Run the RAG application using Streamlit
2. Run the RAG application
```
$ streamlit run genai.py
```
Expand Down Expand Up @@ -56,11 +56,9 @@ For the Oracle Fiscal Year 2024 Quarter 2 Financial Results document:
- Summarize the Oracle 2024 Quarter 2 financial results
- What did Larry say in the Oracle Fiscal Year 2024 Quarter 2 financial results
**Code for the application**
**Code for Streamlit application**
Now check out the application code using the Streamlit UI. From a terminal window type:
Now check out the application code using the UI. From a terminal window type:
```
Expand All @@ -73,11 +71,14 @@ But essentially the code is the same 7 steps for building a RAG application with
### Conclusion
In Lab 2 you ran a RAG application with a UI using the same 7 steps for RAG and Oracle AI Vector Search. The blueprint is the same. Now it's your turn. Experiment with different transformers for different data sources. It could be video, audio, text and more. They're all embedded as vectors in Oracle Database 23ai.
By using AI Vector Search in Oracle Database 23ai, you can build RAG applications with important context without having to retrain the LLM. The context is stored, searched and retrieved from Oracle Database 23ai and passed to the LLM to generate accurate, up to date, and targeted responses to your prompts. Businesses and enterprises can use RAG with AI Vector Search in Oracle Database 23ai and an LLM to securely respond to important business questions or to generate content for many use cases using private, internal business information.
**Completed. Thanks for running the lab.**
## Acknowledgements
* **Authors** - Vijay Balebail, Milton Wan, Rajeev Rumale
* **Last Updated By/Date** - Milton Wan, April 2024
* **Authors** - Vijay Balebail, Milton Wan
* **Contributors** - Rajeev Rumale
* **Last Updated By/Date** - Milton Wan, May 2024
10 changes: 5 additions & 5 deletions langchain-rag-23ai/workshops/livelabs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
{
"title": "Lab 1: Build and Run the RAG Application with Oracle AI Vector Search and Langchain",
"description": "Hands-on lab for building and running the RAG Application.",
"filename": "../../lab1/rag1.md"
"filename": "../../lab1/lab1.md"
},
{
"title": "Lab 2: Run the interactive Streamlit UI demonstrating the same RAG application with Oracle AI Vector Search",
"description": "Run the Streamlit RAG Application.",
"filename": "../../lab2/rag2-streamlit.md"
},
"title": "Lab 2: Run the same RAG application interactively with a UI",
"description": "Run the UI RAG Application.",
"filename": "../../lab2/lab2.md"
},
{
"title": "Need Help?",
"description": "Solutions to Common Problems and Directions for Receiving Live Help",
Expand Down

0 comments on commit 9c0ca46

Please sign in to comment.