Multilingual Code Files for Evaluating Chunking Algorithms
Cocha is a dataset of source code files from popular GitHub repositories across multiple programming languages, designed to evaluate how well chunking algorithms handle code with its unique structure and syntax.
This dataset tests chunking algorithms on:
| Field | Description |
|---|---|
id | Unique identifier |
text | Full source code content |
lang | Programming language |
path | File path in repository |
repository_name | Source repository |
| Field | Description |
|---|---|
doc_id | Reference to corpus document |
path | File path |
lang | Programming language |
repository_name | Source repository |
question | Question about the code |
answer | Answer to the question |
chunk-must-contain | Code passage that must be in the retrieved chunk |
from datasets import load_dataset
# Load corpus
corpus = load_dataset("chonkie-ai/cocha", "corpus", split="train")
# Load questions
questions = load_dataset("chonkie-ai/cocha", "questions", split="train")
Cocha is part of the Massive Text Chunking Benchmark (MTCB), a comprehensive benchmark for evaluating RAG chunking strategies.
CC-BY-4.0
8 commits
Multilingual Code Files for Evaluating Chunking Algorithms
Cocha is a dataset of source code files from popular GitHub repositories across multiple programming languages, designed to evaluate how well chunking algorithms handle code with its unique structure and syntax.
This dataset tests chunking algorithms on:
| Field | Description |
|---|---|
id | Unique identifier |
text | Full source code content |
lang | Programming language |
path | File path in repository |
repository_name | Source repository |
| Field | Description |
|---|---|
doc_id | Reference to corpus document |
path | File path |
lang | Programming language |
repository_name | Source repository |
question | Question about the code |
answer | Answer to the question |
chunk-must-contain | Code passage that must be in the retrieved chunk |
from datasets import load_dataset
# Load corpus
corpus = load_dataset("chonkie-ai/cocha", "corpus", split="train")
# Load questions
questions = load_dataset("chonkie-ai/cocha", "questions", split="train")
Cocha is part of the Massive Text Chunking Benchmark (MTCB), a comprehensive benchmark for evaluating RAG chunking strategies.
CC-BY-4.0
8 commits