﻿# CoNaLa: separate curated and mined code intent pairs

Separate CoNaLa curated and mined intent-code pairs, use rewritten intents correctly, and keep question ancestry out of generation-test training data.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-conala-mined-curated-distinction/
Language: en

## Name the curated or mined artifact

The [official CoNaLa page](https://conala-corpus.github.io/) identifies Corpus v1.1 and distinguishes manually curated Python intent/snippet pairs from a larger automatically mined candidate collection. These are not interchangeable confidence levels of one uniformly annotated split. Keep the artifact name and its question ancestry when combining them. A curated evaluation example should not become ordinary mined pretraining text merely because a separate export stores the same source question under a different local row identifier.

## Use the intended natural-language input

Curated records distinguish the original question title, `intent`, from `rewritten_intent`, which incorporates details such as identifiers and arguments to express the selected snippet more precisely. The organizers specify the rewritten field as challenge input. Comparing systems using different fields changes the amount of information supplied to generation. The [original mining paper](https://arxiv.org/pdf/1805.08949.pdf) explains the collection and curation process. Preserve both descriptions and their roles in [provenance metadata](/journal/document-markdown-json-provenance/) rather than overwriting the original title during preprocessing.

## Treat mined probabilities as provenance

Mined records retain `question_id`, `parent_answer_post_id`, pair `id`, `intent`, `snippet`, and `prob`. The probability comes from the mining model; it is neither an execution result nor an independently calibrated guarantee of relevance for another task. An editorial experiment can compare confidence-filtered training subsets, but must report the retained population and avoid choosing thresholds through test performance. A candidate solution may also rely on imports, objects, or library behavior omitted from a short snippet.

## Preserve organizer preprocessing and scoring choices

The [official baseline repository](https://github.com/conala-corpus/conala-baseline) supplies preprocessing and a sequence-to-sequence training/evaluation workflow. Use its recorded preparation when reproducing the challenge, and label alternative canonicalization or execution tests as additional protocols. Tokenized BLEU captures overlap with the reference; it does not prove semantic equivalence or safe execution. A missing import or wrong argument can matter despite similar tokens. Conversely, another valid implementation can receive less overlap. Keep raw generated snippets alongside transformed evaluation text for interpretable error analysis.

## Exclude whole test-question families

The organizers allow external sources while explicitly excluding information from test questions, including when using StaQC. Apply [leakage controls](/journal/document-level-data-split-leakage/) to question and answer ancestry before deduplicating normalized snippets. Pure string filtering can miss a rewritten title or another block from the same post. CoNaLa is useful for controlled natural-language-to-Python snippet generation. Its curated intent does not specify a complete application, and the finite reference collection does not establish correctness for every environment, dependency version, or equivalent solution.
