Run the Scheme A evidence-enhanced paper analysis workflow: prepare paper inputs, split the paper into key sections, generate structured extraction JSON, verify the extraction against the original text, and render final reports.
This skill is based on the uploaded Dify workflow 论文分析系统_方案A_结构化证据增强版.
Always save runtime downloads and generated outputs under the Ubuntu desktop unless the user explicitly requests another location:
bash
~/Desktop/paper_analysis_results/<YYYYMMDD_HHMMSS>/
Do not modify the original local paper file. Copy it into the work directory before extraction. Download URL inputs into the same batch work directory.
Accept:
language: 中文 or 英文; default to 中文 when unspecified.paper_files: one or more local paper files, preferably PDF, DOCX, TXT, MD, or HTML.paper_urls: one or more PDF/direct paper URLs, comma-separated or repeated.If both local files and URLs are empty, stop with this message:
text
上传的文件和论文URL不能同时为空。
Run:
bash
python scripts/prepare_papers.py --language 中文 --files /path/to/paper.pdf --urls "https://example.com/paper.pdf"
Use only the relevant arguments. For URL-only runs, omit --files; for local-only runs, omit --urls.
The script creates manifest.json and one work directory per paper. It performs:
paper_body,For each paper in manifest.json, read:
text
prompts/01_structured_extraction_prompt.md
Send that prompt to the model. Save the model response exactly as JSON-only content to:
text
generated/structured_result.json
Required JSON fields:
json
{
"title": "",
"task": "",
"background": "",
"problem_statement": "",
"method_name": "",
"method_core": "",
"datasets": [],
"baselines": [],
"metrics": [],
"main_results": [
{"dataset": "", "metric": "", "value": "", "baseline": "", "improvement": ""}
],
"ablations": [],
"limitations": [],
"claims": [],
"contributions": [],
"evidence_spans": [
{"field": "", "claim": "", "evidence": ""}
]
}
Extraction rules:
paper_body when a section is empty or insufficient.datasets, baselines, or metrics empty just because the experiment section is weak; first check paper_body, result text, implementation details, and table-neighboring text.Open:
text
prompts/02_verification_prompt_template.md
Replace {{structured_json}} with the actual content of generated/structured_result.json. Send the complete verification prompt to the model and save JSON-only output to:
text
generated/verification_result.json
Required verification JSON:
json
{
"overall_score": 0,
"hallucination_risk": "low/medium/high",
"issues": [
{"field": "", "problem": "", "severity": "low/medium/high"}
],
"verified_claims": [
{"claim": "", "status": "supported/weak/unsupported", "evidence": ""}
],
"final_verdict": ""
}
Verification rules:
issues.After structured_result.json and verification_result.json are saved for every paper, run:
bash
python scripts/render_report.py --manifest ~/Desktop/paper_analysis_results/<YYYYMMDD_HHMMSS>/manifest.json
Outputs per paper:
text
report/final_report.md
report/final_report.html
report/final_report.docx
The .md file preserves editable Markdown source. The .html file is the rendered visual version. The .docx file is the Word-compatible report.
Chinese report sections:
English report sections mirror the same structure as Paper Analysis.
references/prompt_templates.md when prompt details are needed.references/workflow_mapping.md when checking how the Dify nodes map to this skill.references/dify_scheme_a_source.yml preserves the uploaded Dify DSL source for auditability.