Skip to content

Commit

Permalink
Merge pull request #5 from mongodb-developer/post-local-updates
Browse files Browse the repository at this point in the history
Updates Round #2
  • Loading branch information
ajosh0504 authored Nov 18, 2024
2 parents 39c830f + 9fba2c6 commit 52edbea
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @ajosh0504
24 changes: 23 additions & 1 deletion docs/20-mongodb-atlas/1-create-account.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,29 @@ import Screenshot from "@site/src/components/Screenshot";

In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for RAG applications.

To use MongoDB Atlas, you will need to start by creating an account. **If you already have an account, you can skip the following steps and move on to the next section.**
To use MongoDB Atlas, you will need to start by creating an account.

<details>
<summary>🦹 If you already have an Atlas account, you can use it by creating a new project</summary>

First, log into <Link to="https://account.mongodb.com/">MongoDB Atlas</Link> using your existing credentials.

<Screenshot url="https://account.mongodb.com" src={"img/screenshots/20-mongodb-atlas/1-create-account/3-login.png"} alt="Login form" />

## Create a new Atlas project

Once you're in Atlas, open the dropdown on the left-top corner of the page and select **New Project**.

<Screenshot url="https://cloud.mongodb.com" src={"img/screenshots/20-mongodb-atlas/1-create-account/4-new-project.png"} alt="Create new project" />

Enter a name for your project and click **Next**.

<Screenshot url="https://cloud.mongodb.com" src={"img/screenshots/20-mongodb-atlas/1-create-account/5-new-project-name.png"} alt="Create new project" />

On the next page, you can leave the current user as the project owner, and click **Create Project**.

Once the project is ready, continue the workshop from <a href="./create-cluster">**deploying a Database Cluster**</a>
</details>

## Sign up for MongoDB Atlas

Expand Down
4 changes: 0 additions & 4 deletions docs/20-mongodb-atlas/3-get-connection-string.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ A modal will display several ways to connect to your database. Select **Drivers*

Look for your connection string. It should look something like `mongodb+srv://<username>:<password>@<cluster-url>/`

```
```

<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/20-mongodb-atlas/3-get-conn-string/3-connect-compass.png" alt="Screenshot of the connection string" />

Click the copy button next to your connection string to copy it to your clipboard. Paste the connection string somewhere safe.
Expand Down
10 changes: 7 additions & 3 deletions docs/30-fireworks-ai/1-create-account.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ import Screenshot from "@site/src/components/Screenshot";

# 👐 Create an account

In this lab, we will use the _Llama 3 8B Instruct_ model hosted by Fireworks AI. Fireworks gives you $1 credit upon sign up which is plenty to experiment with industry-leading models on their platform.
In this lab, we will use the _Llama 3 8B Instruct_ model hosted by Fireworks AI.

The easiest way to use the model is via the Fireworks API. But first, you will need to create a Fireworks account. **If you already have an account, you can skip the following steps and move on to the next section.**
The easiest way to use this model is via the Fireworks API. But first, you will need to create a Fireworks account.

:::tip
If you already have an account, you can skip the following steps and continue the workshop from <a href="./create-api-key">**create an API key**</a>
:::

Start by navigating to the [Fireworks AI homepage](https://fireworks.ai/) and click the purple **Get Started Free** button to create an account.

<Screenshot url="https://fireworks.ai/" src="img/screenshots/30-fireworks-ai/1-create-account/1-homepage.png" alt="Get started" />

Click **Login With Google** and authenticate with your Google account. This will provision a new Fireworks account for you.
Click **Login With Google** and authenticate with your Google account.

<Screenshot url="https://fireworks.ai/" src="img/screenshots/30-fireworks-ai/1-create-account/2-google-login.png" alt="Login" />
10 changes: 4 additions & 6 deletions docs/30-fireworks-ai/2-create-api-key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import Screenshot from "@site/src/components/Screenshot";

# 👐 Create an API key

To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below.
Once logged in, navigate to **API keys** under **User Settings**.

Upon logging in, click the **User** tab.
<Screenshot url="https://fireworks.ai/" src="img/screenshots/30-fireworks-ai/2-create-api-key/1-api-keys.png" alt="Select API keys" />

<Screenshot url="https://fireworks.ai/" src="img/screenshots/30-fireworks-ai/2-create-api-key/1-api-key.png" alt="Select API keys" />

Click the purple **Create API Key** button. In the modal that appears, enter a name and click **Create Key** to create an API key.
Click the **Create API Key** button to create a Secure API Key.

<Screenshot url="https://fireworks.ai/" src="img/screenshots/30-fireworks-ai/2-create-api-key/2-create-api-key.png" alt="Create API key" />

When prompted, copy the API key to a safe location.
In the modal that appears, follow the steps to create an API key and when prompted, copy and paste it somewhere safe.
31 changes: 31 additions & 0 deletions docs/50-prepare-the-data/1-jupyter-notebooks.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 📘 Running Jupyter Notebooks in Google Colab

Jupyter Notebooks is an interactive Python environment. Cells in a Jupyter notebook are a modular unit of code or text that you can execute and view outputs for.

In this lab, we will use Colaboratory (a.k.a Colab) which is a hosted Jupyter Notebook service from Google.

To run a cell in Colab, hover over it and click the Run icon that appears against the cell.

<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/1-run-cell.png" alt="Run a cell" />

When a cell is running, you will see a loading spinner appear against the cell.

<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/2-running-cell.png" alt="A running cell" />

When a cell is finished running successfully, you will see green check mark appear against the cell.

<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/3-successful-cell.png" alt="Successful cell run" />

If an error occurred while running a cell, you will see an error traceback after the cell.

<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/4-error-in-cell.png" alt="Erroneous cell run" />

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

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

<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/5-interrupt-cell.png" alt="Interrupt cell run" />

:::warning
The UI might differ slightly if you are running Jupyter Notebooks outside of Google Colab. Refer to the appropriate documentation if running the notebook using a different service.
:::
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ mongodb_client[DB_NAME][COLLECTION_NAME]
collection.insert_many(embedded_docs)
```
</div>
</details>
</details>

To verify that the data has been imported into your MongoDB cluster, navigate to the **Overview** page in the Atlas UI. In the **Clusters section**, select your cluster and click **Browse collections**.

<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/50-prepare-the-data/5-ingest-data/1-browse-collections.png" alt="Browse collections" />

Ensure that you see a database called _mongodb_rag_lab_, and a collection named _knowledge_base_ under it. Note the number and format of documents in the collection.

<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/50-prepare-the-data/5-ingest-data/2-verify-collection.png" alt="Verify collection" />
10 changes: 9 additions & 1 deletion docs/60-perform-semantic-search/2-create-vector-index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ The answers for code blocks in this section are as follows:
collection.create_search_index(model=model)
```
</div>
</details>
</details>

To verify that the index was created, navigate to **Search Indexes** for the _knowledge_base_ collection.

<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/60-perform-semantic-search/2-create-vector-index/1-nav-search-indexes.png" alt="Navigate to search indexes" />

The index is ready to use once the status changes from **PENDING** to **READY**.

<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/60-perform-semantic-search/2-create-vector-index/2-index-ready.png" alt="Index ready to use" />
4 changes: 0 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ const config = {
favicon: `${favicon}`,
deploymentBranch: "gh-pages",
staticDirectories: ["static"],
i18n: {
defaultLocale: "en",
locales: ["en"],
},
customFields: {
startButtonTitle: `${startButtonTitle}`,
featureList: featureList,
Expand Down
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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.
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.
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.

0 comments on commit 52edbea

Please sign in to comment.