OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Coding Tools

Monitors4Codegen

Monitors4Codegen is an open-source research repository containing code and data for Monitor-Guided Decoding, a method that uses static analysis of repository context to guide code language-model generation. It includes Java-focused datasets, model inference results, evaluation scripts and implementations of monitors for code properties.

Independent OpenViST project profile, based on linked sources.

Monitors4Codegen — 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 the repository when you want research artifacts for investigating or evaluating static-analysis-guided code generation, especially repository-context Java completion. Use the separate multilspy repository for its migrated language-server client library.

Who it is for

  • Researchers examining repository-context code completion and monitor-guided decoding.
  • Developers investigating static-analysis signals for code generation.
  • Practitioners evaluating language-model completions against compilation and code-matching measures.

Documented uses

  • Study code-completion examples that use repository-level context.
  • Evaluate supplied model inferences with compilation-rate and code-match metrics.
  • Inspect monitor implementations for properties such as valid dereferences and method-call argument counts.
  • Explore language-server queries through the separately maintained multilspy library.
Before you choose

Requirements & limits

The GitHub repository is public and licensed under MIT. The README specifies Python 3.10 for its experiments.

  • The datasets and completion examples focus on Java repository context.
  • Evaluation scripts measure compilation rate alongside identifier and prefix matches.
  • The README's model inference results are stored with Git LFS.
  • The multilspy library has migrated to a separate repository.

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

Evaluate supplied DotPrompts inference results

Generate evaluation figures, tables and a report from the repository's inference results and PragmaticCode file contents.

Before you start

  • Python 3.10 is the version used in the experiments.
  • Install the packages listed in requirements.txt.
  • The inference results CSV and datasets/PragmaticCode/fileContentsByRepo.json.
  • Git LFS setup may be needed to obtain the inference results CSV after cloning.

Steps

  1. Create and activate a Python virtual environment using venv or conda.

  2. Install the evaluation dependencies with pip3 install -r requirements.txt.

  3. Run python3 evaluation_scripts/eval_results.py inference_results/dotprompts_results.csv datasets/PragmaticCode/fileContentsByRepo.json results/.

Expected outcome

The output directory contains evaluation figures and tables, plus a Report.md connecting figures to paper sections.

Guide limitations

  • The recipe evaluates supplied inference results; it does not generate new model outputs.
  • The inference-results CSV is stored using Git LFS and may not be present locally without Git LFS setup.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
microsoft/monitors4codegen · Official homepage title · retained in its source language