Download README.md from MongoDB/mongodb-docs-chunked: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/datasets/MongoDB/mongodb-docs-chunked/resolve/main/README.md
- Command line
-
hf download hf://datasets/MongoDB/mongodb-docs-chunked/README.md
-
curl -L -o README.md https://huggingface.co/datasets/MongoDB/mongodb-docs-chunked/resolve/main/README.md
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
pymongooratlas-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 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.
Ingest Data
To experiment with this dataset using MongoDB Atlas, first create a MongoDB Atlas account.
You can then use the following script to load this dataset into your MongoDB Atlas cluster:
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")