Skip to content

Commit f9ec347

Browse files
WMS ID #11693: Revising All Lab Content (#616)
* Self-QA Updates Adding workshop changes to further align with the Self-QA checklist. * Update adb-free-container-setup.md * Post-Testing Edits V1 * Update adb-free-container-setup.md * Post-Testing Changes V2 * Updating Screenshots * WMSID# 11693: Adding the initial workshop structure. * Update adb-free-container-setup.md * Update adb-free-container-setup.md * [WMS ID #11029] DB Collective - JSON Duality Search * WMS ID #11029: Minor fix * Update manifest.json * LL ID #4004: Add JSON Duality Intro * LL ID# 4004: Minor Updates * LL ID #4004: Minor updates. * WMS ID #11693: Revising the workshop structure. * WMS ID# 11693
1 parent 77484dc commit f9ec347

File tree

10 files changed

+102
-22
lines changed

10 files changed

+102
-22
lines changed

23aifree/adb-free-container-setup/inst-auth-container-setup.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Install Autonomous Database 23ai Free Docker Image
22

33
## Introduction
4-
In this lab, you will quickly configure the Oracle Autonomous Database Free 23ai Docker Container in your remote desktop environment.
4+
In this lab, you will quickly configure an Oracle Autonomous Database using the Oracle Database 23ai Free Container Image.
55

6-
*Estimated Time:* 10 minutes
6+
*Estimated Time:* 30 minutes
77

88
### Objectives
9-
109
In this lab, you will:
1110

12-
* Pull, run, and start an Oracle Autonomous Database 23ai Docker image with Podman.
13-
* Gain access to Database Actions, APEX, and more via your container.
14-
* Explore Oracle’s AI Vector Search.
11+
* Launch the Docker container image.
12+
* Connect to your Autonomous Database.
13+
* Access SQL Developer Web & APEX.
1514

1615
### Prerequisites
1716
This lab assumes you have:
@@ -101,7 +100,7 @@ In the LiveLabs Sandbox, we will download the image from an OCI bucket. However,
101100
102101
103102
104-
## Task 2: Access APEX & ORDS
103+
## Task 2: Access APEX & SQL Developer Web
105104
106105
Oracle Autonomous Database Free has APEX and ORDS (a.k.a Database Actions) preinstalled. Let's see how you can get started!
107106
@@ -115,30 +114,29 @@ Oracle Autonomous Database Free has APEX and ORDS (a.k.a Database Actions) prein
115114
116115
2. **Open Google Chrome.** Click Activities >> Google Chrome icon, to open a new Chrome window.
117116
118-
2. **Launch ORDS.** Paste the following URL into your Chrome browser to Launch ORDS.
117+
3. **Launch ORDS.** Paste the following URL into your Chrome browser to Launch ORDS.
119118
120119
```
121120
<copy>
122121
https://localhost:8443/ords
123122
</copy>
124123
```
124+
![ORDS landing page](images/ords-landing.png)
125125
126-
![ORDS landing page](images/ords_landing.png)
127-
128-
3. **Sign into ORDS.**
126+
4. **Sign into ORDS.**
129127
130128
**Username -** admin
131129
**Password -** Welcome_12345 (or the custom password you specified in Task 1, Step 5.)
132130
133131
![Sign into DB Actions](images/sign-in-ords.png)
134132
135133
136-
4. **Launch APEX.** You now have access to Database Actions! Let's first click APEX to test it out.
134+
5. **Launch APEX.** You now have access to Database Actions! Let's first click APEX to test it out.
137135
Click "Go to Oracle APEX".
138136
139137
![ORDS landing page](images/launch_apex.png)
140138
141-
5. **Sign-in to APEX.**
139+
6. **Sign-in to APEX.**
142140
143141
**Username -** admin
144142
**Password -** Welcome_12345 (or the custom password you specified in Task 1, Step 5.)
@@ -156,12 +154,12 @@ Click "Go to Oracle APEX".
156154
157155
![Database Actions](images/ords_sql_developer.png)
158156
159-
6. **Sign-in to SQL Developer Web.**
157+
8. **Sign-in to SQL Developer Web.**
160158
161159
**Username -** admin
162160
**Password -** Welcome_12345 (or the custom password you specified in Task 1, Step 5.)
163161
164-
7. **Lauch the SQL worksheet.** Select the 'SQL' tab, as shown below.
162+
9. **Lauch the SQL worksheet.** Select the 'SQL' tab, as shown below.
165163
166164
You may proceed to the next lab.
167165

23aifree/vector-search/generate-vectors.md

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Perform Vector Search Yourself
1+
# Learn the Vector Search Process on Oracle Database 23ai
22

33
## Introduction
44
In this lab, you will quickly configure the Oracle Autonomous Database Free 23ai Docker Container in your remote desktop environment.
@@ -18,7 +18,7 @@ This lab assumes you have:
1818
- An Oracle account
1919

2020

21-
## Task 1: Load Your Vector Embedding Model
21+
## Task 1: Prepare the Workspace
2222

2323
1. **Return to the terminal.** Select Activities >> Terminal.
2424

@@ -55,27 +55,72 @@ This lab assumes you have:
5555
<copy>
5656
CREATE OR REPLACE DIRECTORY DM_DUMP as 'models';
5757
</copy>
58+
```
59+
6. **Grant READ permissions on the DM_DUMP directory to dmuser.**
60+
```
61+
<copy>
62+
GRANT READ ON DIRECTORY DM_DUMP TO dmuser;
63+
</copy>
64+
```
65+
66+
7. **Grant WRITE permissions on the DM_DUMP directory to dmuser.**
67+
```
68+
<copy>
69+
GRANT WRITE ON DIRECTORY DM_DUMP TO dmuser;
70+
</copy>
5871
```
5972
60-
7. **Copy the absolute file path of the PDB's working directory.** Copy the file path returned by the following command.
73+
8. **Add quota to tablespace DATA for dmuser.**
74+
```
75+
<copy>
76+
alter user SALES quota 50m on users;
77+
</copy>
78+
```
79+
80+
9. **Copy the absolute file path of the PDB's working directory.** Copy the file path returned by the following command.
6181
```
6282
<copy>
6383
select directory_path from all_directories where directory_name = 'DM_DUMP';
6484
</copy>
6585
```
6686
67-
8. **Move the vector model into the PDB's working directory.**
87+
10. **Return to the container shell. Move the vector model into the PDB's working directory.**
6888
```
6989
<copy>
7090
cp u01/BERT-TINY.onnx <working-directory>
7191
</copy>
7292
```
7393
74-
9.
94+
11. **Return to SQL Developer Web.**
7595
96+
12. **Confirm the model appears in the database directory.**
97+
```
98+
<copy>
99+
SELECT * FROM DBMS_CLOUD.LIST_FILES('DM_DUMP');
100+
</copy>
101+
```
102+
103+
You may proceed to the next lab.
76104
105+
## Task 2: Import the ONNX Model
106+
107+
1. **Return to the container shell.**
108+
109+
2. **Connect to the ADB as dmuser.**
110+
```
111+
<copy>
112+
sqlplus dmuser/Welcome_123456@myatp_low
113+
</copy>
114+
```
115+
3. **Load the ONNX model into the database.**
116+
```
117+
<copy>
118+
EXECUTE DBMS_VECTOR.LOAD_ONNX_MODEL('DM_DUMP','BERT-TINY.onnx','doc_model');
119+
</copy>
120+
```
121+
You may now proceed to the next lab.
77122
78-
## Task 2: Generate Vectors From the Data
123+
## Task 3: Generate Vectors From the Data
79124
80125
1. **Extract the product descriptions.**
81126
```
248 KB
Loading
244 KB
Loading
195 KB
Loading
57.5 KB
Loading
301 KB
Loading
163 KB
Loading

23aifree/vector-search/intro-vector-search-hol.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,43 @@ This because we're only looking at the literal value of of our search query and
8383
8484
## Task 3: Perform a Vector Search for Professional Attire
8585
86+
1. **Click Data Load, in the upper-right.**
87+
![](images/task3.1.png)
88+
89+
2. **Select "Add file".**
90+
![](images/task3.2.png)
91+
92+
3. **Upload the product_vectors.csv file.** This file is found at _Home/customer-orders/_.
93+
![](images/task3.3.png)
94+
95+
4. **Edit the settings.** Click the 3 ellipses next to the loaded file and select "Settings" and then "Next".
96+
![](images/task3.4.png)
97+
98+
5. **Click Next.**
99+
![](images/task3.5.png)
100+
101+
**Update the "Target Details" and click "Save Settings** Update the schema and table name to match the image below .
102+
![](images/task3.6.png)
103+
104+
105+
7. . **Vector search your catalog on the word "professional".**
106+
```
107+
<copy>
108+
SELECT product_id, product_name, product_description
109+
FROM co.product_vectors_raw
110+
ORDER BY VECTOR_DISTANCE(to_vector(embedding), to_vector('[-1.38417125E-001,9.71514508E-002,-1.18379503E-001,-1.29179478E-001,-2.79206838E-002,-9.25924536E-003,7.63561204E-002,-8.47336557E-003,-9.88291353E-002,5.86197292E-003,1.24105304E-001,2.64565721E-002,-2.90193707E-001,6.24980172E-003,1.40465021E-001,-1.0187757E-001,1.13065904E-002,-1.62050202E-002,-1.51706114E-001,1.0432037E-001,1.69033576E-002,-6.36996627E-002,2.22446039E-001,8.87518004E-002,5.68140186E-002,-2.21980792E-002,-2.91388109E-002,6.10229652E-003,1.23727275E-002,-1.61174312E-002,-2.18355004E-003,-5.69379814E-002,-7.01681077E-002,7.43765458E-002,8.72624367E-002,-8.85243937E-002,-1.58647411E-002,-9.89395455E-002,-1.2489415E-001,-1.55174434E-001,3.95436995E-002,-6.47113007E-003,6.44426644E-002,-6.55944273E-002,-3.10505833E-002,-1.65970504E-001,-8.76084268E-002,-6.62551969E-002,7.95538165E-003,-5.58951758E-002,-5.03059104E-002,1.55989215E-001,-5.80965802E-002,-2.22495496E-002,1.19294189E-001,-1.20502286E-001,9.3728438E-002,1.48948599E-002,-6.63644373E-002,1.32789746E-001,7.51211941E-002,-5.60273789E-002,-1.13926828E-001,-6.62457347E-002,-2.19992418E-002,5.06774988E-003,4.64191213E-002,5.68691492E-002,5.02295792E-002,-4.11496758E-002,-3.50375026E-002,6.46986738E-002,-3.56235483E-004,-3.62013914E-002,2.69071013E-002,4.18330394E-002,-6.73687039E-003,-2.01085322E-002,1.12838395E-001,7.21994713E-002,-8.7489374E-003,-1.16420537E-002,6.37029298E-003,1.96365491E-002,-5.01939096E-002,-6.94921836E-002,6.35710964E-003,-1.28438711E-001,1.77688166E-001,-1.67947963E-001,1.17344201E-001,7.17160255E-002,-1.23912282E-001,6.6053316E-002,7.24657997E-002,1.1995139E-001,-7.1466784E-003,5.12270406E-002,1.27887025E-001,6.25869036E-002,-1.19979665E-001,1.12567812E-001,2.28577014E-002,-4.52852659E-002,7.86832869E-002,-9.707091E-002,-8.44487473E-002,1.29422441E-001,7.83354938E-002,-1.59848779E-001,2.41119806E-002,1.14535931E-002,2.27301707E-003,-2.59636398E-002,2.51355022E-003,1.0459137E-001,2.69407909E-002,-1.11877277E-001,1.12808578E-001,1.14215619E-003,2.92326175E-002,1.44840822E-001,4.73851375E-002,-1.27157673E-001,-2.07854062E-001,-1.11806065E-001,-8.02985206E-003,-7.00606555E-002]'), EUCLIDEAN )
111+
FETCH EXACT FIRST 10 ROWS ONLY;
112+
</copy>
113+
```
114+
8. . **Vector search your catalog on the word "slacks".**
115+
```
116+
<copy>
117+
SELECT product_id, product_name, product_description
118+
FROM co.product_vectors_raw
119+
ORDER BY VECTOR_DISTANCE(to_vector(embedding), to_vector('[-9.68606323E-002,7.5337708E-002,-1.0658735E-001,-1.38738364E-001,-2.28260402E-002,3.5230644E-002,2.68885796E-003,1.36218229E-002,1.15028154E-002,4.23902161E-002,8.37896764E-002,2.90349014E-002,-1.51465312E-001,1.49059035E-002,1.46184951E-001,-1.77720428E-001,5.30827865E-002,-5.13745425E-003,-7.5569436E-002,1.34732634E-001,5.25507284E-003,3.61185595E-002,2.11690515E-001,5.85873537E-002,-3.19165476E-002,-7.93770403E-002,1.45305004E-002,4.49487194E-002,1.37902955E-002,-1.09221734E-001,-5.7302203E-002,-1.12185463E-001,-6.40390366E-002,6.2864095E-002,4.25061174E-002,-1.19959101E-001,5.48176914E-002,-1.05015293E-001,-1.09484673E-001,-1.26435086E-001,8.88467953E-002,-6.78603202E-002,7.37638995E-002,-5.0049141E-002,6.07395545E-002,-1.30454943E-001,-5.51283062E-002,-1.21642545E-001,-3.97110172E-002,1.46834096E-002,-9.3602553E-002,2.41991818E-001,3.517735E-002,-7.62047153E-003,1.30953774E-001,-1.40298694E-001,9.79949087E-002,-6.78110123E-002,-1.04402095E-001,9.76447538E-002,8.0076322E-002,-1.31879494E-001,-8.34248215E-002,-8.54361951E-002,-1.22926809E-001,-8.59939158E-002,8.22370127E-002,5.52646583E-003,9.4893679E-002,-9.64170173E-002,-3.16511393E-002,-9.48159024E-003,-7.33673051E-002,-3.52119654E-002,-2.69408673E-002,9.13547445E-003,1.26846209E-001,3.09299417E-002,1.38598114E-001,4.07091081E-002,3.46698835E-002,2.05623899E-002,3.31137851E-002,-8.18310399E-003,-6.5582931E-002,-7.39831626E-002,-7.24066142E-003,-6.11410327E-002,1.57419547E-001,-1.34564966E-001,8.96778107E-002,-4.31015593E-004,-1.22770734E-001,7.80297145E-002,5.69474846E-002,8.80813822E-002,3.1488277E-002,-1.51161058E-002,7.1529232E-002,8.24968889E-002,-1.08482465E-001,1.52552053E-002,4.57050614E-002,-1.20126978E-001,9.49510187E-002,-7.69320577E-002,-1.02195516E-001,1.10023908E-001,5.00271246E-002,-1.07030541E-001,7.50863254E-002,5.98394163E-002,5.17932661E-002,5.67459613E-002,6.10302612E-002,8.13639611E-002,-6.97210804E-002,-1.61270708E-001,6.98513016E-002,7.82461837E-002,-1.56437326E-002,1.21171348E-001,6.85361698E-002,-1.86466992E-001,-1.40970141E-001,-1.14370458E-001,-3.85081656E-002,6.8552658E-002]'), EUCLIDEAN )
120+
FETCH EXACT FIRST 10 ROWS ONLY;
121+
</copy>
122+
```
86123
87124
## Acknowledgements
88125
- **Authors** - Brianna Ambler, Database Product Management, August 2024

23aifree/workshops/sandbox-aivs-adb/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"filename": "../../vector-search/intro-vector-search-hol.md"
2727
},
2828
{
29-
"title": "Lab 3: Perform Vector Search Yourself",
29+
"title": "Lab 3: Learn the Vector Search Process on Oracle Database 23ai",
3030
"description": "Explains how to vectorize your data.",
3131
"type": "livelabs",
3232
"filename": "../../vector-search/generate-vectors.md"

0 commit comments

Comments
 (0)