ajosh0504 commited on
Commit
f7621c2
·
verified ·
1 Parent(s): fc1c7fc

Add MongoDB docs chunks embedded with voyage-4-large

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +56 -0
  3. mongodb_docs_voyage_4_large.json +3 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ mongodb_docs_voyage_4_large.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-3.0
3
+ task_categories:
4
+ - question-answering
5
+ language:
6
+ - en
7
+ tags:
8
+ - vector search
9
+ - retrieval augmented generation
10
+ size_categories:
11
+ - <1K
12
+ ---
13
+
14
+ ## Overview
15
+
16
+ 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.
17
+
18
+ ## Dataset Structure
19
+
20
+ The dataset consists of the following fields:
21
+
22
+ - chunk_id: Unique identifier for the chunk.
23
+ - page_id: Identifier of the documentation page the chunk came from.
24
+ - source_name: The documentation source, such as `pymongo` or `atlas-cli`.
25
+ - product_name: The product the page documents, when available.
26
+ - url: Link to the documentation page.
27
+ - title: Title of the documentation page.
28
+ - text: Content of the chunk in Markdown format.
29
+ - 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.
30
+
31
+ 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`.
32
+
33
+ ## Usage
34
+
35
+ This dataset can be useful for prototyping RAG applications. It is derived from [mongodb-eai/docs](https://huggingface.co/datasets/mongodb-eai/docs), and was built with [this script](https://github.com/mongodb-developer/GenAI-Showcase/tree/main/partners/openrouter/reliability-patterns/scripts/build_dataset.py).
36
+
37
+ ## Ingest Data
38
+
39
+ 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).
40
+
41
+ You can then use the following script to load this dataset into your MongoDB Atlas cluster:
42
+
43
+ ```python
44
+ import os
45
+
46
+ from datasets import load_dataset
47
+ from pymongo import MongoClient
48
+
49
+ client = MongoClient(os.environ["MONGODB_URI"])
50
+ collection = client["your_database_name"]["mongodb_docs_voyage_4_large"]
51
+
52
+ dataset = load_dataset("MongoDB/mongodb-docs-voyage-4-large", split="train")
53
+ collection.insert_many(dataset.to_list())
54
+
55
+ print(f"Ingested {len(dataset)} documents")
56
+ ```
mongodb_docs_voyage_4_large.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7985d43559f567db1cc0175d0e7b8a4cf86b2c7fc69e9c1541847ffab63875f9
3
+ size 22292835