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
2 changes: 1 addition & 1 deletion dev-ai-app-dev-rel/build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You will query customer data from the `customer_returns_dv` JSON duality view, w

- **Define a function**: Create a reusable function `fetch_customer_data` to query the database by customer ID, extracting the JSON data for a specific customer.

- **Use an example**: Fetch data for customer `1000` (Alice Smith) to demonstrate the process.
- **Use an example**: Fetch data for customer `1001` (Alice Smith) to demonstrate the process.

- **Display the results**: Format the retrieved data into a pandas DataFrame for a clear, tabular presentation, showing key details like name, LifeTime Spend, Return Amount, and Loyalty Tier.

Expand Down
22 changes: 11 additions & 11 deletions dev-ai-app-dev-rel/codingbasics/codingbasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Now, that we have established a connection, we can start creating our tables and

## Task 4: Create a JSON Duality View

Next, let's explore how we can use a **JSON Duality View** to query our new table. A JSON Duality View allows us to interact with data as JSON objects, i.e., data is stored as documents. Unlike a regular view, we can also update data in a JSON Duality View. Any updates will be reflected in our original relational tables. We will create a JSON Duality View using our newly created tables `customers_demo` and `orders_demo`. We are joining these two tables as we need the customer orders with the customer data. If this was two collections in a document database, this would be two seperate queries to the database and word in your app, or it'd mean duplicate data, depending on how you modeled your data in that database.
Next, let's explore how we can use a **JSON Duality View** to query our new table. A JSON Duality View allows us to interact with data as JSON objects, i.e., data is stored as documents. Unlike a regular view, we can also update data in a JSON Duality View. Any updates will be reflected in our original relational tables. We will create a JSON Duality View using our newly created tables `customers_demo` and `orders_demo`. We are joining these two tables as we need the customer orders with the customer data. If this was two collections in a document database, this would be two separate queries to the database and word in your app, or it'd mean duplicate data, depending on how you modeled your data in that database.

1. Before we create the **JSON Duality View**, we need to add some **constraints** to our new tables. Copy & paste the following code into a **new cell** and run it.

Expand Down Expand Up @@ -295,15 +295,15 @@ Next, let's explore how we can use a **JSON Duality View** to query our new tabl

You notice that our code has some significant changes. We are now passing a parameter into our query, and we are formatting the output of our query. Let's have a closer look:

🔴 **`import json`** - This is a Python module that allows us to work with JSON. Remember: JSON Duality Views present data in document format, i.e., JSON.
* **`import json`** - This is a Python module that allows us to work with JSON. Remember: JSON Duality Views present data in document format, i.e., JSON.

🔴 **`query_dv(first_name)`** - This is a function that takes in a parameter and returns the result of our query. We are passing in `first_name` as a parameter, which we can use to filter our results.
* **`query_dv(first_name)`** - This is a function that takes in a parameter and returns the result of our query. We are passing in `first_name` as a parameter, which we can use to filter our results.

🔴 **`...WHERE JSON_EXISTS...`** - This is an Oracle AI Database function called `JSON_EXISTS`, which allows us to check if a specific key exists in a JSON object. In this case, we are checking if the `first_name` key exists in our JSON document. Essentially, `JSON_EXISTS` function enables us to use SQL syntax to check if a key exists in a JSON object. Remember, unlike rows in a relational table, JSON documents in the same collection don't all have to have the same shape.
* **`...WHERE JSON_EXISTS...`** - This is an Oracle AI Database function called `JSON_EXISTS`, which allows us to check if a specific key exists in a JSON object. In this case, we are checking if the `first_name` key exists in our JSON document. Essentially, `JSON_EXISTS` function enables us to use SQL syntax to check if a key exists in a JSON object. Remember, unlike rows in a relational table, JSON documents in the same collection don't all have to have the same shape.

🔴 **`json.dumps(raw_json, default=str, indent=4)`** - This is a Python function that formats our output. We are passing in the `raw_json` variable as an argument and formatting it with the `default=str` parameter.
* **`json.dumps(raw_json, default=str, indent=4)`** - This is a Python function that formats our output. We are passing in the `raw_json` variable as an argument and formatting it with the `default=str` parameter.

🔴 **`query_dv("Dan")`** - Here we are calling our query function again, but this time passing in the string `"Dan"` as a parameter. This will return all rows where `first_name` is equal to `"Dan"`. The result is displayed in JSON format, since it's coming from a JSON Duality View.
* **`query_dv("Dan")`** - Here we are calling our query function again, but this time passing in the string `"Dan"` as a parameter. This will return all rows where `first_name` is equal to `"Dan"`. The result is displayed in JSON format, since it's coming from a JSON Duality View.

>**Note:** Notice that our output is a nicely formatted document that now not only includes our customer data but also all orders for that customer.

Expand Down Expand Up @@ -421,7 +421,7 @@ Next, let's update some data in our database using MongoDB syntax. Let's write a

## Task 8: Query relational tables to verify updates made through JSON Duality View

The final step in our basic coding tour with Python and the Oracle AI Database is to query the two relational tables we created earlier. We just updated the JSON Duality view, so let's run a query on it to see if the changes were reflected. Remember that we created two functions in the beginning of this lab: `query_customers()` and `query_orders()`. Let's use these functions to get our data from MongoDB and update it with the new email address.
The final step in our basic coding tour with Python and the Oracle AI Database is to query the two relational tables we created earlier. We just updated the JSON Duality view, so let's run a query on it to see if the changes were reflected. Remember that we created two functions in the beginning of this lab: `query_customers()` and `query_orders()`. Let's use these functions to get our data from MongoDB and verify the email address was updated.

1. First, run the ``query_customers()` function in a new cell

Expand Down Expand Up @@ -476,15 +476,15 @@ The final step in our basic coding tour with Python and the Oracle AI Database i

As you can see we included some new features in our function. Let's have a closer look:

🔴 **`import pandas as pd`** - This is a Python module that allows us to work with Pandas DataFrames. We will be using this module to format our output.
- **`import pandas as pd`** - This is a Python module that allows us to work with Pandas DataFrames. We will be using this module to format our output.

🔴 **` column_names`** - This is a list of column names returned by our query which is a list of strings included in the cursor object returned by our query.
- **` column_names`** - This is a list of column names returned by our query which is a list of strings included in the cursor object returned by our query.

🔴 **`df.head()`** - This is a method that returns that returns the result of the query including the column names.
- **`df.head()`** - This is a method that returns that returns the result of the query including the column names.

## Conclusion

As a developer at Seer Holdings, you've just built the foundation for a GenAI-powered corporate approval system. We learned how to use Python and Oracle's Python driver `oracledb` to interact with Oracle AI Database's new features. You learned how to user the `cursor` object to execute SQL queries. Using the `cursor` object, you created a **JSON Duality View** and you even used some JSON functions to query documents using SQL syntax. Then, you also learned how to connect to the database using `pymongo` and retrieve data from a table in the database using **MongoDB syntax**. You created functions to update the **JSON Duality View** and you learned how these updates are also reflected in the underlying relational database tables.
As a developer at Seer Holdings, you've just built the foundation for a GenAI-powered corporate approval system. We learned how to use Python and Oracle's Python driver `oracledb` to interact with Oracle AI Database's new features. You learned how to use the `cursor` object to execute SQL queries. Using the `cursor` object, you created a **JSON Duality View** and you even used some JSON functions to query documents using SQL syntax. Then, you also learned how to connect to the database using `pymongo` and retrieve data from a table in the database using **MongoDB syntax**. You created functions to update the **JSON Duality View** and you learned how these updates are also reflected in the underlying relational database tables.

This architecture eliminates the need for duplicating data across platforms and simplifies how developers build AI-ready applications. Whether you're calling SQL, working with JSON, or speaking Mongo, you're always working with a single source of truth inside the Oracle Database.

Expand Down
2 changes: 1 addition & 1 deletion dev-ai-app-dev-rel/connect-to-env/connect-to-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You will use a Jupyter Notebook in JupyterLab to build and test the return autho

## Conclusion

In this lab you logged into the **IDE Development Environment** for Jupyter Labs. You reviewed different elements from the environment like **File Browser** and **Launcher**. Lastly, you were introduced to concepts to allow you to get started running code smoothly like **executing code blocks** and **outputs and warnings**.
In this lab you logged into the JupyterLab **IDE**. You reviewed different elements from the environment like **File Browser** and **Launcher**. Lastly, you were introduced to concepts to allow you to get started running code smoothly like **executing code blocks** and **outputs and warnings**.


## Acknowledgements
Expand Down
4 changes: 2 additions & 2 deletions dev-ai-app-dev-rel/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

In this set of labs, we'll look at SeerGroup, a global conglomerate with multiple divisions. Each division has various transactions, documents, and customer data. Their challenges are like many other businesses: decisions take too long, outcomes are not always accurate enough, or things get confusing because data is scattered across silos and systems, and "we've always done it that way" attitude has crept in. Also like many, they want to see what, if any, help AI-driven apps can be to their internal and external processes.

This workshop shows how SeerGroup tackles this. By keeping data in one place and using more modern tools and framworks, such as LangChain, they are working to cut out multiple integrations to give analysts, engineers, and managers a **single platform** for smarter and more informed approvals, efficient and more accurate investigations, and clearer customer answers and outcomes.
This workshop shows how SeerGroup tackles this. By keeping data in one place and using more modern tools and frameworks, such as LangChain, they are working to cut out multiple integrations to give analysts, engineers, and managers a **single platform** for smarter and more informed approvals, efficient and more accurate investigations, and clearer customer answers and outcomes.

Estimated Workshop Time: 140 minutes
Estimated Workshop Time: 180 minutes

✅ **Start with the demo! (Lab 1)**

Expand Down
4 changes: 3 additions & 1 deletion dev-ai-app-dev-rel/oraclemcp/oraclemcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Launch LangChain as the client to connect to Oracle MCP, discover tools, and run

## Task 3: (Optional) Use LangChain as the Oracle MCP Runner with a Reasoning Agent

Run a reasoning agenta more advanced MCP client that plans, explains, and justifies each step before acting. The reasoning agent typically runs longer and can show why it chose each tool and how the decision flow unfolds, depending on model settings and tracing configuration. This is useful for debugging, auditing, and optimizing multi-tool workflows in production.
Run a reasoning agent, a more advanced MCP client that plans, explains, and justifies each step before acting. The reasoning agent typically runs longer and can show why it chose each tool and how the decision flow unfolds, depending on model settings and tracing configuration. This is useful for debugging, auditing, and optimizing multi-tool workflows in production.

Why Does It Matter?

Expand Down Expand Up @@ -156,6 +156,8 @@ Why Does It Matter?
* Execute the query: *Show all LOAN_APPLICATIONS*.

4. Expected outcome:

**Note:** The content generated when you run this may differ from the screenshots in this section.

![response2](./images/agentresponse2.png =50%x*)

Expand Down
Binary file removed dev-ai-app-dev-rel/quiz/images/badge.png
Binary file not shown.
Binary file added dev-ai-app-dev-rel/quiz/images/badge1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 0 additions & 84 deletions dev-ai-app-dev-rel/quiz/quiz.md

This file was deleted.

62 changes: 62 additions & 0 deletions dev-ai-app-dev-rel/quiz/quiz1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Quiz on the Fundamentals of Data for AI

## Introduction

Test your knowledge of the Fundamentals of Data for AI!

Estimated Time: ~5 minutes

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

### Objectives

* Pass the quiz and get your "Fundamentals of Data for AI" skills badge!

### Quiz Questions

```quiz score

Q: What is the core tenant of the Unified Model Theory(UMT)?
* Model your canonical schema for data integrity, security, etc., but design data projections for application access patterns.
- All data, when viewed through the correct access surface at 9am, transforms into coffee.
- Eliminating polyglot persistence requires passing through five stages of database grief.
> The goal of UMT is to enable you to model a canonical schema, but project that data in whichever shapes needed by consumers.

Q: What is the default category of vector indexes in Oracle AI Database?
- IVF (Inverted File)
* HNSW (Hierarchical Navigable Small Worlds )
- Token Ring
- OSON
> HNSW is the default as it's the best general-purpose approximate nearest neighbor (ANN) algorithm available today. It has a good recall accuracy to speed ratio for most use cases.

Q: What's likely the best data type to store embeddings in Oracle AI Database?
- NUMBER
- BLOBOFREGRET
* VECTOR
- VARCHAR2
> Unless you have a solid reason not to, you should be using VECTOR data type to store vector embeddings.

Q: True or False: In Oracle, you can query JSON collections, relational tables, and graph traversals all in one SQL statement?
* True
- False
> It's true. You can even add a WHERE clause that performs a vector search to that same SQL statement.

Q: What's the likely data type you should store a JSON document in Oracle?
- CLOB
- VARCHAR2
* JSON
> Your default for storing JSON should likely be a JSON data type, but it really depends on how large of a document you're storing and your use case.

Q: How does Cosine similarity measure distance?
- It gets out a tape measure and...
- It measures concise distance between vectors
* It measures the angle between vectors

```

## Acknowledgements
* **Authors** - Kirk Kirkconnell
* **Last Updated By/Date** - Kirk Kirkconnell, March 2026
Loading
Loading