SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.emnlp-industry.17 · EMNLP · 2023

Investigating Table-to-Text Generation Capabilities of LLMs in Real-World Information Seeking Scenarios

Arman Cohan, Yilun Zhao, Xiangru Tang, Haowei Zhang, Linyong Nan, Shengyun Si

Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 3 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/2023.emnlp-industry.17.json · badge: /api/ran/2023.emnlp-industry.17.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
yale-nlp/LLM-T2T canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
adjust_length_to_model Ran
ran, honoured the contract we drafted
yale-nlp/LLM-T2T/src/open_src_model_T2T_generation.py
code served (permissive licence) · get_code("440751480098ee7d")
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) and returned int, ndim 0, dtype family int, 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

MAX_LENGTH = int(10000)

def adjust_length_to_model(length, max_sequence_length):
    if length < 0 and max_sequence_length > 0:
        length = max_sequence_length
    elif 0 < max_sequence_length < length:
        length = max_sequence_length
    elif length < 0:
        length = MAX_LENGTH
    return length

ARGS = {
    "length": 50,
    "max_sequence_length": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
call_api_direct Ran
ran on a synthesized input
yale-nlp/LLM-T2T/src/GPT_T2T_generation.py
code served (permissive licence) · get_code("02b8cf72e3dadbcd")
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 tenacity import retry, stop_after_attempt, wait_random_exponential

# Define engine constants
CHAT_GPT = "gpt-3.5-turbo"
GPT4 = "gpt-4"

# Create a mock args object with temperature and top_p
class Args:
    def __init__(self):
        self.temperature = 0.7
        self.top_p = 0.9

args = Args()

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

class MockCompletion:
    @staticmethod
    def create(**kwargs):
        return {"choices": [{"text": "Mock response"}]}

class MockError:
    class APIError(Exception):
        def __init__(self, status=500):
            self.status = status

# Replace openai with mock
openai.ChatCompletion = MockChatCompletion()
openai.Completion = MockCompletion()
openai.error = MockError()

# Create test data
prompt_list = [
    "What is the capital of France?",
    "What is 2 + 2?"
]

engine = CHAT_GPT

# Define ARGS dictionary with all parameters for call_api_direct
ARGS = {
    "prompt_list": prompt_list,
    "engine": engine
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — 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
call_api_improve Ran
ran on a synthesized input
yale-nlp/LLM-T2T/src/GPT_T2T_generation.py
code served (permissive licence) · get_code("8a2c0df495da3fde")
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 unittest.mock import AsyncMock, MagicMock

# Define constants referenced in the function
CHAT_GPT = "gpt-3.5-turbo"
GPT4 = "gpt-4"

# Create a mock args object with the required attributes
class MockArgs:
    def __init__(self):
        self.temperature = 0.7
        self.top_p = 0.9

args = MockArgs()

# Mock the openai module to avoid actual API calls
openai.ChatCompletion = MagicMock()
openai.Completion = MagicMock()

# Create async mock responses
async def mock_chat_completion(*args, **kwargs):
    return {"choices": [{"message": {"content": "mock response"}}]}

async def mock_completion(*args, **kwargs):
    return {"choices": [{"text": "mock response"}]}

openai.ChatCompletion.acreate = AsyncMock(side_effect=mock_chat_completion)
openai.Completion.acreate = AsyncMock(side_effect=mock_completion)

# Define the arguments for call_api_improve
ARGS = {
    "prompt_list": [
        "What is the capital of France?",
        "What is the capital of Germany?"
    ],
    "engine": CHAT_GPT
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — 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
generate_response Ran
ran on a synthesized input
yale-nlp/LLM-T2T/src/GPT_T2T_generation.py
code served (permissive licence) · get_code("32ed24c259e05547")
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 tenacity import retry, stop_after_attempt, wait_random_exponential

# Define engine constants
CHAT_GPT = "gpt-3.5-turbo"
GPT4 = "gpt-4"

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.temperature = 0.7
        self.top_p = 0.9

args = Args()

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

class MockCompletion:
    @staticmethod
    def create(**kwargs):
        return {"choices": [{"text": "Mock completion"}]}

class MockError:
    class APIError(Exception):
        def __init__(self, status=500):
            self.status = status
    error = type('error', (), {'APIError': APIError})()

# Replace openai module components
openai.ChatCompletion = MockChatCompletion()
openai.Completion = MockCompletion()
openai.error = MockError.error

# Define test prompts and engines
prompt = "What is the meaning of life?"
engine_chat = CHAT_GPT
engine_completion = "text-davinci-003"

ARGS = {
    "prompt": prompt,
    "engine": engine_chat
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — 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_output_sequence Ran
ran on a synthesized input
yale-nlp/LLM-T2T/src/open_src_model_T2T_generation.py
code served (permissive licence) · get_code("cea8802359e10fba")
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)

class StandInTokenizer:
    def __init__(self):
        self.eos_token_id = 50256
        self.pad_token = None
    
    def decode(self, token_ids, clean_up_tokenization_spaces=True):
        return "This is the prompt text and some generated output text that continues here"

class StandInModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def generate(self, input_ids, max_length, temperature, top_k, top_p, do_sample, pad_token_id):
        batch_size = input_ids.shape[0]
        output_length = max_length
        output = torch.randint(0, 50256, (batch_size, output_length))
        return output

class StandInArgs:
    def __init__(self):
        self.length = 10
        self.temperature = 0.7
        self.k = 50
        self.p = 0.9
        self.stop_token = "."

prompt_text = "This is the prompt text"
encoded_prompt = torch.randint(0, 50256, (1, 5))
tokenizer = StandInTokenizer()
model = StandInModel()
args = StandInArgs()

ARGS = {
    "model": model,
    "encoded_prompt": encoded_prompt,
    "tokenizer": tokenizer,
    "args": args,
    "prompt_text": prompt_text
}
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_prompt_from_table Ran
ran on a synthesized input
yale-nlp/LLM-T2T/utils/open_src_model_prompt_utils.py
code served (permissive licence) · get_code("068b205b0593ac11")
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

# Define test data for LogicNLG dataset
logicnlg_current = {
    'csv_id': 'table_001',
    'title': 'Population Statistics',
    'table_text': 'Name<br>Age<br>City<br>John<br>25<br>NYC'
}

logicnlg_prompt_template = "Title: {title}\nTable:\n{table}\nGenerate a sentence."

# Define test data for LoTNLG dataset
lotnlg_current = {
    'csv_id': 'table_002',
    'title': 'Sales Data',
    'table_text': 'Product<br>Q1<br>Q2<br>Widget<br>100<br>150',
    'logical_labels': ['label1', 'label2']
}

lotnlg_prompt_template = "Title: {title}\nTable:\n{table}\nLogical form:"

# Define test data for FeTaQA dataset
fetaqa_current = {
    'feta_id': 'feta_001',
    'page_title': 'Wikipedia Page',
    'section_title': 'Overview',
    'question': 'What is the total?',
    'table_text': 'Year<br>Value<br>2020<br>50'
}

fetaqa_prompt_template = "Page: {page_title}\nSection: {section_title}\nQuestion: {question}\nTable:\n{table}\nAnswer:"

# Define test data for F2WTQ dataset
f2wtq_current = {
    'id': 'f2wtq_001',
    'new_question': 'How many rows?',
    'table_text': 'A<br>B<br>1<br>2'
}

f2wtq_prompt_template = "Question: {question}\nTable:\n{table}\nAnswer:"

# Use LogicNLG as the primary test case
ARGS = {
    'dataset': 'LogicNLG',
    'current': logicnlg_current,
    'prompt_template': logicnlg_prompt_template
}
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
process_prompt_for_tulu Ran
ran on a synthesized input
yale-nlp/LLM-T2T/utils/open_src_model_prompt_utils.py
code served (permissive licence) · get_code("8ec1544a80a99955")
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

def process_prompt_for_tulu(prompt_test):
    return f'<|user|>\n{prompt_test}\n<|assistant|>\n'

# The function takes a single parameter: prompt_test
# It expects a string and performs string formatting
prompt_test_value = "What is the capital of France?"

ARGS = {
    "prompt_test": prompt_test_value
}
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
direct_postprocess Not yet run
unverified (harvested, no recorded run)
yale-nlp/LLM-T2T/utils/postprocess_utils.py
code served (permissive licence) · get_code("34d8cdd129864f00")
How it ran

no invocation recorded.

get_exact_output_path Not yet run
unverified (harvested, no recorded run)
yale-nlp/LLM-T2T/utils/postprocess_utils.py
code served (permissive licence) · get_code("e947516b7ec156f1")
How it ran

no invocation recorded.

improve_postprocess Not yet run
unverified (harvested, no recorded run)
yale-nlp/LLM-T2T/utils/postprocess_utils.py
code served (permissive licence) · get_code("b3f0401d4a2ba35a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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.

FunctionAlso present inEarliest-datedOthers named
adjust_length_to_model 3 other papers
2 dated earlier, 1 same year, order not determinable
2009.06367 (2020-09)
GeDi: Generative Discriminator Guided Sequence Generation
2010.12850 (2020-10)
CoCo: Controllable Counterfactuals for Evaluating Dialogue State Trackers
2306.14870 (2023-06)
Composing Parameter-Efficient Modules with Arithmetic Operations

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

Tabular data is prevalent across various industries, necessitating significant time and effort for users to understand and manipulate for their information-seeking purposes. The advancements in large language models (LLMs) have shown enormous potential to improve user efficiency. However, the adoption of LLMs in real-world applications for table information seeking remains underexplored. In this paper, we investigate the table-to-text capabilities of different LLMs using four datasets within two real-world information seeking scenarios. These include the LOGICNLG and our newlyconstructed LOTNLG datasets for data insight generation, along with the FeTaQA and our newly-constructed F2WTQ datasets for querybased generation. We structure our investigation around three research questions, evaluating the performance of LLMs in table-to-text generation, automated evaluation, and feedback generation, respectively. Experimental results indicate that the current high-performing LLM, specifically GPT-4, can effectively serve as a table-to-text generator, evaluator, and feedback generator, facilitating users' information seeking purposes in real-world scenarios. However, a significant performance gap still exists between other open-sourced LLMs (e.g., TÜLU and LLaMA-2) and GPT-4 models. Our data and code are publicly available at https: //github.com/yale-nlp/LLM-T2T. * Equal Contributions. RQ1: How do LLMs perform in table-to-text generation tasks? RQ2: Can we use LLMs to assess factual consistency of table-to-text generation? RQ3: How can fine-tuned models benefit from LLMs' strong table-to-text abilities? LLM LLM LLM serve as feedback provider Information Seeking Scenario 1: Data Insight Generation Information Seeking Scenario 2: Query-based Generation Here are some meaningful insights from the given table about the 1964 United States presidential election in Illinois: 1. .... 2. .... Lyndon B. Johnson won Illinois with 59.47% of the vote, against Barry Goldwater, who received 40.53% of the vote. How did Lyndon B. Johnson fare against his opponent in the Illinois presidential election? Party Candidates Votes Votes %

For agents

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

get_harvested_code_for_paper("2023.emnlp-industry.17")
get_code_for_paper("2023.emnlp-industry.17")
have("2023.emnlp-industry.17")

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

curl https://syntology.ai/api/ran/2023.emnlp-industry.17.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.emnlp-industry.17.svg)](https://syntology.ai/paper/2023.emnlp-industry.17)

Connect an agent — have() is free.