File size: 2,772 Bytes
0d6f188 7e976d8 0d6f188 7e976d8 7272627 f085e9b 7e976d8 | 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 | ---
license: apache-2.0
language:
- en
tags:
- lean
- openai
- math
- clustering
- code
size_categories:
- 100K<n<1M
---
# Dataset for OpenAI Lean Code grouping
### Published Lean code is clustered via combinatorial hierarchical clustering
This is graph based ***combinatorial clustering*** not a statistical clustering in k-means clustering.
This ***combinatorial clustering*** finds context and meaning among the data.
### Details
- Total Files in the Github repo is **122141**
- Total Lean code lines **22358566**
- Total Lines taken for Clustering **5000000**
- Total Documents taken for Clustering **25391**
- Number of Code Line Clusters generated **248289**
- Number of File Clusters generated **3131**
- Total Lines in these clusters **3628607**
- Total Docs in these clusters **24738**
- % of lines which are clustered **72%**
- % of docs which are clustered **97%**
### How to understand the data
- Finding similar contextual blocks allows the Lean code to be understood easily. Because the amount of generated code is so large that entire proofs can't be manually evaluated.
- Finding similarity allows for easier code understanding because contextual comparison links both different part of code, files and domins easily.
- Since this is LLM-generated Lean code for the mathematical proof, it will make tracing the reasoning or the method of LLM generation possible.
- Full contextual clustering will be updated soon.
## Method
1. The Lean code data is combined from all Lean code files in the GitHub repo.
1. The code data is fed to the Graph AI based combinatorial clustering method directly. No change.
1. The Graph AI compares the code lines via combinatorial clustering.
1. Resulting clusters of code lines.
## Uses
* Can be used understand how the Lean code is generated by LLMs.
## Schema
All files are **new line JSON** files. It could be loaded as **JSONL**
1. data_file.json - Base Data file
- doc_id - Unique ID for the file.
- data - data from lean code files.
- folder_name - folder name in which the Lean code file is located.
- domain_name - domain name from the folder name location.
- file_name - Lean code file name.
2. line_data.json - Contains lines used for Clustering
- doc_id - Unique ID
- line_id - Unique ID
- line - Actual Lean Code line as it is.
3. rows_clusters.json
- cluster_id - Unique ID denoting cluster.
- cluster - List of line_id that forms a conceptual cluster.
- confidence - Score of confidence showing how much these line_id are related.
4. docs_clusters.json
- cluster_id - Unique ID denoting cluster
- cluster - List of doc_id that forms a conceptual cluster.
- confidence - Score of confidence showing how much these doc_id are related. |