# Sketch-Guided Constrained Decoding for Boosting Blackbox Large Language Models without Logit Access

Source: [Sketch-Guided Constrained Decoding for Boosting Blackbox Large Language Models without Logit Access](<https://www.sota2.com/research/paper/68fa74351e209131cea6073b>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-01-04T04:39:05.193Z

Authors: Saibo Geng, Berkay D\\"oner, Chris Wendler, Martin Josifoski, Robert West

Published: 2024-01-18T13:31:24.000Z

## Abstract

Constrained decoding, a technique for enforcing constraints on language model outputs, offers a way to control text generation without retraining or architectural modifications. Its application is, however, typically restricted to models that give users access to next-token distributions (usually via softmax logits), which poses a limitation with blackbox large language models (LLMs). This paper introduces sketch-guided constrained decoding (SGCD), a novel approach to constrained decoding for blackbox LLMs, which operates without access to the logits of the blackbox LLM. SGCD utilizes a locally hosted auxiliary model to refine the output of an unconstrained blackbox LLM, effectively treating this initial output as a "sketch" for further elaboration. This approach is complementary to traditional logit-based techniques and enables the application of constrained decoding in settings where full model transparency is unavailable. We demonstrate the efficacy of SGCD through experiments in closed information extraction and constituency parsing, showing how it enhances the utility and flexibility of blackbox LLMs for complex NLP tasks.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Constituency Parsing on Penn Treebank shortest 25% of samples \< 128 tokens (test)](<https://www.sota2.com/research/sota/constituency-parsing-on-penn-treebank-shortest-25-percent-of-samples-128-tokens-test.md>): Constituency Parsing; Penn Treebank shortest 25% of samples \< 128 tokens (test); Bracket Precision: 75.8.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2401.09967>)

[PDF](<https://arxiv.org/pdf/2401.09967.pdf>)

[Implementation](<https://github.com/epfl-dlab/SketchGCD>)
