﻿# APPS: respect programming-problem input protocols

Match APPS generated programs to the correct call-based or standard-input protocol, preserving execution outcomes and test comparison behavior.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-apps-stdin-stdout-protocol/
Language: en

## Recognize a program-level coding challenge

APPS studies programming problems requiring generated code to solve a stated task. The [research paper](https://arxiv.org/abs/2105.09938) frames coding-challenge competence beyond a single small completion format. The [authors' repository](https://github.com/hendrycks/apps) supplies training and evaluation code and links the released collection. Preserve problem identity and partition when adapting it to another runner. An evaluation of selected easy examples should be described as that subset, not as a result for the entire benchmark.

## Select the required input protocol

The [official testing implementation](https://github.com/hendrycks/apps/blob/main/eval/testing_util.py) distinguishes call-based tasks from standard-input tasks using the presence of `fn_name` in input/output metadata. In the call-based path it invokes the named method with arguments; the standard-input path supplies text through input-reading interfaces and captures output. A function that returns the right value can fail a task requiring printed output, while a script can fail when the runner expects a callable. This mismatch is an interface error worth diagnosing separately from a wrong algorithm.

## Preserve parsing and comparison behavior

The implementation handles serialized input/output values and includes several comparison paths, including whitespace processing and numeric comparisons. Replacing it with a single raw-string equality check changes the acceptance criterion. Conversely, copying only the most permissive comparison can accept outputs the intended runner would reject. Pin the evaluator revision and document any deliberate deviation. Keep the transformation from statement and starter code to the actual prompt in a [provenance record](/journal/document-markdown-json-provenance/) so interface assumptions remain inspectable.

## Distinguish execution categories before aggregation

The tester records compilation errors, runtime failures, and per-case success separately. Preserve these outcomes instead of dropping tasks whose execution did not complete. Test-case accuracy and the fraction of problems passing every case answer different questions. An editorial report can show whether errors concentrate in parsing, time limits, missing entry points, or incorrect results. Those categories are proposed explanations for a local run, not invented official measurements. A reference solution is useful for checking the runner but should not enter a model's test prompt accidentally.

## Keep environment and exposure in scope

The released code explicitly warns that its reliability guard is not a security sandbox. Execution evaluation requires a suitably isolated environment and recorded dependencies; this profile does not execute candidate programs. Retain supplied train/test membership, and use [deduplication and memorization checks](/journal/training-deduplication-memorization/) when public statements or solutions may have entered training elsewhere. APPS is useful for examining algorithmic program generation under a defined protocol. Passing released cases is evidence within that protocol, not proof of correctness on every valid input or ability to maintain a real software project.
