SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.22939 · ICML · 2025

Generative Social Choice: The Next Generation

Niclas Boehmer, Ariel Procaccia, Sara Fish

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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 9 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2505.22939.json · badge: /api/ran/2505.22939.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
sara-fish/gen-soc-choice-next-gen canonical (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_average_from_file Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/synthetic_experiments/process.py
code served (permissive licence) · get_code("cba164bb97fe0aac")
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 tempfile
import os

# Create a temporary file with float values
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("1.5\n")
temp_file.write("2.5\n")
temp_file.write("3.0\n")
temp_file.write("4.0\n")
temp_file.close()

ARGS = {
    "filename": temp_file.name
}
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 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
compute_sum_for_c0_d_ge_1 Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/synthetic_experiments/process.py
code served (permissive licence) · get_code("602516ad7ba395d5")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 pandas as pd
import numpy as np
import tempfile
import os

# Create a temporary CSV file with the necessary structure
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, "test_data.csv")

# Create a DataFrame with:
# - Index as floats (d values): some >= 1, some < 1
# - Column 0.0 (c_value = 0)
# - Additional columns for variety
data = {
    0.0: [10.0, 20.0, 30.0, 40.0, 50.0],
    1.0: [1.0, 2.0, 3.0, 4.0, 5.0],
    2.0: [5.0, 4.0, 3.0, 2.0, 1.0]
}

df = pd.DataFrame(data, index=[0.5, 1.5, 2.5, 3.5, 4.5])
df.index.name = "d"
df.to_csv(file_path)

ARGS = {
    "file_path": file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
find_set_probabilities Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/queries/gen_composite.py
code served (permissive licence) · get_code("8abcf7c5b567f52c")
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 ndarray, ndim 1, dtype family float, shape (4,) 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 numpy as np

# Create test sets for the function
# The function finds probabilities for sets such that each element
# is covered by sets with total probability around 1
sets = [
    {0, 1, 2},
    {1, 2, 3},
    {2, 3, 4},
    {0, 4}
]

epsilon = 0.005

ARGS = {
    "sets": sets,
    "epsilon": epsilon
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
get_prompts Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/queries/prompts/gen_iter_prompts.py
code served (permissive licence) · get_code("7c4f83b40638cece")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

def get_prompts(prompt_type: str) -> tuple[str, str]:
    if prompt_type == 'v1':
        INITIAL_PROMPT_V1 = '\nYou will be given some information about {num_agents} users on a specific topic. Your goal is to write some text. After you write your text, the users will rate your text on the following scale:\n{approval_levels_str}\nYour goal is to have all users give your text a rating of at least {target_approval} (that is, "{target_approval_text}"). Additionally, it\'s important you obey the length limit -- your text must be at most {target_budget} words. \n\n****************\nUser information\n****************\n{agent_descriptions}\n\n*******************\nOutput instructions\n*******************\n\nRemember your goal is to write a text using at most {target_budget} words that all users will give a rating of at least {target_approval} (that is, "{target_approval_text}") to. To do this follow these steps:\n\n1. Read the user information carefully. Where do the users agree? Where do they disagree? Weigh how important each of the points are to the overall topic. Write your reasoning here in HTML tags <step1>...</step1>.\n\n2. Considering your word limit of {target_budget} words, decide what points to include in your text and what ones to omit. Write your reasoning here in HTML tags <step2>...</step2>.\n\n3. Finally, write your text. **To make sure it can be parsed, include your text in HTML tags <text>...</text>.** The word count will be determined by whatever is in these HTML tags, so follow this instruction carefully.\n'.strip()
        
        RESPONSE_PROMPT_V1 = '\n(Attempt number {num_iterations}/{max_iterations}.) Recall that your task is to write a text using at most {target_budget} words that all users will give a rating of at least {target_approval} (that is, "{target_approval_text}") to. \n\nLast time, you wrote the following text:\n{previous_text}\n\nThis text has {previous_text_target_budget} words, and your target word count was {target_budget}. \n\nThis text was rated as follows by the users:\n{agent_approvals}\nYour goal was to have all users give your text a rating of at least {target_approval} (that is, "{target_approval_text}").\n\nNow, you should modify your text to make it fit the specifications better (both on word count and on user ratings). To do this, follow these steps:\n\n1. Read the user ratings carefully. For which users was the text not good enough? What modifications could you make to improve the text for these users, without sacrificing other users\' approval? Write your reasoning here in HTML tags <step1>...</step1>.\n\n2. If applicable, does the length of the text need to be modified to better fit the word limit? Write your reasoning here in HTML tags <step2>...</step2>.\n\n3. Finally, write your new text. **To make sure it can be parsed, include your text in HTML tags <text>...</text>.** The word count will be determined by whatever is in these HTML tags, so follow this instruction carefully.\n'.strip()
        return (INITIAL_PROMPT_V1, RESPONSE_PROMPT_V1)
    else:
        raise ValueError(f'Invalid prompt type: {prompt_type}')

ARGS = {
    'prompt_type': 'v1'
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
get_system_prompt_fast_generator Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/queries/prompts/fast_gen_query_prompts.py
code served (permissive licence) · get_code("bb63965424923f5d")
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

ARGS = {
    'prompt_type': 'v2'
}
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
get_system_prompt_fast_no_budget_generator Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/queries/prompts/fast_gen_no_budget_query_prompts.py
code served (permissive licence) · get_code("0801fb7b60d27de3")
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)

# The function only takes a prompt_type string parameter
# It simply returns a system prompt based on the type provided
# No complex objects needed

ARGS = {
    'prompt_type': 'v2'
}
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
process_file Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/synthetic_experiments/process.py
code served (permissive licence) · get_code("255faefc4183008f")
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 pandas as pd
import numpy as np
import tempfile
import os

# Create a temporary CSV file with test data
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, 'test_data.csv')

# Create sample data
data = {
    '0.5': [1, 2, 3],
    '1.5': [4, 5, 6],
    '2.5': [7, 8, 9]
}
df = pd.DataFrame(data, index=['1.0', '2.0', '3.0'])
df.to_csv(file_path)

ARGS = {
    'file_path': file_path,
    'statistic': 'average'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
process_llm_approval_levels Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/queries/fast_queries.py
code served (permissive licence) · get_code("7702872b9f741140")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
from typing import Dict, List, Union, Tuple

torch.manual_seed(0)

# Test case 1: Dictionary input with string keys representing approval levels
llm_approval_levels_dict = {
    "level_1": 1,
    "level_2": 2,
    "level_3": 3,
    "level_5": 5
}

# Test case 2: List input with integer approval levels
llm_approval_levels_list = [1, 2, 3, 5]

# Use the dictionary version for ARGS
ARGS = {
    "llm_approval_levels": llm_approval_levels_dict
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
str_to_singleton_list Ran
ran on a synthesized input
sara-fish/gen-soc-choice-next-gen/PROSE/generate_scripts/generate_tags.py
code served (permissive licence) · get_code("ffd02a17ee476a7b")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# The function str_to_singleton_list takes a single parameter 's'
# It checks if s is a string, and if so, wraps it in a list
# Otherwise it returns s as-is

# Test case 1: passing a string
s_string = "hello"

# Test case 2: passing a non-string (list)
s_list = ["world", "test"]

# We'll create ARGS with the string case as the primary test
ARGS = {
    "s": s_string
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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-23.

Repositories linked to this paper

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

Abstract

A key task in certain democratic processes is to produce a concise slate of statements that proportionally represents the full spectrum of user opinions. This task is similar to committee elections, but unlike traditional settings, the candidate set comprises all possible statements of varying lengths, and so it can only be accessed through specific queries. Combining social choice and large language models, prior work has approached this challenge through a framework of generative social choice. We extend the framework in two fundamental ways, providing theoretical guarantees even in the face of approximately optimal queries and a budget limit on the overall length of the slate. Using GPT-4o to implement queries, we showcase our approach on datasets related to city improvement measures and drug reviews, demonstrating its effectiveness in generating representative slates from unstructured user opinions. In our opinion, the framework of Fish et al. [2024] provides a compelling vision for how AI can support democratic innovation. But their implementation is, at this point, largely a proof of concept; there is much more work to do before generative social choice can be put into practice. In this paper, we make progress in this direction by enhancing generative social choice along two distinct dimensions.

For agents

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

get_harvested_code_for_paper("2505.22939")
get_code_for_paper("2505.22939")
have("2505.22939")

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

curl https://syntology.ai/api/ran/2505.22939.json

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

[![Syntology run record](https://syntology.ai/api/ran/2505.22939.svg)](https://syntology.ai/paper/2505.22939)

Connect an agent — have() is free.