Skip to content

Commit 652ffc6

Browse files
committed
updated llama3 notebook
1 parent 10b8e63 commit 652ffc6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

recipes/use_cases/chatbots/RAG_chatbot/vectorstore/mongodb/rag_mongodb_llama3_huggingface_open_source.ipynb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
" or sign in to your existing Atlas account.\n",
2626
"\n",
2727
"2. [Follow the instructions](https://www.mongodb.com/docs/atlas/tutorial/deploy-free-tier-cluster/)\n",
28-
" (select Atlas UI as the procedure) to deploy your first cluster.\n",
28+
" (select Atlas UI as the procedure) to deploy your first cluster, which distributes your data across multiple servers for improved performance and redundancy.\n",
2929
"\n",
30-
"3. Create the database: `movies`.\n",
30+
"3. Create the database: `knowledge_base`, and collection `research_papers`\n",
3131
"\n",
3232
"\n"
3333
]
@@ -81,10 +81,13 @@
8181
"# Load Dataset\n",
8282
"from datasets import load_dataset\n",
8383
"import pandas as pd\n",
84+
"import os\n",
8485
"\n",
8586
"# Make sure you have an Hugging Face token(HF_TOKEN) in your development environemnt before runing the code below\n",
8687
"# How to get a token: https://huggingface.co/docs/hub/en/security-tokens\n",
8788
"# Dataset Location: https://huggingface.co/datasets/MongoDB/subset_arxiv_papers_with_embeddings\n",
89+
"os.environ[\"HF_TOKEN\"] = \"place_hugging_face_access_token here\" # Do not use this in production environment, use a .env file instead\n",
90+
"\n",
8891
"dataset = load_dataset(\"MongoDB/subset_arxiv_papers_with_embeddings\")\n",
8992
"\n",
9093
"# Convert the dataset to a pandas dataframe\n",
@@ -662,8 +665,8 @@
662665
"mongo_client = get_mongo_client(mongo_uri)\n",
663666
"\n",
664667
"# Ingest data into MongoDB\n",
665-
"db = mongo_client['movies']\n",
666-
"collection = db['movie_collection_2']"
668+
"db = mongo_client['knowledge_base']\n",
669+
"collection = db['research_papers']"
667670
]
668671
},
669672
{

0 commit comments

Comments
 (0)