Skip to content

Validate Pro

Leetcode-QC/validate-pro/ is the controlled-AI differential validation layer for generated LeetCode solutions.

Differential validation means the project does not only trust one generated solution. It asks gpt-oss:120b to design one additional edge-case candidate at a time, uses local Python reference adapters to calculate the expected answer, stores only verified JSON cases, and then runs a larger Docker validation set against generated Markdown solutions.

Docs:

  • specs/PRD.md
  • specs/PRD.cn.md

Generate Cases

PYTHONPATH=Leetcode-QC/validate-pro/src python Leetcode-QC/validate-pro/generate_cases.py --repo-root . --frontend-ids 1 20 121

Validate Retained Cases

PYTHONPATH=Leetcode-QC/validate-pro/src python Leetcode-QC/validate-pro/run_validation.py --repo-root .

Docker Compose

docker compose -f Leetcode-QC/validate-pro/compose.yaml build
docker compose -f Leetcode-QC/validate-pro/compose.yaml run --rm validate-pro

Generate retained cases through Compose:

docker compose -f Leetcode-QC/validate-pro/compose.yaml run --rm generate-cases

Artifacts

Leetcode-QC/validate-pro/cases/
Leetcode-QC/validate-pro/reports/
Leetcode-QC/validate-pro/work/

reports/ stores local audit results produced by each run.

reports/adapter_support.md and reports/adapter_support.cn.md list the adapter support matrix for the selected dataset. reports/generation_audit.md and reports/generation_audit.cn.md summarize retained cases, unsupported problem kinds, rejected candidates, and failure reasons.

File Tree

Leetcode-QC/
  validate-pro/
    specs/
      PRD.md
      PRD.cn.md
    src/
      validate_pro/
        adapters/
        case_store.py
        dataset.py
        llm_case_generator.py
        markdown.py
        prompt_builder.py
        reference.py
        report.py
  tests/
    unit/
    integration/
    smoke/
    generate_cases.py
    run_validation.py
    Dockerfile
    requirements.txt