--- license: cc-by-3.0 task_categories: - question-answering language: - en tags: - vector search - retrieval augmented generation size_categories: - <1K --- ## Overview This dataset consists of chunked and embedded versions of a small subset of MongoDB's technical documentation. It contains 795 chunks from 498 documentation pages, sampled from 50 documentation sources. ## Dataset Structure The dataset consists of the following fields: - chunk_id: Unique identifier for the chunk. - page_id: Identifier of the documentation page the chunk came from. - source_name: The documentation source, such as `pymongo` or `atlas-cli`. - product_name: The product the page documents, when available. - url: Link to the documentation page. - title: Title of the documentation page. - text: Content of the chunk in Markdown format. - embedding: The embedding of the chunk's content, created using Voyage AI's [voyage-4-large](https://www.mongodb.com/docs/voyageai/models/text-embeddings/) model with 1024 dimensions and `input_type="document"`. Pages were split into chunks of up to ~2,000 tokens at Markdown heading boundaries. Because the Voyage 4 models share an embedding space, you can embed queries for this dataset with `voyage-4-large`, `voyage-4`, or `voyage-4-lite`. ## Usage This dataset can be useful for prototyping RAG applications. It is derived from [mongodb-eai/docs](https://huggingface.co/datasets/mongodb-eai/docs). ## Ingest Data To experiment with this dataset using MongoDB Atlas, first [create a MongoDB Atlas account](https://www.mongodb.com/cloud/atlas/register?utm_campaign=devrel&utm_source=community&utm_medium=organic_social&utm_content=Hugging%20Face%20Dataset&utm_term=apoorva.joshi). You can then use the following script to load this dataset into your MongoDB Atlas cluster: ```python import os from datasets import load_dataset from pymongo import MongoClient client = MongoClient(os.environ["MONGODB_URI"]) collection = client["your_database_name"]["mongodb_docs"] dataset = load_dataset("MongoDB/mongodb-docs-chunked", split="train") collection.insert_many(dataset.to_list()) print(f"Ingested {len(dataset)} documents") ```