INQUIRING LINE

Could giving an AI a toolbox of ready-made code pieces make it better at writing programs that actually run?

Can helper libraries reduce complexity of generating executable programs from text?

This explores whether giving a model a ready-made set of building blocks (helper functions, libraries, tools) makes it easier to turn a plain-language request into code that actually runs. It does not look at the narrower case of a single benchmark for text-to-code.


This explores whether a model has an easier time turning plain-language requests into working programs when it can lean on existing building blocks rather than writing everything from scratch. The corpus has no paper that tests helper libraries for text-to-code head-on. Several notes still come at the same idea from different directions, and together they suggest the answer is mostly yes, with one catch: someone has to build the library first.

The clearest case comes from formal mathematics, where turning a written proof into machine-checkable code is a kind of program generation. Can autoformalization work statement by statement? argues that translating one theorem at a time is the wrong frame. Most of the real work goes into building the library underneath: the definitions, the axioms and the small lemmas. Formalizing the Kepler conjecture took 11 years, and most of that went into this groundwork. Once the library exists, each new statement is much easier to write. Without it, every translation starts from nothing. The library doesn't remove the complexity. It moves it somewhere it can be reused.

A related line of work asks what happens when the 'library' is a live code environment instead of a set of functions. Do tools actually expand what language models can reason about? gives a formal proof that access to tools lets a model use strategies that would be impossible, or absurdly long, if written out in text. Can models treat long prompts as external code environments? applies the same idea to long inputs. It puts the prompt inside a Python REPL and lets the model query it with code, which lets models handle inputs about 100 times longer than their context window. In both cases the model gets simpler because it hands work off to something outside itself.

The notes on function calling point to where things still break. Can small models match large models on function calling? finds that small models can call functions accurately, but they mostly fail on strict output formats, and fixing that needed training on examples of what wrong output looks like. So a library makes generation shorter, but it adds a new skill: calling the library's interface exactly right. Can long-context LLMs replace retrieval-augmented generation systems? gives a contrast. Models that try to do structured work like table joins 'in their heads' fail, which is the kind of gap that query code or a database tool usually fills.

The point you might not expect: a library helps only as far as the model's knowledge of it goes. The accessibility studies show this from the other side. Do large language models write more accessible web code than humans? and Can feeding accessibility violations back into code generation improve results? find that models get the simple, well-documented patterns right but miss the subtle rules (ARIA attributes, keyboard focus). Even repeated checker feedback doesn't fully fix this. Packaging expert knowledge into a library or a checker cuts down the easy complexity, but the subtle requirements still have to be designed into it by someone who understands them.


Sources 7 notes

Can autoformalization work statement by statement?

Real formalization demands constructing entire interdependent libraries of axioms, definitions, and lemmas—not just translating single theorems. The Kepler conjecture formalization took 11 years mostly building this scaffolding.

Do tools actually expand what language models can reason about?

Formal proof shows tool-integrated reasoning enables strategies impossible or prohibitively verbose in text alone, expanding both empirical and feasible support. The advantage spans abstract reasoning, not just arithmetic, and Advantage Shaping Policy Optimization stabilizes training without reward distortion.

Can models treat long prompts as external code environments?

Recursive Language Models store long prompts in a Python REPL and query them via code execution, avoiding attention degradation. RLMs outperform base models even on shorter prompts while handling inputs two orders of magnitude beyond context windows.

Can small models match large models on function calling?

Small models fine-tuned via DPO on correct and incorrect function-calling examples from a large teacher model achieve high accuracy on logical and mathematical tasks. DPO's explicit negative examples directly target the rigid output format failures where SFT alone underperforms.

Can long-context LLMs replace retrieval-augmented generation systems?

The LOFT benchmark shows LCLMs match RAG on semantic retrieval without explicit training, but cannot execute relational queries requiring joins across structured tables. Context length alone cannot bridge this gap.

Show all 7 sources
Do large language models write more accessible web code than humans?

GPT-4o and Qwen2.5-Coder outperformed human developers on contrast and alt text but struggled with ARIA attributes. Both models produced code that passed surface-level automated checks while missing deeper semantic requirements.

Can feeding accessibility violations back into code generation improve results?

FeedA11y's ReAct-based feedback loop significantly outperforms zero-shot, few-shot, and self-criticism prompting by iteratively feeding evaluator results back into generation. However, it still struggles with nuanced ARIA constraints like keyboard navigation and focus management, suggesting evaluator feedback alone cannot substitute for domain expertise.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.