SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.emnlp-main.965 · EMNLP · 2025

ACING: Actor-Critic for Instruction Learning in Black-Box LLMs

Marco Canini, Fares Fourati, Salma Kharrat

Open in the Atlas

Code that ran

7 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2025.emnlp-main.965.json · badge: /api/ran/2025.emnlp-main.965.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
salmakh1/ACING canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
create_split Ran
ran on a synthesized input
salmakh1/ACING/Induction/automatic_prompt_engineer/data.py
code served (permissive licence) · get_code("fa3f515bdc225dc1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

torch_seed = 0

# Create sample data - tuple of two lists (inputs, outputs)
inputs = ['input_0', 'input_1', 'input_2', 'input_3', 'input_4']
outputs = ['output_0', 'output_1', 'output_2', 'output_3', 'output_4']
data = (inputs, outputs)

# Define split_size
split_size = 3

ARGS = {
    'data': data,
    'split_size': split_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dispatch_openai_requests Ran
ran on a synthesized input
salmakh1/ACING/Induction/automatic_prompt_engineer/llm.py
code served (permissive licence) · get_code("dab4b7dd14eef40b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import openai
import asyncio
from typing import Any

# Mock the openai module to avoid actual API calls
class MockChatCompletion:
    @staticmethod
    async def acreate(**kwargs):
        # Return a mock response
        return {"choices": [{"message": {"content": "Mock response"}}]}

# Replace openai.ChatCompletion with our mock
openai.ChatCompletion = MockChatCompletion()

# Construct the arguments
ARGS = {
    "messages_list": [
        [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Hello, how are you?"}
        ],
        [
            {"role": "system", "content": "You are an expert."},
            {"role": "user", "content": "What is 2+2?"}
        ]
    ],
    "model": "gpt-3.5-turbo",
    "temperature": 0.7,
    "max_tokens": 100,
    "frequency_penalty": 0,
    "presence_penalty": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_eval_method Ran
ran on a synthesized input
salmakh1/ACING/Induction/automatic_prompt_engineer/evaluate.py
code served (permissive licence) · get_code("160a4ee0fc23e29e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function checks if eval_method is callable or matches string literals
# It returns either the passed callable or looks up a predefined evaluator

# We'll test with a callable eval_method
def dummy_evaluator():
    """A simple callable to use as eval_method"""
    return "evaluation_result"

# Construct the ARGS dict
ARGS = {
    'eval_method': dummy_evaluator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
automatic_prompt_engineer, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_query Ran
ran; our contract draft was wrong, not the code
salmakh1/ACING/Induction/automatic_prompt_engineer/generate.py
pointer only (licence: MIT); the stored copy get_code serves, from lichang-chen/instructzero, is pointer only (licence: NONE) · get_code("71e7c70faf29eeee")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lichang-chen/instructzero, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_simple_prompt_gen_template Ran
ran; our contract draft was wrong, not the code
salmakh1/ACING/Induction/automatic_prompt_engineer/ape.py
code served (permissive licence) · get_code("7f64a5a312597651")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Analyze function usage:
# - prompt_gen_template: can be None or a string
# - prompt_gen_mode: string that's either 'forward' or 'insert'
# - function returns prompt_gen_template (modified or original)

# Test case 1: prompt_gen_template is None, mode is 'forward'
ARGS = {
    'prompt_gen_template': None,
    'prompt_gen_mode': 'forward'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gpt_get_estimated_cost Ran
ran on a synthesized input
salmakh1/ACING/Induction/automatic_prompt_engineer/llm.py
code served (permissive licence) · get_code("3d25c1239ecb50e8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Construct valid arguments for gpt_get_estimated_cost
config = {
    'gpt_config': {
        'model': 'text-davinci-003'
    }
}

prompt = 'This is a test prompt with some content [APE] and more text.'

max_tokens = 50

ARGS = {
    'config': config,
    'prompt': prompt,
    'max_tokens': max_tokens
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
subsample_data Ran
ran; our contract draft was wrong, not the code
salmakh1/ACING/Induction/automatic_prompt_engineer/data.py
code served (permissive licence) · get_code("01ed101f1dc9de50")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
import torch

torch.manual_seed(0)

# Create sample data: inputs and outputs as lists
inputs = [
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
]

outputs = [
    torch.randn(3),
    torch.randn(3),
    torch.randn(3),
    torch.randn(3),
    torch.randn(3),
]

data = (inputs, outputs)
subsample_size = 2

ARGS = {
    "data": data,
    "subsample_size": subsample_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_prompts Not yet run
unverified (harvested, no recorded run)
salmakh1/ACING/Induction/automatic_prompt_engineer/evaluate.py
code served (permissive licence) · get_code("f08e193702e19195")
How it ran

no invocation recorded.

extract_info Not yet run
unverified (harvested, no recorded run)
salmakh1/ACING/Induction/logger.py
code served (permissive licence) · get_code("9add3b16b441ab03")
How it ran

no invocation recorded.

simple_config Not yet run
unverified (harvested, no recorded run)
salmakh1/ACING/Induction/automatic_prompt_engineer/config.py
code served (permissive licence) · get_code("94a458b03c806c8f")
How it ran

no invocation recorded.

update_config Not yet run
unverified (harvested, no recorded run)
salmakh1/ACING/Induction/automatic_prompt_engineer/config.py
code served (permissive licence) · get_code("cef07a073378dd0c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_query 4 other papers
3 dated earlier, 1 same year, order not determinable
2306.03082 (2023-06)
InstructZero: Efficient Instruction Optimization for Black-Box Large Language Models
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers
2405.17346 (2024-05)
Prompt Optimization with Human Feedback
and 1 more not named here
get_simple_prompt_gen_template 4 other papers
3 dated earlier, 1 same year, order not determinable
2211.01910 (2022-11)
Large Language Models Are Human-Level Prompt Engineers
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers
2405.17346 (2024-05)
Prompt Optimization with Human Feedback
and 1 more not named here
subsample_data 4 other papers
3 dated earlier, 1 same year, order not determinable
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers
2405.02814 (2024-05)
NegativePrompt: Leveraging Psychology for Large Language Models Enhancement via Negative Emotional Stimuli
2405.17346 (2024-05)
Prompt Optimization with Human Feedback
and 1 more not named here
update_config 3 other papers
2 dated earlier, 1 same year, order not determinable
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers
2405.17346 (2024-05)
Prompt Optimization with Human Feedback
2510.25808 (2025-10)
PRESTO: Preimage-Informed Instruction Optimization for Prompting Black-Box LLMs
gpt_get_estimated_cost 2 other papers
2 dated earlier
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers
2312.03724 (2023-12)
DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer
dispatch_openai_requests 1 other paper
1 dated earlier
2310.02905 (2023-10)
Use Your INSTINCT: INSTruction optimization for LLMs usIng Neural bandits Coupled with Transformers

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The effectiveness of Large Language Models (LLMs) in solving tasks depends significantly on the quality of their instructions, which often require substantial human effort to craft. This underscores the need for automated instruction optimization. However, optimizing instructions is particularly challenging when working with black-box LLMs, where model parameters and gradients are inaccessible. We introduce ACING, an actor-critic reinforcement learning framework that formulates instruction optimization as a stateless, continuous-action problem, enabling exploration of infinite instruction spaces using only black-box feedback. ACING automatically discovers prompts that outperform human-written prompts in 76% of instruction-induction tasks, with gains of up to 33 points and a 10-point median improvement over the best automatic baseline in 33 tasks spanning instruction-induction, summarization, and chain-of-thought reasoning. Extensive ablations highlight its robustness and efficiency. An implementation of ACING is available at https://github.com/salmakh1/ACING.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2025.emnlp-main.965")
get_code_for_paper("2025.emnlp-main.965")
have("2025.emnlp-main.965")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2025.emnlp-main.965.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2025.emnlp-main.965.svg)](https://syntology.ai/paper/2025.emnlp-main.965)

Connect an agent — have() is free.