Pith. sign in

REVIEW 2 cited by

Prompting Is Programming: A Query Language for Large Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2212.06094 v3 pith:3KX5UYSH submitted 2022-12-12 cs.CL cs.AI

classification cs.CLcs.AI
keywords languagemodelpromptingtasksmodelsimplementapisconstraints
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Large language models have demonstrated outstanding performance on a wide range of tasks such as question answering and code generation. On a high level, given an input, a language model can be used to automatically complete the sequence in a statistically-likely way. Based on this, users prompt these models with language instructions or examples, to implement a variety of downstream tasks. Advanced prompting methods can even imply interaction between the language model, a user, and external tools such as calculators. However, to obtain state-of-the-art performance or adapt language models for specific tasks, complex task- and model-specific programs have to be implemented, which may still require ad-hoc interaction. Based on this, we present the novel idea of Language Model Programming (LMP). LMP generalizes language model prompting from pure text prompts to an intuitive combination of text prompting and scripting. Additionally, LMP allows constraints to be specified over the language model output. This enables easy adaption to many tasks while abstracting language model internals and providing high-level semantics. To enable LMP, we implement LMQL(short for Language Model Query Language), which leverages the constraints and control flow from an LMP prompt to generate an efficient inference procedure that minimizes the number of expensive calls to the underlying language model. We show that LMQL can capture a wide range of state-of-the-art prompting methods in an intuitive way, especially facilitating interactive flows that are challenging to implement with existing high-level APIs. Our evaluation shows that we retain or increase the accuracy on several downstream tasks, while also significantly reducing the required amount of computation or cost in the case of pay-to-use APIs (26-85% cost savings).

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. NVIDIA-labs OO Agents: Native Python Object-Oriented Agents

    cs.AI 2026-07 conditional novelty 6.0 of 10

    A Python object-oriented agent framework (NOOA) lets methods, state, docstrings and type annotations serve as the LLM interface, and achieves strong results on agentic benchmarks.

  2. XML Prompting as Grammar-Constrained Interaction: Fixed-Point Semantics, Convergence Guarantees, and Human-AI Protocols

    cs.PL 2025-09 reject novelty 4.0 of 10

    XML prompting is formalized as fixed-point iteration over an XML-tree lattice, with convergence claimed via Knaster-Tarski and Banach theorems, plus example XML recipe templates.

Pith tools