OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Coding Tools

Docprompting

Docprompting is an Apache-2.0-licensed research implementation and dataset repository for generating code by retrieving relevant documentation for a natural-language intent.

Independent OpenViST project profile, based on linked sources.

Docprompting — OpenViST project profile in AI Coding Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Docprompting when you want to explore or prototype a code-generation workflow that retrieves library documentation before generation, or examine the associated benchmarks and models.

Who it is for

  • Researchers studying documentation-grounded code generation.
  • Developers prototyping retrieval-and-generation pipelines or working with the project’s benchmarks.

Documented uses

  • Retrieve documentation passages relevant to a natural-language coding request.
  • Generate code conditioned on the request and retrieved documentation.
  • Access and evaluate the project’s TLDR and CoNaLa natural-language-to-code datasets.
Before you choose

Requirements & limits

The code repository is public and licensed under Apache-2.0. The documented implementation uses Python and identifies Linux as a platform.

  • Retrieval is an explicit stage: relevant documentation is supplied to the code generator alongside the natural-language intent.
  • The repository describes sparse BM25 retrieval and FiD T5 generation for TLDR, and dense CodeT5 retrieval and FiD CodeT5 generation for CoNaLa.
  • The README includes a Hugging Face Transformers example using a TLDR GPT-Neo model; other listed models require customized repository implementations.
  • Reproducing the paper’s results requires downloading the project data and trained generator weights.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run dense document retrieval for CoNaLa

Run the documented trained SimCSE-based retriever to retrieve documentation for CoNaLa natural-language inputs.

Before you start

  • CoNaLa data and the repository’s expected files, including data/conala/conala_nl.txt and data/conala/python_manual_firstpara.tok.txt.
  • The trained model neulab/docprompting-codet5-python-doc-retriever.
  • The repository code and its runtime dependencies.

Steps

  1. Run the command below with --model_name neulab/docprompting-codet5-python-doc-retriever, the documented CoNaLa source and target files, and the documented embedding-save paths.

    Documented command
    python retriever/simcse/run_inference.py
  2. Set --sim_func cls_distance.cosine, --num_layers 12, and --save_file data/conala/retrieval_results.json as shown in the README.

  3. Use the resulting retrieval file as the retrieved-document input to a generation stage; the README lists separate generation sections and a TLDR example script.

Expected outcome

Retrieval results are saved to `data/conala/retrieval_results.json`.

Guide limitations

  • The README notes that embedding normalization can affect retrieval results and that --normalize_embed was selected using a validation set; it does not give a universally preferred setting.
  • The documented inference command concerns retrieval only; it does not provide a complete CoNaLa generation command in the available instructions.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
shuyanzhou/docprompting · Official homepage title · retained in its source language