# Toward Interactive Understanding of Code APIs

*Dhananjay Ashok, Jesse Thomason, Jonathan May*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/139380) · [OpenReview](https://openreview.net/forum?id=Tua6AP83Su) · [alphaXiv](https://www.alphaxiv.org/abs/2609.32081) · [Open on the map](../papers.html#p139380)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [Software Engineering Benchmarks](../pgroup/646.md) · Type: benchmark or dataset · Keywords: interactive code understanding, black-box API, exploration, asymmetric actor critic, benchmark

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Verification › Coding agent benchmarks; [AI Agents](../areas/agents.md) › Agent Benchmarking › Coding agent benchmarks; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Coding Agent Evaluation; [Benchmarks for LLMs & Agents](../areas/bench-llm-agents.md) › Cross-Domain Agent Evaluation › Software Engineering Benchmarks

## Summary
We introduce the PAU benchmark for interactive code API understanding and improve exploration via an AAC-based post-training recipe.

## Explained to a 5-year-old
We made a game where a robot tries to guess what a hidden computer function does by asking it questions and watching its answers. The robot sometimes thinks it knows the answer too soon, so it stops asking. We taught the robot to ask more questions, like a teacher helps a child learn.

## Explained to a 5-year-old, longer
Imagine you have a magic box that does something, but you can’t open it to see its insides. You can only give it numbers or words and see what comes out. The goal is to figure out what the box really does. In this project, we made a special set of these boxes called PAU, which are real Python functions you can talk to. We let computer programs talk to the boxes, asking them questions and watching the answers. Some smart computer programs are good at this, but many still make mistakes because they think they know the answer before they really do. To help them, we used a trick from robot learning called asymmetric actor critic, which encourages the programs to keep asking more questions and exploring more. After we taught them this trick, one of the smaller programs (Qwen3-8-B) became as good as a bigger program (GPT-5-mini) at figuring out the hidden functions. This helps people build smarter tools that can work with real-world software without seeing its source code.

## For a technical reader
The paper presents a benchmark (PAU) where models must interact with black-box Python APIs to infer their behavior. It highlights that existing models are overconfident, leading to insufficient exploration. To address this, the authors adopt an asymmetric actor-critic post-training scheme that encourages more active querying. Experiments show that even state-of-the-art models struggle (Claude-4-Opus misses >45% of cases), while an AAC-tuned Qwen3-8-B matches GPT-5-mini performance, demonstrating the effectiveness of the proposed training approach.

## Problem
Existing code understanding approaches assume direct access to source code, which is unavailable for external APIs, making it difficult to infer functionality without inspecting the code.

## Method
The approach creates a benchmark where models interact with black-box Python APIs by sending exploratory inputs and observing outputs to infer functionality, and augments training with an asymmetric actor-critic scheme to encourage active exploration.

## Results
Even the best model (Claude-4-Opus) fails to understand over 45% of the PAU test set, and an AAC-inspired post-training improves exploration, enabling a Qwen3-8-B model to match GPT-5-mini performance.

## Contributions
A benchmark for interactive code API understanding that requires models to explore black-box APIs, and an asymmetric actor-critic post-training technique that enhances exploration and performance.

## Practical relevance
Enables developers and AI agents to understand and use external APIs without source code, improving software integration and automation.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/139380)
