Skip to content

Commit d99c016

Browse files
authored
Merge pull request #4 from mongodb-developer/cloud-agnostic-updates
Making the lab cloud agnostic
2 parents ea30884 + a3a639d commit d99c016

File tree

70 files changed

+152
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+152
-292
lines changed

docs/20-mongodb-atlas/1-create-account.mdx

Lines changed: 0 additions & 62 deletions
This file was deleted.

docs/20-mongodb-atlas/1-setup.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 👐 MongoDB Setup
2+
3+
:::caution
4+
If you are doing this lab as part of a MongoDB GenAI Developer Day, at this point you should already have a free cluster, so you can skip this step.
5+
6+
If you don't have a cluster yet, follow the steps below to create one.
7+
:::
8+
9+
In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for an AI agent that can help you understand technical documentation.
10+
11+
To use MongoDB Atlas, you will need to create an account, a free cluster and obtain the connection string to connect to your cluster. Follow these steps to get set up:
12+
13+
* [Register for a free MongoDB Atlas account](https://mongodb-developer.github.io/intro-lab/docs/mongodb-atlas/create-account)
14+
15+
* [Create a new database cluster](https://mongodb-developer.github.io/intro-lab/docs/mongodb-atlas/create-cluster)
16+
17+
* [Obtain the connection string for your database cluster](https://mongodb-developer.github.io/intro-lab/docs/importing-data/get-connection-string)

docs/20-mongodb-atlas/2-create-cluster.mdx

Lines changed: 0 additions & 56 deletions
This file was deleted.

docs/20-mongodb-atlas/3-get-connection-string.mdx

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/40-dev-env/1-jupyter-notebooks.mdx renamed to docs/30-dev-env/1-jupyter-notebooks.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ Cells in a Jupyter notebook are a modular unit of code or text that you can exec
66

77
To run a cell in a Jupyter notebook, hover over it and click the Run icon that appears against the cell.
88

9-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/1-jupyter-notebooks/1-run-cell.png" alt="Run a cell" />
9+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/1-jupyter-notebooks/1-run-cell.png" alt="Run a cell" />
1010

1111
When a cell is running, you will see a loading spinner in the bottom left corner of the cell.
1212

13-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/1-jupyter-notebooks/2-running-cell.png" alt="A running cell" />
13+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/1-jupyter-notebooks/2-running-cell.png" alt="A running cell" />
1414

1515
When a cell is finished running successfully, you will see a green check mark appear in the bottom left corner of the cell.
1616

17-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/1-jupyter-notebooks/3-successful-cell.png" alt="Successful cell run" />
17+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/1-jupyter-notebooks/3-successful-cell.png" alt="Successful cell run" />
1818

1919
If an error occurred while running a cell, you will see a red cross appear in the bottom left corner of the cell, and also an error traceback after the cell.
2020

21-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/1-jupyter-notebooks/4-error-in-cell.png" alt="Erroneous cell run" />
21+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/1-jupyter-notebooks/4-error-in-cell.png" alt="Erroneous cell run" />
2222

2323
To fix errors, you may need to update previous cells. If you do, re-run all the cells following the one(s) you updated.
2424

2525
To interrupt a running cell, click the Stop icon that you see against the cell while it is running.
2626

27-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/1-jupyter-notebooks/5-interrupt-cell.png" alt="Interrupt cell run" />
27+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/1-jupyter-notebooks/5-interrupt-cell.png" alt="Interrupt cell run" />
2828

2929
:::warning
3030
The UI might differ slightly if you are running Jupyter Notebooks in a different IDE. Refer to the appropriate documentation if running the notebook in a different environment.

docs/40-dev-env/2-dev-setup.mdx renamed to docs/30-dev-env/2-dev-setup.mdx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,35 @@ import Screenshot from "@site/src/components/Screenshot";
22

33
# 👐 Setup dev environment
44

5+
:::caution
6+
If you are doing this lab as part of a MongoDB GenAI Developer Day, at this point you should already have the GitHub Codespace ready for this lab, so you can skip this step.
7+
8+
If you haven't created the Codespace yet, follow the steps below to create one.
9+
:::
10+
511
## Option 1: GitHub Codespaces
612

713
You will be working in a Jupyter Notebook in a GitHub Codespace throughout this lab. A codespace is a cloud-hosted, containerized development environment that comes pre-configured with all the tools you need to run this lab.
814

9-
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/ai-agents-lab-notebooks?quickstart=1) link. You will be prompted to sign into GitHub if you haven't already. Once signed in, click the **Create new codespace** button to create a new codespace.
15+
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. You will be prompted to sign into GitHub if you haven't already. Once signed in, click the **Create new codespace** button to create a new codespace.
1016

11-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/2-dev-setup/1-create-codespace.png" alt="Start a codespace" />
17+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/2-dev-setup/1-create-codespace.png" alt="Start a codespace" />
1218

13-
Let it run for a few seconds as it prepares your environment. It will clone the repository, prepare the container, and run the installation scripts.
19+
Let it run for a few seconds as it prepares your environment. It will clone the repository, prepare the container, and run the installation scripts. Once the environment is built, you should see a list of files appear under the Explorer.
1420

15-
In the left navigation bar of the IDE, click on the file named `notebook_template.ipynb` to open the Jupyter Notebook for the lab.
21+
In the left navigation bar of the IDE, click on the file named `ai-agents-lab.ipynb` to open the Jupyter Notebook for this lab.
1622

17-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/2-dev-setup/2-nav-notebook.png" alt="Navigate to the notebook" />
23+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/2-dev-setup/2-nav-notebook.png" alt="Navigate to the notebook" />
1824

1925
Next, select the Python interpreter by clicking **Select Kernel** at the top right of the IDE.
2026

21-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/2-dev-setup/3-select-kernel.png" alt="Select kernel" />
27+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/2-dev-setup/3-select-kernel.png" alt="Select kernel" />
2228

23-
In the modal that appears, click **Python environments...** and select the recommended interpreter.
29+
In the modal that appears, click **Python environments...** and select the interpreter that is marked as **Recommended** or **Global Env**.
2430

25-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/2-dev-setup/4-python-env-modal.png" alt="Select recommended interpreter" />
31+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/2-dev-setup/4-python-env-modal.png" alt="Select Python Environments" />
2632

27-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/40-dev-env/2-dev-setup/5-select-default.png" alt="Select recommended interpreter" />
33+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/30-dev-env/2-dev-setup/5-select-recommended.png" alt="Select recommended interpreter" />
2834

2935
That's it! You're ready for the lab!
3036

@@ -36,23 +42,23 @@ During the lab, we will use GitHub Codespaces. These instructions are here just
3642

3743
If you want to run the notebook locally, follow the steps below:
3844

39-
* Clone the [GitHub repo](https://github.com/mongodb-developer/ai-rag-lab-notebooks.git) for this lab by executing the following command from the terminal:
45+
* Clone the [GitHub repo](https://github.com/mongodb-developer/genai-devday-notebooks.git) for this lab by executing the following command from the terminal:
4046

4147
```
42-
git clone https://github.com/mongodb-developer/ai-rag-lab-notebooks.git
48+
git clone https://github.com/mongodb-developer/genai-devday-notebooks.git
4349
```
4450

4551
* `cd` into the cloned directory:
4652

4753
```
48-
cd ai-rag-lab-notebooks
54+
cd genai-devday-notebooks
4955
```
5056

5157
* Create and activate a Python virtual environment:
5258

5359
```
54-
python -m venv mongodb-ai-rag-lab
55-
source mongodb-ai-rag-lab/bin/activate
60+
python -m venv mongodb-ai-agents-lab
61+
source mongodb-ai-agents-lab/bin/activate
5662
```
5763

5864
* Install and launch Jupyter Notebook:
@@ -62,6 +68,6 @@ pip install notebook
6268
jupyter notebook
6369
```
6470

65-
* In the browser tab that pops up, open the file named `notebook_template.ipynb`.
71+
* In the browser tab that pops up, open the file named `ai-agents-lab.ipynb`.
6672

67-
<Screenshot url="localhost:8888/tree" src="img/screenshots/40-dev-env/2-dev-setup/6-jupyter-notebook.png" alt="Jupyter Notebook" />
73+
<Screenshot url="localhost:8888/tree" src="img/screenshots/30-dev-env/2-dev-setup/6-jupyter-notebook.png" alt="Jupyter Notebook" />

docs/30-dev-env/3-setup-pre-reqs.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 👐 Setup prerequisites
2+
3+
Fill in any placeholders, select an LLM provider (one of `aws`, `google` or `microsoft`) of your choice, and run the cells under the **Step 1: Setup prerequisites** section in the notebook.
4+
5+
**CODE_BLOCK_1**
6+
7+
<details>
8+
<summary>Answer</summary>
9+
<div>
10+
```python
11+
mongodb_client[DB_NAME][VS_COLLECTION_NAME]
12+
```
13+
</div>
14+
</details>
15+
16+
**CODE_BLOCK_2**
17+
18+
<details>
19+
<summary>Answer</summary>
20+
<div>
21+
```python
22+
mongodb_client[DB_NAME][FULL_COLLECTION_NAME]
23+
```
24+
</div>
25+
</details>
File renamed without changes.

docs/30-fireworks-ai/1-create-account.mdx

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/30-fireworks-ai/2-create-api-key.mdx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)