wikikg-fact-phd / src /paper /build_paper_framework.py
minhy112's picture
Add files using upload-large-folder tool
cd58795 verified
Raw
History Blame Contribute Delete
26.8 kB
from __future__ import annotations
import argparse
import csv
from pathlib import Path
from typing import Any
def read_csv(path: Path) -> list[dict[str, str]]:
with path.open(newline="", encoding="utf-8") as handle:
return list(csv.DictReader(handle))
def cell(value: Any) -> str:
text = str(value if value is not None else "")
text = text.replace("\n", "<br>")
text = text.replace("|", "\\|")
return text
def markdown_table(rows: list[dict[str, Any]], columns: list[str], rename: dict[str, str] | None = None) -> str:
rename = rename or {}
headers = [rename.get(col, col) for col in columns]
lines = [
"| " + " | ".join(cell(header) for header in headers) + " |",
"| " + " | ".join("---" for _ in headers) + " |",
]
for row in rows:
lines.append("| " + " | ".join(cell(row.get(col, "")) for col in columns) + " |")
return "\n".join(lines)
def pick_columns(rows: list[dict[str, str]], columns: list[str]) -> list[dict[str, str]]:
return [{col: row.get(col, "") for col in columns} for row in rows]
def compact_float(value: str, digits: int = 6) -> str:
try:
return f"{float(value):.{digits}f}".rstrip("0").rstrip(".")
except (TypeError, ValueError):
return value
def compact_rows(rows: list[dict[str, str]], columns: list[str], digits: int = 6) -> list[dict[str, str]]:
output: list[dict[str, str]] = []
for row in rows:
item: dict[str, str] = {}
for col in columns:
value = row.get(col, "")
item[col] = compact_float(value, digits) if value not in {"", "True", "False", "PASS", "REVIEW", "OPEN", "PENDING"} else value
output.append(item)
return output
def table_from_csv(path: Path, columns: list[str], digits: int = 6, rename: dict[str, str] | None = None) -> str:
rows = compact_rows(read_csv(path), columns, digits=digits)
return markdown_table(rows, columns, rename=rename)
def section(title: str) -> str:
return f"\n## {title}\n\n"
def figure_catalog() -> str:
rows = [
{
"Figure": "F1",
"Type": "Prompt-only",
"File / prompt": "Prompt in Section: Figure Prompts",
"Purpose": "Overall WikiKG-Fact pipeline",
},
{
"Figure": "F2",
"Type": "Prompt-only",
"File / prompt": "Prompt in Section: Figure Prompts",
"Purpose": "Provenance/NLI filtering workflow",
},
{
"Figure": "F3",
"Type": "Generated from data",
"File / prompt": "figures/F3_retrieval_results.svg",
"Purpose": "Retrieval MRR and nDCG@10 improvements",
},
{
"Figure": "F4",
"Type": "Prompt-only",
"File / prompt": "Prompt in Section: Figure Prompts",
"Purpose": "WikiKG retrieval scoring with verified paths",
},
{
"Figure": "F5",
"Type": "Generated from data",
"File / prompt": "figures/F5_averitec_prompt_ablation.svg",
"Purpose": "AVeriTeC prompt ablation",
},
{
"Figure": "F6",
"Type": "Generated from data",
"File / prompt": "figures/F6_healthver_relation_filtering.svg",
"Purpose": "HealthVer biomedical relation filtering",
},
{
"Figure": "F7",
"Type": "Generated from data",
"File / prompt": "figures/F7_provenance_audit.svg",
"Purpose": "Provenance audit breakdown",
},
{
"Figure": "F8",
"Type": "Generated from data",
"File / prompt": "figures/F8_error_analysis.svg",
"Purpose": "Error taxonomy after WikiKG verification",
},
]
return markdown_table(rows, ["Figure", "Type", "File / prompt", "Purpose"])
def table_catalog() -> str:
rows = [
{"Table": "T1", "File": "outputs/final_tables/T1_dataset_statistics.csv", "Use": "Dataset statistics"},
{"Table": "T2", "File": "outputs/final_snapshot_20260506/tables/T3_protocol_matrix.csv", "Use": "Protocol matrix in paper; full appendix"},
{"Table": "T3", "File": "outputs/final_snapshot_20260506/tables/T4_model_stack.csv", "Use": "Model stack and smoke status"},
{"Table": "T4", "File": "outputs/final_tables/T8_wikikg_construction.csv", "Use": "WikiKG construction quality"},
{"Table": "T5", "File": "outputs/final_tables/T9_provenance_filtering.csv", "Use": "Provenance filtering"},
{"Table": "T6", "File": "outputs/final_tables/T10_wikikg_retrieval_results.csv", "Use": "Retrieval results"},
{"Table": "T7", "File": "outputs/final_tables/T11_main_verification.csv", "Use": "Verdict verification"},
{"Table": "T8", "File": "outputs/final_tables/T13_ablation.csv", "Use": "Ablation"},
{"Table": "T9", "File": "outputs/final_tables/T14_provenance_audit.csv", "Use": "Provenance audit"},
{"Table": "T10", "File": "outputs/final_tables/T15_error_analysis.csv", "Use": "Error analysis"},
{"Table": "T11", "File": "outputs/final_snapshot_20260506/ablation/healthver_relation_ablation.csv", "Use": "HealthVer relation filtering ablation"},
{"Table": "T12", "File": "outputs/final_tables/T17_stage_gates.csv", "Use": "Stage gates and reproducibility"},
]
return markdown_table(rows, ["Table", "File", "Use"])
def build(args: argparse.Namespace) -> str:
tables = args.tables
snapshot = args.snapshot
parts: list[str] = []
parts.append(
"""# WikiKG-Fact: Provenance-Constrained Knowledge Graphs for Evidence Organization in Fact Verification
> Paper framework generated from frozen artifacts in `outputs/final_snapshot_20260506`.
> Current scientific stance: Stage 0-11 complete; do not claim uniform classification SOTA.
## Abstract Draft
Fact verification systems increasingly rely on retrieval-augmented evidence, but retrieved text is often difficult to audit and can provide weak structure for relation-aware reasoning. We propose **WikiKG-Fact**, a provenance-constrained framework that extracts source-linked facts and triples from retrieved evidence, filters them with citation validation, NLI consistency, and relation-specific biomedical rules, and uses the resulting verified KG paths for retrieval and verification. Across Vietnamese news verification, English real-world fact-checking, and biomedical verification, WikiKG-Fact most consistently improves evidence ranking. On AVeriTeC `local_test`, WikiKG retrieval improves MRR from `0.549474` to `0.618306` and nDCG@10 from `0.462597` to `0.602517`. On ViFactCheck test, MRR improves from `0.914486` to `0.947158` and nDCG@10 from `0.934339` to `0.959119`. For final verdict prediction, the effect is dataset-dependent: verified KG paths slightly improve Gemma 4 RAG on AVeriTeC, while encoder-based gains on ViFactCheck and HealthVer are mixed across seeds. Ablation shows that verified KG path text outperforms unfiltered KG and that unfiltered KG can hurt verification. Audit results show strong source support on ViFactCheck and AVeriTeC, while HealthVer remains challenging because biomedical relation extraction is prone to overclaiming.
## Keywords
Fact verification; retrieval augmented verification; knowledge graphs; provenance; NLI filtering; biomedical fact checking; Vietnamese fact checking; AVeriTeC; HealthVer.
## Core Claim Boundary
Claim:
- WikiKG-Fact provides source-grounded KG construction, provenance/NLI filtering, improved evidence ranking, auditable paths, and mixed but informative verdict-prediction effects.
Do not claim:
- Consistent final classification improvement across all datasets.
- SOTA classification on all benchmarks.
- Raw LLM-generated KG is always beneficial.
## Contributions
1. A provenance-constrained WikiKG construction pipeline that extracts facts and triples from retrieved evidence while preserving source links.
2. A Stage 6 filtering layer combining citation validation, NLI consistency, and biomedical relation demotion to reduce unsupported or over-specific triples.
3. A WikiKG-enhanced retrieval stage showing clear ranking improvements on ViFactCheck and AVeriTeC.
4. A dataset-dependent verifier analysis showing small LLM+KG gains on AVeriTeC and mixed encoder results on ViFactCheck and HealthVer.
5. Ablation and audit evidence showing that verified KG paths help more than unfiltered KG, and that unfiltered KG can hurt.
"""
)
parts.append(section("Figure Inventory"))
parts.append(figure_catalog())
parts.append(
"""
### Embedded Generated Figures
![F3 Retrieval results](figures/F3_retrieval_results.svg)
![F5 AVeriTeC prompt ablation](figures/F5_averitec_prompt_ablation.svg)
![F6 HealthVer relation filtering](figures/F6_healthver_relation_filtering.svg)
![F7 Provenance audit](figures/F7_provenance_audit.svg)
![F8 Error analysis](figures/F8_error_analysis.svg)
### Figure Prompts for Non-Data Figures
**F1 Overall pipeline prompt.** Draw a clean academic workflow diagram titled "WikiKG-Fact pipeline". Left to right: Dataset claims -> candidate evidence retrieval -> reranking -> LLM fact/triple extraction -> citation validation -> NLI/provenance filtering -> verified KG paths -> WikiKG-enhanced retrieval -> verifier -> audit/error analysis. Use muted academic colors, arrows, compact boxes, and small labels for output artifacts such as `verified_facts`, `verified_triples`, and `verified_claim_subgraphs`.
**F2 Provenance filtering prompt.** Draw a provenance filtering flowchart. Inputs: `candidate_facts`, `candidate_triples`, `source_text`. Steps: citation check, source-text existence, fact-source NLI, triple verbalization-source NLI, relation-specific biomedical rules, demotion to `ASSOCIATED_WITH`, removal of unsupported triples. Outputs: `verified_facts`, `verified_triples`, `unsupported_triples`, `verified_claim_subgraphs`, `T9`. Use a strict validation/audit visual style.
**F4 WikiKG retrieval scoring prompt.** Draw a scoring diagram for reranking evidence with verified KG. Show candidate evidence on the left with `reranker_score`, `dense_score`, and `bm25_score`; verified KG path features in the middle with `entity_overlap`, `kg_path_score`, `provenance_confidence`, and `contradiction_signal`; final linear weighted score and reranked top-k evidence on the right. Include note: "verified artifacts only".
"""
)
parts.append(section("Table Inventory"))
parts.append(table_catalog())
parts.append(section("1. Introduction Framework"))
parts.append(
"""Fact verification requires more than label prediction: a system should retrieve relevant evidence, organize it into checkable reasoning units, and expose where each reasoning step came from. Existing retrieval-augmented verifiers often pass raw text to an encoder or LLM, which makes it difficult to audit why a piece of evidence was selected or whether a generated relation is faithful to the source. This problem becomes more serious in cross-domain settings: Vietnamese news claims require context-aware retrieval, AVeriTeC claims often require multiple pieces of web evidence, and biomedical claims can be harmed by over-specific causal or treatment relations.
WikiKG-Fact addresses this by constructing verified, source-linked KG paths from retrieved evidence. The key design choice is that LLM-generated triples are not used directly. They are first checked against citations and source text, validated with NLI, and filtered or demoted with domain-specific rules before being used for retrieval or verification. The paper should frame the main novelty around provenance, faithful evidence organization, retrieval improvement, and auditability rather than classification SOTA.
"""
)
parts.append(section("2. Related Work Skeleton"))
parts.append(
"""Cover these lines of work:
- Evidence retrieval and reranking for fact verification.
- Retrieval-augmented LLM/encoder verifiers.
- Knowledge graph construction for fact checking.
- Provenance, citation grounding, and faithfulness auditing.
- Biomedical claim verification and overclaim risk.
- Vietnamese and multilingual fact verification.
Positioning sentence:
> Unlike approaches that directly consume LLM-generated triples, WikiKG-Fact treats extraction as an intermediate candidate stage and only uses verified artifacts after citation validation, NLI consistency checking, and relation-specific filtering.
"""
)
parts.append(section("3. Datasets and Protocols"))
parts.append("### Table 1. Dataset statistics\n\n")
parts.append(table_from_csv(tables / "T1_dataset_statistics.csv", ["Dataset", "Language", "Domain", "Train", "Dev", "Test", "Evidence source", "Labels", "Unit"]))
parts.append("\n\n### Table 2. Protocol matrix\n\n")
parts.append(table_from_csv(snapshot / "tables" / "T3_protocol_matrix.csv", ["Protocol", "Dataset", "Input allowed", "Forbidden", "Role"]))
parts.append(
"""
Protocol notes:
- ViFactCheck main runs use Statement + Context chunks. Gold Evidence is diagnostic only.
- ViFactCheck Context chunks fuzzily cover only `59.17%` of gold evidence strings at threshold `0.75`; therefore evidence recall is coverage-aware.
- AVeriTeC hidden test is prediction-only and not used for local metric computation.
- HealthVer main protocol keeps the paired evidence anchor; claim-only retrieval is diagnostic only.
"""
)
parts.append(section("4. Method Framework"))
parts.append(
"""### 4.1 Candidate Evidence Retrieval
The baseline retrieval pipeline combines BM25, Qwen3 dense retrieval, hybrid merging, and Qwen3 reranking. ViFactCheck retrieves from context chunks; AVeriTeC retrieves from the QA/evidence store; HealthVer preserves the paired evidence anchor and uses retrieval only as augmentation.
### 4.2 LLM-Assisted Fact and Triple Extraction
The canonical WikiKG extraction uses `gemma4_31b_q4` consistently across pilot, eval, and train. Extraction top-k is `5` for ViFactCheck, `10` for AVeriTeC, and `5` for HealthVer. The extractor, prompt, and schema were not changed between pilot and canonical runs.
### 4.3 Provenance and NLI Filtering
Stage 6 filters candidate facts and triples through citation validation, source-text existence checks, source NLI, triple verbalization NLI, and relation-specific rules. HealthVer uses biomedical relation demotion to avoid over-specific claims such as unsupported `TREATS`, `PREVENTS`, `CAUSES`, or risk relations.
### 4.4 WikiKG-Enhanced Retrieval
WikiKG retrieval reranks candidate evidence using fixed linear weights over reranker, dense, BM25, entity overlap, KG path score, provenance confidence, and contradiction signal. Only `verified_*` artifacts are used in the main pipeline.
### 4.5 Verdict Prediction with Verified KG Paths
The verifier stage evaluates whether verified KG paths improve final verdict classification. The strongest AVeriTeC setting uses Gemma 4 RAG with verified KG prompt. ViFactCheck and HealthVer use encoder-based variants with text-only or numeric-fusion KG features.
"""
)
parts.append(section("5. Experimental Setup"))
parts.append("### Table 3. Model stack\n\n")
parts.append(table_from_csv(snapshot / "tables" / "T4_model_stack.csv", ["Module", "Dataset", "Main model", "Backup", "Load status", "Peak VRAM GB", "Max test batch", "Decision"]))
parts.append("\n\n### Training configurations\n\n")
parts.append(table_from_csv(snapshot / "tables" / "T5_training_config.csv", ["Dataset", "Verifier", "Top-k", "max_length", "batch_size", "gradient_accumulation_steps", "learning_rate", "epochs", "precision", "loss_type", "seeds", "input_format", "use_numeric_features"], digits=8))
parts.append(
"""
Metrics:
- Retrieval: R@5, R@10, R@30, MRR, nDCG@10, Evidence F1.
- Verification: accuracy, Macro-F1, per-class F1.
- KG construction: JSON success, citation coverage, ontology violation, subgraph coverage.
- Provenance: citation coverage, entailment pass rate, unsupported triple rate, verified triples per claim, subgraph coverage.
"""
)
parts.append(section("6. Results"))
parts.append("### 6.1 WikiKG construction quality\n\n")
parts.append(table_from_csv(tables / "T8_wikikg_construction.csv", ["Dataset", "Split", "Run Mode", "Run ID", "Extractor", "Top-k", "Claims", "Expected claims", "Facts", "Triples", "JSON success", "Citation coverage", "Ontology violation", "Claim subgraph coverage", "Avg facts/claim", "Avg triples/claim", "Status"], digits=6))
parts.append(
"""
Key reading:
- ViFactCheck is the cleanest dataset: `JSON success = 1.0`, `Citation coverage = 1.0`, `Ontology violation = 0.0`, and `Claim subgraph coverage = 1.0` on train/dev/test.
- AVeriTeC `local_test` is the most challenging evaluation split: `JSON success = 0.982`, `subgraph coverage = 0.982`.
- HealthVer train has the highest ontology noise: `ontology violation = 0.053154`, which Stage 6 addresses through provenance and relation filtering.
"""
)
parts.append("### 6.2 Provenance filtering\n\n")
parts.append(table_from_csv(tables / "T9_provenance_filtering.csv", ["Dataset", "Split", "Claims", "Subgraph rows", "NLI model", "Input triples", "Verified triples", "Unsupported triples", "Citation coverage", "Entailment pass rate", "Unsupported triple rate", "Avg verified facts/claim", "Avg verified triples/claim", "Subgraph coverage", "Status"], digits=6))
parts.append(
"""
Key reading:
- Citation coverage is `1.0` or nearly `1.0` across all canonical splits.
- HealthVer has the highest unsupported triple rates: `0.306367` dev, `0.326934` test, `0.345692` train.
- Despite filtering, HealthVer subgraph coverage remains high: `0.996870` dev, `0.996160` test, `0.990179` train.
"""
)
parts.append("### 6.3 WikiKG retrieval results\n\n")
parts.append(table_from_csv(tables / "T10_wikikg_retrieval_results.csv", ["Dataset", "Split", "Method", "R@5", "R@10", "R@30", "MRR", "nDCG@10", "Evidence F1", "candidate_count_avg", "Notes"], digits=6))
parts.append(
"""
Main retrieval claims:
- AVeriTeC `local_test`: MRR improves `0.549474 -> 0.618306`; nDCG@10 improves `0.462597 -> 0.602517`.
- ViFactCheck test: MRR improves `0.914486 -> 0.947158`; nDCG@10 improves `0.934339 -> 0.959119`.
- HealthVer main anchored protocol remains saturated at `1.0`; claim-only diagnostic MRR improves `0.008030 -> 0.033403` on test.
"""
)
parts.append("### 6.4 Verdict prediction results\n\n")
parts.append(table_from_csv(tables / "T11_main_verification.csv", ["Dataset", "Protocol", "Method", "Evidence source", "Verifier", "KG/path", "Top-k", "Acc", "Acc std", "Macro-F1", "Macro-F1 std", "Per-class F1", "Seeds", "Gate", "Notes"], digits=6))
parts.append(
"""
Main verification claims:
- AVeriTeC Gemma 4 RAG baseline: `Macro-F1 = 0.496418`.
- AVeriTeC Gemma 4 RAG + verified KG prompt: `Macro-F1 = 0.499072`.
- ViFactCheck baseline XLM-R: `0.797431 ± 0.009788`; WikiKG text-only: `0.796486 ± 0.022343`.
- HealthVer baseline PubMedBERT: `0.711397 ± 0.016933`; PubMedBERT + WikiKG: `0.711140 ± 0.012073`.
- Therefore final verdict prediction is dataset-dependent and should not be framed as consistent classification improvement.
"""
)
parts.append(section("7. Ablation Study"))
parts.append(table_from_csv(tables / "T13_ablation.csv", ["Group", "Dataset", "Variant", "Main metric", "Result", "Delta", "SUPPORTS F1", "REFUTES F1", "NEI F1", "CONFLICTING F1", "Interpretation"], digits=6))
parts.append(
"""
Main ablation claims:
- AVeriTeC `QA + KG paths only` reaches `0.503817`, the best prompt ablation.
- `QA + unfiltered KG` drops to `0.495062`, below QA-only `0.496418`, showing that unfiltered KG can hurt.
- Removing `kg_path_score` causes the largest AVeriTeC retrieval drop: nDCG@10 `0.602517 -> 0.595306`.
"""
)
parts.append("### HealthVer relation ablation from Stage 6 reports\n\n")
parts.append(table_from_csv(snapshot / "ablation" / "healthver_relation_ablation.csv", ["Split", "Variant", "Unsupported rate", "Relation demotions", "TREATS", "PREVENTS", "CAUSES", "INCREASES_RISK", "DECREASES_RISK", "Notes"], digits=6))
parts.append(section("8. Audit and Error Analysis"))
parts.append("### Table 9. Provenance audit\n\n")
parts.append(table_from_csv(tables / "T14_provenance_audit.csv", ["Dataset", "Split", "Audit size", "Supported by source", "Partially supported", "Unsupported", "Wrong entity", "Wrong relation", "Main finding"], digits=6))
parts.append(
"""
Supported-by-source rates:
- ViFactCheck test: `1270/1447 = 87.77%`.
- AVeriTeC local_test: `405/491 = 82.48%`.
- HealthVer test: `1227/1823 = 67.31%`.
"""
)
parts.append("### Table 10. Error analysis\n\n")
parts.append(table_from_csv(tables / "T15_error_analysis.csv", ["Error type", "ViFactCheck", "AVeriTeC", "HealthVer", "Example / interpretation"], digits=6))
parts.append(
"""
Key error-analysis claims:
- `Good KG path, wrong verdict` remains high: ViFactCheck `251`, AVeriTeC `171`, HealthVer `478`.
- AVeriTeC `CONFLICTING` remains difficult: `42` conflicting-confusion cases.
- HealthVer has `80` overclaim biomedical relation cases.
- AVeriTeC `QA + KG paths only` corrected `30` baseline mistakes, hurt `14`, and had `7` cases where verified KG was correct while unfiltered KG was wrong.
Case-study file:
- `outputs/final_snapshot_20260506/analysis/case_studies.md`
"""
)
parts.append(section("9. Discussion"))
parts.append(
"""The central result is that WikiKG-Fact improves the evidence organization layer more reliably than the final classifier. This is scientifically useful: the framework makes evidence ranking stronger, exposes source-linked reasoning paths, and provides a measurable audit trail. The mixed verifier result suggests that once evidence is better organized, the bottleneck shifts to final reasoning and calibration. This is especially visible in AVeriTeC `CONFLICTING` cases and HealthVer biomedical overclaim cases.
The ablation result is important for positioning. The fact that `QA + unfiltered KG` underperforms QA-only indicates that KG construction alone is not sufficient; provenance filtering is a necessary part of the method. The best AVeriTeC verifier variant is `QA + KG paths only`, which suggests that current provenance text formatting may dilute the prompt even though provenance is essential for filtering and audit.
"""
)
parts.append(section("10. Limitations"))
parts.append(
"""1. Final verdict gains are not uniform across datasets.
2. KG paths improve retrieval more consistently than classification.
3. AVeriTeC `CONFLICTING` and cherry-picking cases remain difficult.
4. HealthVer biomedical relation extraction requires cautious filtering to avoid overclaiming.
5. Offline LLM extraction has computational cost.
6. ViFactCheck gold Evidence is only partially covered by Context chunks, so evidence recall must be interpreted as coverage-aware.
7. Prompt formatting matters: current full KG+provenance prompt is weaker than paths-only on AVeriTeC.
"""
)
parts.append(section("11. Ethics and Reproducibility"))
parts.append(
"""The system should not present candidate triples as verified facts. Main downstream use must rely only on `verified_facts`, `verified_triples`, and `verified_claim_subgraphs`. Biomedical relation demotion is necessary to reduce overclaim risk, and HealthVer results should be reported with explicit caution.
Reproducibility artifacts:
- Final tables: `outputs/final_tables/`
- Frozen snapshot: `outputs/final_snapshot_20260506/`
- Generated figures: `outputs/paper/figures/`
- Paper framework: `outputs/paper/paper_framework_q1.md`
- Figure generator: `src/paper/build_figures.py`
- Build script: `scripts/15_build_paper_assets.sh`
"""
)
parts.append(section("12. Conclusion Draft"))
parts.append(
"""WikiKG-Fact shows that provenance-constrained KG construction is most valuable as an evidence organization and retrieval framework. Verified KG paths substantially improve ranking quality on AVeriTeC and ViFactCheck and provide source-grounded reasoning artifacts for audit. The final classification effect is dataset-dependent: LLM-based AVeriTeC verification benefits slightly from KG paths, while encoder-based variants on ViFactCheck and HealthVer remain mixed across seeds. Ablation and audit results show that raw, unfiltered KG can hurt, which makes provenance and NLI filtering a core contribution of the framework.
"""
)
parts.append(section("Appendix A. Stage Gate Snapshot"))
parts.append(table_from_csv(tables / "T17_stage_gates.csv", ["Gate", "Status", "Evidence file", "Decision"], digits=6))
parts.append(section("Appendix B. Internal Review Checklist"))
parts.append(
"""Review status for this framework:
- `PASS`: The framework uses the frozen artifact snapshot `outputs/final_snapshot_20260506`.
- `PASS`: Generated data figures are linked from `outputs/paper/figures`.
- `PASS`: Non-data figures are represented by short prompts in the Figure Prompts section.
- `PASS`: Main numeric tables are embedded directly in the framework.
- `PASS`: Full source CSV paths are listed in the Table Inventory.
- `PASS`: The paper claim does not overstate classification performance.
- `PASS`: The paper explicitly states that final verdict gains are dataset-dependent.
- `PASS`: The paper warns that only verified artifacts should be used in the main pipeline.
- `PASS`: ViFactCheck evidence coverage limitation is stated.
- `PASS`: HealthVer biomedical overclaim limitation is stated.
Before submission:
1. Convert generated SVGs to the target venue format if needed.
2. Replace F1/F2/F4 prompts with final diagrams.
3. Move long tables to appendix if the target venue has a strict page limit.
4. Keep the main paper narrative centered on provenance, retrieval, auditability, and mixed verifier results.
"""
)
return "\n".join(parts).strip() + "\n"
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--tables", type=Path, default=Path("outputs/final_tables"))
parser.add_argument("--snapshot", type=Path, default=Path("outputs/final_snapshot_20260506"))
parser.add_argument("--output", type=Path, default=Path("outputs/paper/paper_framework_q1.md"))
args = parser.parse_args()
args.output.parent.mkdir(parents=True, exist_ok=True)
args.output.write_text(build(args), encoding="utf-8")
print(f"Wrote paper framework to {args.output}")
if __name__ == "__main__":
main()