Skip to content

Commit

Permalink
WMS id is: 11619, RAG lab for AI Vector Search, change distance searc…
Browse files Browse the repository at this point in the history
…h method (#123)

* 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.
  • Loading branch information
mw-orcl authored May 6, 2024
1 parent 9767649 commit 0d2e951
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions langchain-rag-23ai/lab1/rag1.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ We print the first chunk for your feedback. You can also change the chunk size
```
**RAG Step 4 - Set up Oracle AI Vector Search and insert the embedding vectors**

The embedding model used in this lab is **all-MiniLM-L6-v2** from HuggingFace. **Docs** will point to the text chunks. The connection string to the database is in the object **conn23c**. The table to store the vectors and metadata are in **MY_DEMOOCI**. We use **MAX_INNER_PRODUCT** as the algorithm for the nearest neighbor search.
The embedding model used in this lab is **all-MiniLM-L6-v2** from HuggingFace. **Docs** will point to the text chunks. The connection string to the database is in the object **conn23c**. The table to store the vectors and metadata are in **MY_DEMO4**. We use **DOT_PRODUCT** as the algorithm for the nearest neighbor search.
Note: Embedding models are used to vectorize data. To learn more about embedding models, see the LiveLabs on Oracle AI Vector Search.

8. Click **Run** to execute the code.
Expand All @@ -209,9 +209,9 @@ Note: Embedding models are used to vectorize data. To learn more about embedding
model_4db = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")

# Configure the vector store with the model, table name, and using the indicated distance strategy for the similarity search and vectorize the chunks
#knowledge_base = OracleVS.from_documents(docs, model_4db, client=conn23c, table_name="MY_DEMO4", distance_strategy="DistanceStrategy.DOT_PRODUCT")
s1time = time.time()
knowledge_base = OracleVS.from_documents(docs, model_4db, client=conn23c, table_name="MY_DEMOOCI", distance_strategy="DistanceStrategy.MAX_INNER_PRODUCT")
s1time = time.time()
knowledge_base = OracleVS.from_documents(docs, model_4db, client=conn23c, table_name="MY_DEMO4", distance_strategy="DistanceStrategy.DOT_PRODUCT")
#knowledge_base = OracleVS.from_documents(docs, model_4db, client=conn23c, table_name="MY_DEMOOCI", distance_strategy="DistanceStrategy.MAX_INNER_PRODUCT")
s2time = time.time()
print( f"Vectorizing and inserting chunks duration: {round(s2time - s1time, 1)} sec.")

Expand Down

0 comments on commit 0d2e951

Please sign in to comment.