FACTS: Table Summarization via Offline Template Generation with Agentic Workflows
Pith reviewed 2026-05-18 07:19 UTC · model grok-4.3
The pith
FACTS generates reusable SQL queries and Jinja2 templates offline via an agentic workflow to produce fast, accurate, and privacy-compliant query-focused table summaries.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
FACTS produces offline templates, consisting of SQL queries and Jinja2 templates, which can be rendered into natural language summaries and are reusable across multiple tables sharing the same schema. It enables fast summarization through reusable offline templates, accurate outputs with executable SQL queries, and privacy compliance by sending only table schemas to LLMs.
What carries the argument
Agentic workflow that generates executable SQL queries paired with Jinja2 templates from table schemas and queries alone, allowing offline rendering of summaries.
If this is right
- Summaries can be produced at scale without per-query LLM calls once templates exist for a schema.
- Only table schemas reach the language model, so raw data never leaves the local environment.
- Executable SQL guarantees that numeric and relational facts in the summary match the source table.
- New tables with matching schemas immediately support the same query templates without retraining.
Where Pith is reading between the lines
- The same offline-template pattern could apply to other structured data formats such as JSON documents or graph databases if analogous query languages are substituted.
- In high-volume production settings the approach would shift cost from inference time to one-time template creation.
- Template libraries could be versioned and shared across organizations that use identical database schemas.
Load-bearing premise
An agentic workflow can reliably produce correct, reusable SQL queries and Jinja2 templates directly from table schemas without manual fixes or breakdowns on complex reasoning queries.
What would settle it
A benchmark query on tables with the same schema where the generated SQL produces incorrect aggregates or joins, or where the rendered Jinja2 output is factually wrong or unreadable.
Figures
read the original abstract
Query-focused table summarization requires generating natural language summaries of tabular data conditioned on a user query, enabling users to access insights beyond fact retrieval. Existing approaches face key limitations: table-to-text models require costly fine-tuning and struggle with complex reasoning, prompt-based LLM methods suffer from token-limit and efficiency issues while exposing sensitive data, and prior agentic pipelines often rely on decomposition, planning, or manual templates that lack robustness and scalability. To mitigate these issues, we introduce an agentic workflow, FACTS, a Fast, Accurate, and Privacy-Compliant Table Summarization approach via Offline Template Generation. FACTS produces offline templates, consisting of SQL queries and Jinja2 templates, which can be rendered into natural language summaries and are reusable across multiple tables sharing the same schema. It enables fast summarization through reusable offline templates, accurate outputs with executable SQL queries, and privacy compliance by sending only table schemas to LLMs. Evaluations on widely-used benchmarks show that FACTS consistently outperforms baseline methods, establishing it as a practical solution for real-world query-focused table summarization. Our code is available at https://github.com/BorealisAI/FACTS.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces FACTS, an agentic workflow for query-focused table summarization that generates reusable offline templates consisting of SQL queries and Jinja2 templates directly from table schemas. These templates are rendered at inference time to produce natural-language summaries, addressing limitations of fine-tuned table-to-text models (costly training, poor complex reasoning), prompt-based LLM methods (token limits, data exposure), and prior agentic pipelines (lack of robustness and scalability). The approach claims to deliver fast inference via reusability, accuracy via executable SQL, and privacy compliance by transmitting only schemas to the LLM. Evaluations on widely-used benchmarks are reported to show consistent outperformance over baselines, with code released at https://github.com/BorealisAI/FACTS.
Significance. If the empirical claims hold, the work offers a practical engineering advance for real-world table summarization systems, particularly where privacy constraints and reusability across schema-identical tables matter. The offline template paradigm could reduce repeated LLM calls and data exposure compared with online prompting approaches. Open-sourcing the code supports reproducibility, which strengthens the contribution for the NLP and data-to-text communities.
major comments (2)
- [§4 and §5] §4 (Agentic Workflow) and §5 (Experiments): the central claim that FACTS is a 'practical solution for real-world query-focused table summarization' rests on the agentic pipeline reliably producing correct, executable SQL+Jinja2 templates from schemas alone. No quantitative results are supplied on template-generation success rate, average retry count, failure modes for queries requiring joins/aggregations/multi-table logic, or frequency of manual intervention. Without these metrics the reported benchmark gains cannot be attributed to the claimed robustness advantage over prior agentic methods.
- [§5] §5 (Experimental Results): the abstract and results section assert 'consistent outperformance' on widely-used benchmarks, yet the manuscript supplies neither per-dataset scores with error bars, ablation studies isolating the contribution of offline template reuse versus the agentic generation step, nor details on query complexity distribution. This makes it impossible to verify whether the gains generalize beyond the evaluated tables or collapse on reasoning-heavy queries.
minor comments (2)
- [Abstract and §1] The abstract and introduction repeatedly use the phrase 'widely-used benchmarks' without naming the specific datasets or providing citations in the first occurrence.
- [§3] Notation for the generated artifacts (SQL query, Jinja2 template, rendered summary) is introduced informally; a small table or diagram in §3 would clarify the data flow.
Simulated Author's Rebuttal
We thank the referee for the constructive feedback, which helps clarify the presentation of our contributions. We address each major comment below and commit to revisions that strengthen the empirical support for our claims without altering the core approach.
read point-by-point responses
-
Referee: [§4 and §5] §4 (Agentic Workflow) and §5 (Experiments): the central claim that FACTS is a 'practical solution for real-world query-focused table summarization' rests on the agentic pipeline reliably producing correct, executable SQL+Jinja2 templates from schemas alone. No quantitative results are supplied on template-generation success rate, average retry count, failure modes for queries requiring joins/aggregations/multi-table logic, or frequency of manual intervention. Without these metrics the reported benchmark gains cannot be attributed to the claimed robustness advantage over prior agentic methods.
Authors: We agree that direct quantitative metrics on the template-generation stage would strengthen attribution of the observed gains to the robustness of the agentic workflow. In the revised manuscript we will add a dedicated analysis (new subsection in §4 or appendix) reporting template-generation success rate, average retry counts, breakdown of failure modes (with emphasis on joins, aggregations, and multi-table logic), and frequency of manual intervention across the evaluated benchmarks. These additions will make the robustness advantage over prior agentic methods more transparent while preserving the focus on end-to-end summarization performance. revision: yes
-
Referee: [§5] §5 (Experimental Results): the abstract and results section assert 'consistent outperformance' on widely-used benchmarks, yet the manuscript supplies neither per-dataset scores with error bars, ablation studies isolating the contribution of offline template reuse versus the agentic generation step, nor details on query complexity distribution. This makes it impossible to verify whether the gains generalize beyond the evaluated tables or collapse on reasoning-heavy queries.
Authors: We acknowledge that more granular reporting would improve verifiability. In the revision we will expand §5 to include per-dataset scores with error bars, ablation studies that isolate the contribution of offline template reuse from the agentic generation step, and a characterization of query complexity distribution (e.g., proportion of queries requiring joins or aggregations). These additions will clarify generalization and performance on reasoning-heavy queries while retaining the overall benchmark comparisons. revision: yes
Circularity Check
No circularity: empirical engineering method evaluated on external benchmarks
full rationale
The paper presents FACTS as an agentic workflow that generates reusable SQL queries and Jinja2 templates offline from table schemas, then evaluates the resulting summarization system on widely-used external benchmarks. No equations, fitted parameters, or derivation steps are described that could reduce to the method's own inputs. The central claims rest on benchmark outperformance and practical advantages (speed, accuracy, privacy) rather than any self-referential construction, self-citation chain, or ansatz smuggled via prior work. This is a standard empirical contribution with no load-bearing circular elements.
Axiom & Free-Parameter Ledger
axioms (1)
- domain assumption LLMs can produce executable SQL queries and correct Jinja2 templates from table schemas that generalize to new tables with the same schema.
Lean theorems connected to this paper
-
IndisputableMonolith/Foundation/RealityFromDistinction.leanreality_from_one_distinction unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
FACTS produces offline templates, consisting of SQL queries and Jinja2 templates... Evaluations on widely-used benchmarks show that FACTS consistently outperforms baseline methods
-
IndisputableMonolith/Cost/FunctionalEquation.leanwashburn_uniqueness_aczel unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
We propose offline template generation, which produces reusable and schema-specific templates
What do these tags mean?
- matches
- The paper's claim is directly supported by a theorem in the formal canon.
- supports
- The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
- extends
- The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
- uses
- The paper appears to rely on the theorem as machinery.
- contradicts
- The paper's claim conflicts with a theorem or certificate in the canon.
- unclear
- Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.
Reference graph
Works this paper leans on
-
[1]
Association for Computational Linguistics. Yilun Zhao, Zhenting Qi, Linyong Nan, Boyu Mi, Yixin Liu, Weijin Zou, Simeng Han, Ruizhe Chen, Xiangru Tang, Yumo Xu, Dragomir Radev, and Arman Cohan. QTSumm: Query-focused sum- marization over tabular data. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.),Proceedings of the 2023 Conference on Empirical Method...
work page 2023
-
[2]
Does it execute without errors?
-
[3]
Does it return the non-empty data for summarization?
-
[4]
Does it filter and select appropriate columns? Answer with YES or NO only. If NO, provide a brief reason. Output format: Decision: [YES/NO] Feedback: [Brief reason if NO, or ’SQL query is good’ if YES] Example 4: Prompt for evaluating SQL–template alignment. You are evaluating whether a SQL query result aligns with a Jinja2 template for table summarizatio...
-
[5]
Does the SQL return all fields that the template tries to access?
-
[6]
Is the data structure compatible (e.g., if template expects multiple rows, does SQL return them)?
-
[7]
Are field names in the template matching the column names returned by SQL? Answer with YES or NO only. If NO, provide a brief reason. Output format: Decision: [YES/NO] Feedback: [Brief reason if NO, or ’SQL and template are well-aligned’ if YES] 16 Preprint Example 5: Prompt for evaluating generated summaries. You are evaluating a generated summary for ta...
-
[8]
Relevance to the query
-
[9]
Accuracy of information
-
[10]
Clarity and coherence
-
[11]
Completeness Answer with YES or NO only. If NO, provide a brief reason. Output format: Decision: [YES/NO] Feedback: [Brief reason if NO, or ’Summary is good’ if YES] A.2 PSEUDOCODE OFFACTS Algorithm 2 summarizes the FACTS workflow. The process begins withSchema-Guided Specifica- tion and Filtering, where the agent proposes schema-aware clarifying question...
-
[12]
Is different from previously generated questions and filtering rules
-
[13]
Clarifies what specific information is needed or what information is irrelevant
-
[14]
Helps understand data relationships
-
[15]
Guides the SQL query structure Output format: Specification: [Your single question or filtering rule here] Example 7: Prompt for SQL query synthesis. Based on the table information, user query, and refined questions below, generate a valid DuckDB SQL query. Table Information: [table schema here] Guided Specifications: [final set of guided questions and fi...
-
[16]
Retrieves the necessary information to answer the user query
-
[17]
Uses proper DuckDB syntax
-
[18]
References the DataFrame as ’df’
-
[19]
Quotes column names exactly as they appear
-
[20]
Based on the demonstration examples below and the current SQL result, generate a Jinja2 template
Handles data types appropriately Output format: SQL queries: [Your SQL query here] Example 8: Prompt for Jinja2template generation. Based on the demonstration examples below and the current SQL result, generate a Jinja2 template. --- Demonstration Examples --- [table, user query, and reference summary triples] --- Current Task --- Table Information: [tabl...
-
[21]
Uses the variable name ’values’ to access the data
-
[22]
Iterates with {% for row in values %}
- [23]
-
[24]
Produces a coherent paragraph summary in the style of the examples
-
[25]
Show all document names using templates with template type code BK
Handles empty results gracefully Output format: Jinja2 template: [Your Jinja2 template here] For space reasons, we only show these representative prompts here. The full set, including iterative improvement and alignment prompts, is available in our code release. 19 Preprint A.4 CASESTUDY: STEP-BY-STEPOUTPUTS ONQFMTS We illustrate FACTS end-to-end on a QFM...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.