馃憪 Create the agent's knowledge base
One of the tools that the AI research agent has access to is a question-answering tool that retrieves information from a knowledge base (MongoDB collection) and uses it to answer questions. But first, we need to create the knowledge base.
Fill in any <CODE_BLOCK_N>
placeholders and run the cells under the Step 3: Create a knowledge base section in the notebook to download a dataset of Arxiv papers from Hugging Face and ingest it into a MongoDB collection which will serve as our agent's knowledge base.
The answers for code blocks in this section are as follows:
CODE_BLOCK_4
Answer
MongoClient(MONGODB_URI)
CODE_BLOCK_5
Answer
client[DB_NAME][COLLECTION_NAME]
CODE_BLOCK_6
Answer
collection.delete_many({})
CODE_BLOCK_7
Answer
collection.insert_many(records)