You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/20-dev-env/1-dev-env-setup.mdx
+31-28Lines changed: 31 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -20,76 +20,79 @@ In this lab, we will be using Jupyter Notebooks, which is an interactive Python
20
20
21
21
## Option 1: GitHub Codespaces
22
22
23
-
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.
23
+
You will be working in GitHub Codespaces 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.
24
24
25
25
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.
26
26
27
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/1-dev-env-setup/3-create-codespace.png"alt="Start a codespace" />
27
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/3-create-codespace.png"alt="Start a codespace" />
28
28
29
-
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster. Once the environment is built, you should see a VS Code IDE with a list of files in the Explorer tab.
29
+
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
30
30
31
-
In the Explorer menu, under `notebooks`, click on the file named `ai-rag-lab.ipynb`to open the Jupyter Notebook for this lab.
31
+
### Connect to the MongoDB cluster
32
32
33
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/1-dev-env-setup/2-nav-notebook.png"alt="Navigate to the notebook" />
33
+
Once the environment is built, you will be prompted to connect to the MongoDB cluster via MongoDB's VSCode extension. This will allow you to visualize the data that we will import into the cluster later in the lab, directly from the VSCode IDE.
34
34
35
-
Next, select the Python interpreter by clicking **Select Kernel**at the top right of the IDE.
35
+
To connect to the cluster, click the **Connect**button.
<summary>🦹 Use the MongoDB for VS Code extension to interact with the local MongoDB cluster from the VSCode IDE. </summary>
47
+
You can view the default and any additional collections we create on the cluster during the lab by clicking the leaf icon in the left navigation bar of the IDE.
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
53
54
54
-
In the tab that appears, click the **Connect** button.
55
+
Click on the files icon in the left navigation bar. In the Explorer menu, under `notebooks`, click on the file named `ai-rag-lab.ipynb` to open the Jupyter Notebook for this lab.
If the connection was successful, you should see the cluster and its default databases under Connections. Any additional databases and collections created during the lab will appear here as well.
63
+
In the modal that appears, click **Python environments...**and select the interpreter that is marked as **Recommended** or **Global Env**.
During the lab, we will use GitHub Codespaces. These instructions are here just in case you can't use Codespaces or if you really, really, really want a local installation.
72
75
:::
73
76
74
-
To run the lab locally, follow the steps below:
77
+
To run the lab locally, follow the steps below:
75
78
76
79
* Clone the [GitHub repo](https://github.com/mongodb-developer/genai-devday-notebooks.git) for this lab by executing the following command from the terminal:
Copy file name to clipboardExpand all lines: docs/40-perform-vector-search/2-create-vector-index.mdx
+1-14Lines changed: 1 addition & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,4 @@
2
2
3
3
To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data. In this lab, you will programmatically create vector search indexes using MongoDB's Python driver.
4
4
5
-
Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 6: Create a vector search index** section in the notebook to create a vector search index.
6
-
7
-
The answers for code blocks in this section are as follows:
8
-
9
-
**CODE_BLOCK_6**
10
-
11
-
<details>
12
-
<summary>Answer</summary>
13
-
<div>
14
-
```python
15
-
collection.create_search_index(model=model)
16
-
```
17
-
</div>
18
-
</details>
5
+
Run the cells under the **Step 6: Create a vector search index** section in the notebook to create a vector search index.
0 commit comments