Skip to content

Commit 14203e5

Browse files
MarcGueurymkratkyhope-fisher
authored
WMS 11825 - Added new Agent features - RAG filter + Tools (#402)
* ocw feedback * genai1 * Update manifest.json * GenAI + Opensearch 2.11 * GENAI * Known issues * Update integration.md * Several fixes mostly for multi region. * a * Create genai_agent.md * Create images folder * Add files via upload * Update genai_agent.md * added Lab 4 (Optional): GenAI Agent * Update genai_agent.md * Add files via upload * Delete a.txt * completed genai_agent.md * added genai agent screenshots * formating changes genai_agent.md * postgres v1 * v2 * initial discover.md * Delete oci-postgresql-genai-lab/3-discover/images directory * Create images folder * added screenshots for lab3 * Update discover.md * PostgresLab * Update test.md * - * Hybrid * qa * Create .gitignore * remove genai agent * hybrid * screenshot * pgvector * - * Update integration.md rsa key * Missing grants * Update connect-apex-with-agents.md * Fixes * not used * date * OCI Agent Lab V1 * Image OCID * images lowercase * Zip file location * Typos * feedback * feedback * feedback * feedback * feedback * Feedback * added Lab5 * lab 6 * Update intro.md * tools v2 * Update manifest.json * Tools lab * tools * tools --------- Co-authored-by: mkratky <[email protected]> Co-authored-by: Hope Fisher <[email protected]>
1 parent 9f1d565 commit 14203e5

File tree

16 files changed

+309
-29
lines changed

16 files changed

+309
-29
lines changed

oci-genai-agent-ext-lab/0-intro/intro.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ From the lab 2/3/4, we will create 3 user interfaces for the above using the fol
2525
- APEX
2626
- A Python library Streamlit
2727
- Oracle Digital Assistant
28-
28+
29+
Lab 5 explain how to customize the demo to your needs.
30+
31+
Lab 6 shows how to change the Agent to have a RAG, SQL and Custom tool
32+
2933
Estimated Workshop Time: 90 minutes
3034

3135
### Logical Architecture

oci-genai-agent-ext-lab/1-install/install.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,29 @@ You can
298298
Solution:
299299
- Ask your administrator to increase your quota or the limits of the tenancy.
300300
301+
7. Error: Attempt to index null value
302+
303+
```
304+
on datasource.tf line 64, in locals:
305+
64: idcs_url = (var.idcs_url!="")?var.idcs_url:data.oci_identity_domains.starter_domains.domains[0].url
306+
├────────────────
307+
│ data.oci_identity_domains.starter_domains.domains is null
308+
```
309+
310+
Work-around:
311+
- This is due to a lack of privilege to access the list of domains in your tenancy.
312+
- edit file env.sh and add this line:
313+
```
314+
export TF_VAR_idcs_url=https://idcs-xxxxxx.identity.oraclecloud.com:443
315+
````
316+
You can find this URL by
317+
- going to OCI Console / Hamburger menu / Identity and Security / Domains
318+
- go to the root compartment
319+
- choose the default Domain
320+
- look for the Domain URL. It will look like this: https://idcs-xxxxxx.identity.oraclecloud.com:443
321+
- Rerun ./starter.sh build
322+
323+
301324
## Acknowledgements
302325
303326
- **Author**

oci-genai-agent-ext-lab/2-apex/apex.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,43 @@ Estimated time: 10 min
4242
| Video | .mp4 | What is Oracle Analytics |
4343
| Audio | .mp3 | Summarize the audio file Voice_SupportRobot.mp3 |
4444

45+
4546
**You may now proceed to the [next lab.](#next)**
4647

48+
## Task 2. Filter
49+
50+
One additional step is needed to use the RAG filter. We need to add a RAG tool.
51+
52+
### 1. Rag Tool ###
53+
54+
- In the hamburger menu, go to **Analytics and AI / Generative AI Agents**
55+
- Click on **Agents**
56+
- Choose your compartment
57+
- Open the agent created in Lab 1
58+
- Choose Tools / Create Tool
59+
- Choose **RAG**
60+
![Custom tool](../6-tools/images/rag-tool.png)
61+
- Enter:
62+
- **Name** = rag-tool
63+
- **Description** = Use this tool for any question that are not covered by the other tools. It contains generic documentation.
64+
- Select the knowledge base - agext-agent-kb
65+
- Click **Create Tool**
66+
67+
### 2. Test again ###
68+
- Go back to the APEX app.
69+
- Refresh the browser to start a new session.
70+
- Set the filter to */oracle*.
71+
- Ask again the same questions. You will see that based on the metadata, you can filter files.
72+
4773
## Known issues
4874

49-
None
75+
1. Conversation history
76+
Notice, do not change the filter in the middle of the conversation, or you can have funny effect. Ex:
77+
- Ask "what is jazz ?" without filter -> you get the answer from the RAG (with a citation)
78+
- Stay in the same conversation:
79+
- Ask "what is jazz ?" with filter "/music" -> you get the answer from the RAG (with a citation)
80+
- Ask "what is jazz ?" with filter "/oracle" -> you get an answer... from the conversation history...
81+
- The correct way was to reset the conversation to get another chat session.
5082

5183
## Acknowledgements
5284

32.9 KB
Loading
221 KB
Loading
446 KB
Loading
167 KB
Loading
155 KB
Loading
161 KB
Loading
289 KB
Loading

0 commit comments

Comments
 (0)