Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data-fundamentals-dev-rel/quiz/quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Estimated Time: 5 minutes
badge: images/badge.png
```

### Objectives

* Pass the quiz and get your "Data fundamentals for AI application developement" skills badge!

### Quiz Questions

```quiz score
Expand Down
53 changes: 53 additions & 0 deletions dev-rel-rag-to-agents/connect-to-env/connect-to-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Connect to the Development Environment

## Introduction

In this lab, you'll learn how to access the web-based JupyterLab development environment, where you can write and run Python code directly in your browser. You'll log in, and get ready to start coding in a hands-on environment.

Estimated Time: 5 minutes

### Objectives

* Login to JupyterLab server
* Run Jupyter Notebook

## Task 1: Login to JupyterLab Server

1. To navigate to the development environment, click **View Login Info**. Copy the Development IDE Login Password. Click the Start Development IDE link.

![Open Development Environment](./images/dev-env.png =50%x*)

2. Paste in the Development IDE Login Password that you copied in the previous step. Click **Login**.

![Login](./images/jupyter-login.png " ")

1. Select **`notebooks/rag_to_agents`** directory to open it. Double click on file **`rag_to_agents_lab.ipynb`** and it will open in the the panel on the right.

![Open Launcher](./images/launcher.png " ")

## Task 2: Learn to use RAG and AI agents in a production app

You will use a Jupyter Notebook in a JupyterLab server to build and test database queries. If you are new to notebooks, the following tips will help you get started and work smoothly.

1. **Executing Code Blocks**: You can run code in two simple ways: press **Shift+Enter** to execute and move to the next cell, or click the **Play/Execute** button in the menu bar at the top of this tab. Both methods work interchangeably.

2. **Block Types**: Instructions and code are separated into **their own blocks**. Instructions are in markdown (like this cell), while code is in executable Python blocks. If you accidentally run an instruction block, it’ll just skip to the next cell—no harm done!

3. **Running Indicators**: When you run a code block, its label changes from `[ ]` (empty) or `[1]` (a number) to `[*]`. The asterisk (`*`) means it’s processing. Wait until it switches back to a number (e.g., `[2]`) before moving on, ensuring the operation is complete.

4. **Output & Warnings**: Below each code cell, output appears during and after execution. This can include results, visualizations, or messages. Warnings may show up—these are usually informational, such as notices about deprecated features. Unless an error halts execution, users can continue without making changes. If you see a error, review the code for any issues and make changes accordingly and try executing the cell again.

**NOTE:** Look for **<span style="color: green;">green text</span>** as in the image below where it says "<span style="color: green;">Connected successfully!</span>". Many cells will have different message, but the final successful one should always be green. When you see the green text, the cell completed. For some longer running cells, this is important to watch for.

![JupyterLab blocks](./images/block.png " ")

## Conclusion

In this lab you logged into the **IDE Development Environment** for Jupyter Labs. You launched the **`rag_to_agents_lab.ipynb`** notebook and worked through the notebook to learn about RAG and AI agent production applications.

Make sure you take the quiz by clicking on **Take the quiz!** link on the left nav bar.

## Acknowledgements
* **Authors** - Kirk Kirkconnell
* **Contributors** - Anant Srivastava
* **Last Updated By/Date** - Kirk Kirkconnell, June 2026
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions dev-rel-rag-to-agents/introduction/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Introduction

## About this Workshop

In this lab, we'll interact with a data set from an application named Prism CityOps. It's an application used by the city of Kirkland to monitor and manage city infrastrucuter such as ongoing maintenance, active monitoring via IoT devices, crew dispatch, record keeping, and more.

You'll utilize a Jupyter Notebook with real Python code, completing real activities, and building on what you already know about databases and AI Vector Search. You'll create a RAG pipeline using data in the database and work your way up to implementing a full on AI agent, with tools and a little memory, utilizing LangChain as the agent framework.

Estimated Workshop Time: 50 - 60 minutes

✅ **Overview of Labs**

In the next labs, you'll connect to your JupyterLab environment and work through the RAG to Agent notebook built around the Prism CityOps dataset. You'll use the same operational data you did with the Data Fundamentals lab, but this time you'll build real workflows with the data.

* **Lab 1 – Connect to your environment and confirm database is ready**
Log in to the JupyterLab IDE where you’ll run Python code and run the section 0 cells to confirm the database is ready for the lab.

* **Lab 2 – RAG, grounded in your own data**
This section builds a minimal Retrieval-Augmented Generation path over Prism maintenance and inspection content using Oracle’s in-database ONNX embedding model and vector search. Learners inspect retrieved chunks, assemble grounded prompts, compare a raw Ollama-based RAG call with a LangChain version, and see why RAG is powerful for grounded answers but insufficient for multi-step operational reasoning.

* **Lab 3 – Tools and skills**
This section introduces the concepts the agent will need before it is built: callable tools and SOP-like skills. Learners define allowlisted Prism data tools, learn why tool signatures and docstrings matter to the model-facing interface, and create an incident-triage skill that tells the future agent which tools to use, in what order, and under what evidence standards.

* **Lab 4 – The unified query**
This section demonstrates the core Oracle AI Database value proposition by combining relational data, JSON specifications, SQL/PGQ graph traversal, and vector search in a single SQL-backed incident brief. Learners run the unified query, inspect the combined result, and wrap it as the agent’s primary context tool so the agent can retrieve rich operational evidence through one controlled interface.

* **Lab 4 – Build the agent with LangGraph + Ollama**
This section assembles the full agent: a LangGraph reasoning loop backed by Ollama, allowlisted tools, an incident-triage skill, Oracle-backed short-term checkpoint memory, and Oracle-backed long-term semantic memory. Learners reset rerun state, compile the graph, run the first agent turn, inspect tool calls and trace output, and verify that durable memory was written back to the database.

By the end, you'll understand how Oracle AI Database supports AI application development use LangChain, LLMs, AI Agents, and your own data pipelines.

### Objectives

* Build a grounded RAG flow that retrieves Prism maintenance context using in-database embeddings and vector search, then uses that context to answer asset-related questions.

* Compare raw RAG plumbing with a LangChain-based implementation to understand what the framework simplifies and what remains the developer’s responsibility.

* Run a deterministic LLM-driven workflow that classifies an infrastructure incident, retrieves supporting context, drafts a recommendation, formats the result, and exposes trace data for review.

* Define agent tools and a task-specific skill that guide how an LLM should retrieve asset context, follow evidence rules, and produce incident-triage recommendations.

* Build and run a LangGraph agent that uses Oracle-backed tools, unified relational/JSON/graph/vector context, short-term checkpoint memory, and long-term semantic memory to respond to a Prism infrastructure incident.

### Prerequisites

This lab assumes you have:

* An Oracle account to submit your LiveLabs Sandbox reservation.
* Basic knowledge of coding and Python.
* Basic knowledge of Oracle Database, i.e., how to run queries.

## Learn More

* [Oracle AI Database Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/26/)

## Acknowledgements
* **Authors** - Kirk Kirkconnell
* **Last Updated By/Date** - Kirk Kirkconnell, June 2026
Binary file added dev-rel-rag-to-agents/quiz/images/badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions dev-rel-rag-to-agents/quiz/quiz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Quiz

## Introduction

Test your knowledge of building a RAG and agentic! This quiz covers key concepts from the lab including Vector Search, embeddings, Python integration, and AI-powered recommendation systems.

Estimated Time: 5 minutes

```quiz-config
passing: 80
badge: images/badge.png
```

### Objectives

* Pass the quiz and get your "Zero to Hero: RAG to Agents" skills badge!

### Quiz Questions

```quiz score
Q: What is the main purpose of the RAG retriever in Section 1?
* To retrieve semantically relevant Prism chunks using in-database vector embeddings and vector distance
- To let the LLM choose arbitrary database tables to query
- To store long-term memories for later conversations
- To format the final incident report as markdown
> The retriever grounds the model by selecting relevant database-backed context before the LLM generates an answer.

Q: What does the raw RAG implementation demonstrate before the LangChain version is introduced?
- RAG requires an agent framework to work
- RAG automatically performs multi-step planning
- RAG removes the need to inspect retrieved context
* RAG is mainly retrieval, prompt assembly, and an LLM call
> The raw version makes the moving parts visible, which helps learners understand what a framework simplifies later.

Q: What is the key tradeoff of a LLM-driven workflow?
* It is predictable and auditable, but less adaptive than an agent
- It is fully autonomous, but impossible to trace
- It avoids prompts entirely, but requires manual SQL every time
- It replaces retrieval quality with model memory
> The workflow follows a fixed path with bounded LLM calls, which improves control but limits flexibility when the problem changes.

Q: Why do tool signatures and docstrings matter?
- They change the physical database schema used by the tool
* They define the model-facing interface that helps the LLM decide when and how to call a tool
- They automatically validate every SQL result returned by Oracle
- They prevent the framework from executing tool calls
> The LLM sees the tool name, inputs, and description, so clear interfaces improve tool selection and usage.

Q: What makes the unified query important?
- It moves data into a separate vector database for faster retrieval
- It asks the LLM to generate SQL without constraints
- It replaces the need for asset metadata
* It combines relational, JSON, graph, and vector evidence in one Oracle-backed SQL call
> The unified query shows how Oracle AI Database can provide rich incident context without, CDC, synchronization, ETL, or separate data stores.

Q: What role does LangGraph play in the lab?
- It creates the original PRISM seed data
- It replaces Ollama as the LLM runtime
* It implements the agent reasoning loop where the model can answer or request allowed tool calls
- It converts markdown quiz blocks into notebook cells
> LangGraph provides the state graph, tool loop, checkpointing, and memory wiring used by the agent.

Q: Why does the notebook use both short-term and long-term memory for the agent?
* Short-term memory preserves the current thread, while long-term memory stores durable recallable knowledge across runs
- Short-term memory stores SQL tables, while long-term memory stores only Python variables
- Short-term memory replaces retrieval, while long-term memory disables tool calls
- Both memories are temporary and disappear when the notebook kernel stops
> The notebook separates conversation state from persistent semantic memory so the agent can continue a thread and recall prior incident decisions.

```

## Acknowledgements
* **Authors** - Kirk Kirkconnell
* **Last Updated By/Date** - Kirk Kirkconnell, January 2026
63 changes: 63 additions & 0 deletions dev-rel-rag-to-agents/workshops/sandbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Oracle LiveLabs gives you access to Oracle's products to run a wide variety of labs and workshops; allowing you to experience our best technology, live!">
<title>Oracle LiveLabs</title>

<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/jquery-1.11.0.min.js"></script>
<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/jquery-ui-1.10.4.custom.js"></script>
<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/main.min.js"></script>

<link rel="stylesheet" href="https://oracle-livelabs.github.io/common/redwood-hol/css/style.min.css" />
<link rel="shortcut icon" href="https://oracle-livelabs.github.io/common/redwood-hol/img/favicon.ico" />

</head>

<body>
<header class="hol-Header" role="banner">
<div class="hol-Header-wrap">
<div class="hol-Header-logo"><span>Oracle LiveLabs</span></div>
<a href="https://livelabs.oracle.com" target="_blank" id="livelabs" title="Oracle LiveLabs"></a>
<div class="hol-Header-actions">
<button id="openNav" class="hol-Header-button hol-Header-button--menu rightNav" aria-label="Open Menu"
title="Open Menu">
<span class="hol-Header-toggleIcon"></span>
</button>
</div>
</div>
</header>

<div id="container">
<div id="leftNav">
<div id="toc"></div>
</div>
<div id="contentBox">
<main class="hol-Content" id="module-content"></main>
</div>
</div>

<footer class="hol-Footer">
<a class="hol-Footer-topLink" href="#top">Return to Top</a>
<div id="footer-banner"><div class="footer-row">
<div class="footer-content"><ul class="footer-links">
<li><a href="https://docs.oracle.com/pls/topic/lookup?ctx=en/legal&id=cpyr" target="_blank" aria-label="Open a new window to Oracle legal notices" data-lbl="copyright">© Oracle</a></li>
<li><a href="https://www.oracle.com/corporate/index.html" target="_blank" aria-label="Open a new window to learn more about oracle" data-lbl="about-oracle">About Oracle</a></li>
<li><a href="https://www.oracle.com/corporate/contact/" target="_blank" aria-label="Open a new window to contact oracle" data-lbl="contact-us">Contact Us</a></li>
<li class="footer-links-break"></li>
<li><a href="https://docs.oracle.com/en/browseall.html" target="_blank" aria-label="Open a new window to products a-z" data-lbl="products-a-z">Products A-Z</a></li>
<li><a href="https://www.oracle.com/legal/privacy/" target="_blank" aria-label="Open a new window to read more about Oracle terms of use and privacy" data-lbl="terms-of-use-and-privacy">Terms of Use & Privacy</a></li>
<li><a href="https://www.oracle.com/legal/privacy/privacy-policy.html#11" target="_blank" aria-label="Open a new window to read more about managing Oracle cookie preferences" data-lbl="cookie-preferences">Cookie Preferences</a></li>
<li><a href="https://www.oracle.com/legal/privacy/marketing-cloud-data-cloud-privacy-policy.html#adchoices" target="_blank" aria-label="Open a new window to ad choices" data-lbl="ad-choices">Ad Choices</a></li>
<li class="footer-links-break"></li><li class="last"><a href="https://docs.oracle.com/pls/topic/lookup?ctx=en/legal&id=cpyr" target="_blank" aria-label="Open a new window to Oracle legal notices" data-lbl="copyright">© Oracle</a></li>
</ul>
</div>
</div>
</div>
</footer>
</body>

</html>
26 changes: 26 additions & 0 deletions dev-rel-rag-to-agents/workshops/sandbox/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"workshoptitle": "From Zero to Hero: RAG to Agents",
"help": "[email protected]",
"tutorials": [
{
"title": "Introduction",
"description": "The Introduction is always first. The title and contents menu title match for the introduction.",
"filename": "../../introduction/introduction.md"
},
{
"title": "Connect to the Development Environment",
"description": "This is a step-by-step guide showcasing how the hands-on lab instance is navigated",
"filename": "../../connect-to-env/connect-to-env.md"
},
{
"title": "Take the quiz!",
"description": "A quiz cover this lab you take to get your Skills Badge.",
"filename": "../../quiz/quiz.md"
},
{
"title": "Need Help?",
"description": "Solutions to common problems with LiveLabs and directions for receiving live help",
"filename": "https://livelabs.oracle.com/cdn/common/labs/need-help/need-help-freetier.md"
}
]
}
Loading