File size: 4,199 Bytes
b8dc0ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd4803c
b8dc0ef
fd4803c
 
b8dc0ef
 
 
 
 
bf5a484
db9fef0
 
 
 
 
b8dc0ef
510caad
b8dc0ef
510caad
 
 
 
 
e4fb011
 
 
3706ed7
e4fb011
 
 
 
6b47672
e4fb011
 
cc21227
e4fb011
 
 
 
 
cc21227
510caad
cc21227
510caad
cc21227
510caad
 
cc21227
 
e4fb011
 
510caad
ac28f10
 
 
510caad
ac28f10
ac7ce15
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
dataset_info:
  features:
  - name: repo
    dtype: string
  - name: docfile_name
    dtype: string
  - name: doc_type
    dtype: string
  - name: intent
    dtype: string
  - name: license
    dtype: string
  - name: path_to_docfile
    dtype: string
  - name: relevant_code_files
    sequence: string
  - name: relevant_code_dir
    dtype: string
  - name: target_text
    dtype: string
  - name: relevant_code_context
    dtype: string
  splits:
  - name: test
    num_bytes: 227163668
    num_examples: 216
  download_size: 30375843
  dataset_size: 227163668
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
license: apache-2.0
task_categories:
- text-generation
- summarization
language:
- en
---
# 🏟️ Long Code Arena (Module summarization)

This is the benchmark for Module summarization task as part of the
🏟️ [Long Code Arena benchmark](https://huggingface.co/spaces/JetBrains-Research/long-code-arena). 
The current version includes 216 manually curated text files describing different documentation of open-source permissive Python projects. 
The model is required to generate such description, given the relevant context code and the intent behind the documentation.
All the repositories are published under permissive licenses (MIT, Apache-2.0, BSD-3-Clause, and BSD-2-Clause). The datapoints can be removed upon request.

## How-to

Load the data via [`load_dataset`](https://huggingface.co/docs/datasets/v2.14.3/en/package_reference/loading_methods#datasets.load_dataset):

    ```
    from datasets import load_dataset

    dataset = load_dataset("JetBrains-Research/lca-module-summarization")
    ```

## Datapoint Structure

Each example has the following fields:

|         **Field**           |             **Description**              |
|:---------------------------:|:----------------------------------------:|
|           `repo`            |            Name of the repository            |
|        `target_text`        |          Text of the target documentation file          |
|       `docfile_name`        |     Name of the file with target documentation    |
|          `intent`           |        One sentence description of what is expected in the documentation       |
|         `license`           |          License of the target repository          |
|    `relevant_code_files`    |      Paths to relevant code files (files that are mentioned in target documentation)      |
|     `relevant_code_dir`     |      Paths to relevant code directories  (directories that are mentioned in target documentation)      |
|      `path_to_docfile`      |      Path to file with documentation (path to the documentation file in source repository)    |
|   `relevant_code_context`   |          Relevant code context collected from relevant code files and directories          |


**Note**: you may collect and use your own relevant context. Our context may not be suitable. Zipped repositories can be found the `repos` directory.

## Metric

To compare the predicted documentation and the ground truth documentation, we introduce the new metric based on LLM as an assessor. Our approach involves feeding the LLM with relevant code and two versions of documentation: the ground truth and the model-generated text. The LLM evaluates which documentation better explains and fits the code. To mitigate variance and potential ordering effects in model responses, we calculate the probability that the generated documentation is superior by averaging the results of two queries with the different order.

For more details about metric implementation, please refer to [our GitHub repository](https://github.com/JetBrains-Research/lca-baselines).

## Citing
```
@article{bogomolov2024long,
  title={Long Code Arena: a Set of Benchmarks for Long-Context Code Models},
  author={Bogomolov, Egor and Eliseeva, Aleksandra and Galimzyanov, Timur and Glukhov, Evgeniy and Shapkin, Anton and Tigina, Maria and Golubev, Yaroslav and Kovrigin, Alexander and van Deursen, Arie and Izadi, Maliheh and Bryksin, Timofey},
  journal={arXiv preprint arXiv:2406.11612},
  year={2024}
}
```
You can find the paper [here](https://arxiv.org/abs/2406.11612).