qwen-sci 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. qwen_sci-0.2.2.dist-info/METADATA +492 -0
  2. qwen_sci-0.2.2.dist-info/RECORD +549 -0
  3. qwen_sci-0.2.2.dist-info/WHEEL +4 -0
  4. qwen_sci-0.2.2.dist-info/entry_points.txt +6 -0
  5. qwen_sci-0.2.2.dist-info/licenses/LICENSE +21 -0
  6. src/1.txt +1 -0
  7. src/__init__.py +1 -0
  8. src/__main__.py +5 -0
  9. src/agents/__init__.py +1 -0
  10. src/agents/experiment_design_agent/__init__.py +268 -0
  11. src/agents/experiment_design_agent/artifacts.py +747 -0
  12. src/agents/experiment_design_agent/cache.py +319 -0
  13. src/agents/experiment_design_agent/completeness.py +130 -0
  14. src/agents/experiment_design_agent/contracts.py +771 -0
  15. src/agents/experiment_design_agent/counterexample_analyzer.py +187 -0
  16. src/agents/experiment_design_agent/design_evidence_paper_screener.py +470 -0
  17. src/agents/experiment_design_agent/discipline_catalog.py +178 -0
  18. src/agents/experiment_design_agent/evidence_cards.py +338 -0
  19. src/agents/experiment_design_agent/evidence_planner.py +452 -0
  20. src/agents/experiment_design_agent/formal_reasoning_planner.py +884 -0
  21. src/agents/experiment_design_agent/fulltext_acquisition.py +863 -0
  22. src/agents/experiment_design_agent/idea_adapter.py +100 -0
  23. src/agents/experiment_design_agent/idea_intake.py +87 -0
  24. src/agents/experiment_design_agent/llm_json.py +328 -0
  25. src/agents/experiment_design_agent/orchestrator.py +1220 -0
  26. src/agents/experiment_design_agent/reasoning_context.py +183 -0
  27. src/agents/experiment_design_agent/reasoning_validation.py +546 -0
  28. src/agents/experiment_design_agent/run.py +481 -0
  29. src/agents/experiment_design_agent/run_logging.py +292 -0
  30. src/agents/experiment_design_agent/scope_gate.py +198 -0
  31. src/agents/experiment_design_agent/study_type_composer.py +1360 -0
  32. src/agents/experiment_design_agent/survey_evidence.py +1381 -0
  33. src/agents/experiment_design_agent/template_router.py +195 -0
  34. src/agents/experiment_design_agent/variable_claim_extractor.py +93 -0
  35. src/agents/idea_agent/__init__.py +1 -0
  36. src/agents/idea_agent/agent/__init__.py +6 -0
  37. src/agents/idea_agent/agent/artifacts.py +308 -0
  38. src/agents/idea_agent/agent/base.py +122 -0
  39. src/agents/idea_agent/agent/ligagent.py +488 -0
  40. src/agents/idea_agent/agent/mcts.py +2060 -0
  41. src/agents/idea_agent/agent/prompts/__init__.py +48 -0
  42. src/agents/idea_agent/agent/prompts/advanced_analysis.py +235 -0
  43. src/agents/idea_agent/agent/prompts/algorithm_alignment.py +55 -0
  44. src/agents/idea_agent/agent/prompts/algorithm_structuring.py +48 -0
  45. src/agents/idea_agent/agent/prompts/component_extraction.py +62 -0
  46. src/agents/idea_agent/agent/prompts/component_novelty_evaluation.py +54 -0
  47. src/agents/idea_agent/agent/prompts/experiment_findings_extraction.py +39 -0
  48. src/agents/idea_agent/agent/prompts/idea_fusion.py +295 -0
  49. src/agents/idea_agent/agent/prompts/idea_introduction.py +30 -0
  50. src/agents/idea_agent/agent/prompts/idea_result_alignment.py +39 -0
  51. src/agents/idea_agent/agent/prompts/input_interpreter.py +52 -0
  52. src/agents/idea_agent/agent/prompts/keynote_ops.py +78 -0
  53. src/agents/idea_agent/agent/prompts/mcts_evaluation.py +235 -0
  54. src/agents/idea_agent/agent/prompts/mcts_generation.py +140 -0
  55. src/agents/idea_agent/agent/prompts/mechanism_commit_query.py +99 -0
  56. src/agents/idea_agent/agent/prompts/memory_selection.py +0 -0
  57. src/agents/idea_agent/agent/prompts/prompt_modes.py +16 -0
  58. src/agents/idea_agent/agent/prompts/rag_query.py +34 -0
  59. src/agents/idea_agent/agent/prompts/re_analysis_replan.py +48 -0
  60. src/agents/idea_agent/agent/prompts/reference_grounding.py +34 -0
  61. src/agents/idea_agent/agent/prompts/root_domain_classification.py +32 -0
  62. src/agents/idea_agent/agent/prompts/scientific_debate.py +88 -0
  63. src/agents/idea_agent/agent/prompts/scientific_materialization.py +45 -0
  64. src/agents/idea_agent/agent/prompts/skill_instantiation.py +193 -0
  65. src/agents/idea_agent/agent/prompts/theory_transfer_query.py +93 -0
  66. src/agents/idea_agent/agent/prompts/topic_background.py +15 -0
  67. src/agents/idea_agent/agent/skills/DEFAULT_SKILL_TEMPLATES.json +263 -0
  68. src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/SKILL.md +40 -0
  69. src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/references/contrast_patterns.md +22 -0
  70. src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/SKILL.md +40 -0
  71. src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/references/mechanism_cards.md +24 -0
  72. src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/SKILL.md +39 -0
  73. src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/references/hierarchy_patterns.md +22 -0
  74. src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/SKILL.md +39 -0
  75. src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/references/mechanism_commit_patterns.md +24 -0
  76. src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/SKILL.md +39 -0
  77. src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/references/coordination_patterns.md +22 -0
  78. src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/SKILL.md +41 -0
  79. src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/references/speculation_patterns.md +22 -0
  80. src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/SKILL.md +39 -0
  81. src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/references/modularity_patterns.md +22 -0
  82. src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/SKILL.md +40 -0
  83. src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/references/transfer_patterns.md +24 -0
  84. src/agents/idea_agent/example/idea_result.json +900 -0
  85. src/agents/idea_agent/run.py +276 -0
  86. src/agents/idea_agent/tests/test_advanced_analysis_contract.py +90 -0
  87. src/agents/idea_agent/tests/test_gap_hypothesis_bridge.py +166 -0
  88. src/agents/idea_agent/tests/test_idea_debate.py +480 -0
  89. src/agents/idea_agent/tests/test_idea_result_v5.py +99 -0
  90. src/agents/idea_agent/tests/test_idea_synthesis.py +92 -0
  91. src/agents/idea_agent/tests/test_mature_idea_sources.py +27 -0
  92. src/agents/idea_agent/tests/test_multimodal_idea_integration.py +386 -0
  93. src/agents/idea_agent/tests/test_profile_materialization_and_scoring.py +219 -0
  94. src/agents/idea_agent/tests/test_profile_native_skill_rendering.py +122 -0
  95. src/agents/idea_agent/tests/test_result_persistence.py +183 -0
  96. src/agents/idea_agent/tests/test_scientific_intervention_profiles.py +241 -0
  97. src/agents/idea_agent/tests/test_scientific_rubric_and_prompts.py +559 -0
  98. src/agents/idea_agent/tests/test_strict_json_object_responses.py +48 -0
  99. src/agents/idea_agent/utils/core/__init__.py +1 -0
  100. src/agents/idea_agent/utils/core/ablation_inputs.py +60 -0
  101. src/agents/idea_agent/utils/core/chat_errors.py +95 -0
  102. src/agents/idea_agent/utils/core/chat_router.py +130 -0
  103. src/agents/idea_agent/utils/core/chat_transport.py +188 -0
  104. src/agents/idea_agent/utils/core/config_loader.py +166 -0
  105. src/agents/idea_agent/utils/core/json_utils.py +28 -0
  106. src/agents/idea_agent/utils/core/logger.py +287 -0
  107. src/agents/idea_agent/utils/core/progress.py +58 -0
  108. src/agents/idea_agent/utils/core/response_parsing.py +57 -0
  109. src/agents/idea_agent/utils/core/run_inputs.py +198 -0
  110. src/agents/idea_agent/utils/mcts/__init__.py +1 -0
  111. src/agents/idea_agent/utils/mcts/component_novelty.py +342 -0
  112. src/agents/idea_agent/utils/mcts/defect_registry.py +302 -0
  113. src/agents/idea_agent/utils/mcts/idea_routes.py +61 -0
  114. src/agents/idea_agent/utils/mcts/idea_taste_presets.py +312 -0
  115. src/agents/idea_agent/utils/mcts/mcts_helpers.py +738 -0
  116. src/agents/idea_agent/utils/mcts/mcts_runtime.py +3000 -0
  117. src/agents/idea_agent/utils/mcts/scientific_intervention_ontology.py +1561 -0
  118. src/agents/idea_agent/utils/mcts/scientific_rubric.py +211 -0
  119. src/agents/idea_agent/utils/mcts/skill_parsing.py +92 -0
  120. src/agents/idea_agent/utils/papers/__init__.py +1 -0
  121. src/agents/idea_agent/utils/papers/paper_graph_vector_store.py +499 -0
  122. src/agents/idea_agent/utils/papers/paper_repository.py +372 -0
  123. src/agents/idea_agent/utils/prompting/__init__.py +1 -0
  124. src/agents/idea_agent/utils/prompting/prompt_views.py +637 -0
  125. src/agents/idea_agent/utils/workflow/__init__.py +1 -0
  126. src/agents/idea_agent/utils/workflow/advanced_analysis_contract.py +244 -0
  127. src/agents/idea_agent/utils/workflow/gap_hypothesis_bridge.py +461 -0
  128. src/agents/idea_agent/utils/workflow/idea_contract.py +426 -0
  129. src/agents/idea_agent/utils/workflow/idea_debate.py +1238 -0
  130. src/agents/idea_agent/utils/workflow/idea_diversity.py +163 -0
  131. src/agents/idea_agent/utils/workflow/idea_fusion.py +889 -0
  132. src/agents/idea_agent/utils/workflow/idea_helpers.py +478 -0
  133. src/agents/idea_agent/utils/workflow/idea_portfolio.py +422 -0
  134. src/agents/idea_agent/utils/workflow/idea_synthesis.py +482 -0
  135. src/agents/idea_agent/utils/workflow/ligagent_flow.py +581 -0
  136. src/agents/idea_agent/utils/workflow/ligagent_handlers.py +1836 -0
  137. src/agents/idea_agent/utils/workflow/ligagent_helpers.py +1331 -0
  138. src/agents/idea_agent/utils/workflow/ligagent_utils.py +322 -0
  139. src/agents/idea_agent/utils/workflow/mature_idea_sources.py +648 -0
  140. src/agents/idea_agent/utils/workflow/multimodal_data_anchoring.py +578 -0
  141. src/agents/idea_agent/utils/workflow/result_persistence.py +774 -0
  142. src/agents/idea_agent/utils/workflow/stage_contract.py +76 -0
  143. src/agents/idea_agent/utils/workflow/workflow_runtime.py +288 -0
  144. src/agents/research_plan_author/__init__.py +50 -0
  145. src/agents/research_plan_author/artifacts.py +270 -0
  146. src/agents/research_plan_author/authoring_blueprint.py +1246 -0
  147. src/agents/research_plan_author/bibtex_renderer.py +252 -0
  148. src/agents/research_plan_author/contract_repair.py +131 -0
  149. src/agents/research_plan_author/contracts.py +745 -0
  150. src/agents/research_plan_author/cross_section_editor.py +232 -0
  151. src/agents/research_plan_author/document_quality.py +987 -0
  152. src/agents/research_plan_author/idea_evolution.py +223 -0
  153. src/agents/research_plan_author/input_loader.py +76 -0
  154. src/agents/research_plan_author/latex_compiler.py +260 -0
  155. src/agents/research_plan_author/latex_safety.py +159 -0
  156. src/agents/research_plan_author/llm_json.py +74 -0
  157. src/agents/research_plan_author/markdown_renderer.py +275 -0
  158. src/agents/research_plan_author/pdf_validator.py +149 -0
  159. src/agents/research_plan_author/render.py +166 -0
  160. src/agents/research_plan_author/render_artifacts.py +187 -0
  161. src/agents/research_plan_author/run.py +765 -0
  162. src/agents/research_plan_author/run_logging.py +209 -0
  163. src/agents/research_plan_author/section_cache.py +184 -0
  164. src/agents/research_plan_author/section_composer.py +1764 -0
  165. src/agents/research_plan_author/section_router.py +209 -0
  166. src/agents/research_plan_author/semantic_validator.py +254 -0
  167. src/agents/research_plan_author/source_bundle.py +46 -0
  168. src/agents/research_plan_author/source_registry.py +208 -0
  169. src/agents/research_plan_author/survey_source_loader.py +137 -0
  170. src/agents/research_plan_author/template_adapter.py +173 -0
  171. src/agents/research_plan_author/template_profile.py +204 -0
  172. src/agents/research_plan_author/tex_renderer.py +496 -0
  173. src/agents/research_plan_author/theory_presentation.py +134 -0
  174. src/agents/research_plan_author/theory_spine.py +703 -0
  175. src/agents/survey_agent/Dockerfile +54 -0
  176. src/agents/survey_agent/README.md +350 -0
  177. src/agents/survey_agent/config/deep_survey.yaml +217 -0
  178. src/agents/survey_agent/config/deep_survey_batch.yaml +176 -0
  179. src/agents/survey_agent/config/deep_survey_fast.yaml +183 -0
  180. src/agents/survey_agent/config/evaluate_baseline.yaml +197 -0
  181. src/agents/survey_agent/config/outcomeRAG.yaml +159 -0
  182. src/agents/survey_agent/env_report.md +348 -0
  183. src/agents/survey_agent/modules/__init__.py +0 -0
  184. src/agents/survey_agent/modules/code_collector.py +2194 -0
  185. src/agents/survey_agent/modules/code_report_generator.py +1282 -0
  186. src/agents/survey_agent/modules/data_manager.py +1713 -0
  187. src/agents/survey_agent/modules/database.py +167 -0
  188. src/agents/survey_agent/modules/fulltext_download_cache.py +462 -0
  189. src/agents/survey_agent/modules/fulltext_http.py +134 -0
  190. src/agents/survey_agent/modules/fulltext_resolution.py +749 -0
  191. src/agents/survey_agent/modules/judge.py +434 -0
  192. src/agents/survey_agent/modules/outcome_RAG.py +236 -0
  193. src/agents/survey_agent/modules/paper_graph_retriever.py +1075 -0
  194. src/agents/survey_agent/modules/pe.py +1729 -0
  195. src/agents/survey_agent/modules/pseudo_creator.py +782 -0
  196. src/agents/survey_agent/modules/pseudo_reviser.py +537 -0
  197. src/agents/survey_agent/modules/refine_agent.py +1952 -0
  198. src/agents/survey_agent/modules/survey_generator.py +5691 -0
  199. src/agents/survey_agent/modules/survey_visualizer.py +1817 -0
  200. src/agents/survey_agent/modules/visual_prompts.py +327 -0
  201. src/agents/survey_agent/modules/work_analyzer.py +2750 -0
  202. src/agents/survey_agent/modules/work_collector.py +5649 -0
  203. src/agents/survey_agent/scripts/baseline_evaluation.py +411 -0
  204. src/agents/survey_agent/scripts/run_deep_survey.py +224 -0
  205. src/agents/survey_agent/scripts/run_deep_survey_adapter.py +407 -0
  206. src/agents/survey_agent/scripts/run_deep_survey_adapter_with_input.py +409 -0
  207. src/agents/survey_agent/scripts/run_deep_survey_batch.py +228 -0
  208. src/agents/survey_agent/scripts/run_deep_survey_batch_arg.py +243 -0
  209. src/agents/survey_agent/scripts/run_deep_survey_batch_settings.py +218 -0
  210. src/agents/survey_agent/scripts/run_keynotes_gen.py +128 -0
  211. src/agents/survey_agent/scripts/run_work_clusters.py +140 -0
  212. src/agents/survey_agent/utils/__init__.py +0 -0
  213. src/agents/survey_agent/utils/ablation_utils.py +317 -0
  214. src/agents/survey_agent/utils/api_call.py +2518 -0
  215. src/agents/survey_agent/utils/chat_utils.py +82 -0
  216. src/agents/survey_agent/utils/config_utils.py +70 -0
  217. src/agents/survey_agent/utils/convert_to_md.py +29 -0
  218. src/agents/survey_agent/utils/err_info.py +24 -0
  219. src/agents/survey_agent/utils/file_utils.py +176 -0
  220. src/agents/survey_agent/utils/gpu_utils.py +145 -0
  221. src/agents/survey_agent/utils/graph_visualizer.py +279 -0
  222. src/agents/survey_agent/utils/html_utils.py +181 -0
  223. src/agents/survey_agent/utils/latex_generator_intra_cluster.py +529 -0
  224. src/agents/survey_agent/utils/latex_generator_relation_table.py +193 -0
  225. src/agents/survey_agent/utils/mineru_section_packer.py +334 -0
  226. src/agents/survey_agent/utils/mineru_utils.py +396 -0
  227. src/agents/survey_agent/utils/paper.py +144 -0
  228. src/agents/survey_agent/utils/read_yaml.py +15 -0
  229. src/agents/survey_agent/utils/repo_utils.py +167 -0
  230. src/agents/survey_agent/utils/rich_logger.py +77 -0
  231. src/agents/survey_agent/utils/step2v2.py +874 -0
  232. src/agents/survey_agent/utils/step2v2_extractor.py +856 -0
  233. src/agents/survey_agent/utils/topic_survey_storage.py +309 -0
  234. src/agents/survey_agent/utils/utils.py +118 -0
  235. src/agents/survey_agent/utils/work.py +2 -0
  236. src/cli.py +1611 -0
  237. src/config/__init__.py +213 -0
  238. src/config/default.yaml +1122 -0
  239. src/harness/LICENSE +21 -0
  240. src/harness/VENDORED.md +14 -0
  241. src/harness/src/__init__.py +0 -0
  242. src/harness/src/openharness/__init__.py +0 -0
  243. src/harness/src/openharness/__main__.py +6 -0
  244. src/harness/src/openharness/api/__init__.py +21 -0
  245. src/harness/src/openharness/api/client.py +281 -0
  246. src/harness/src/openharness/api/codex_client.py +407 -0
  247. src/harness/src/openharness/api/copilot_auth.py +240 -0
  248. src/harness/src/openharness/api/copilot_client.py +134 -0
  249. src/harness/src/openharness/api/errors.py +19 -0
  250. src/harness/src/openharness/api/openai_client.py +577 -0
  251. src/harness/src/openharness/api/provider.py +186 -0
  252. src/harness/src/openharness/api/registry.py +437 -0
  253. src/harness/src/openharness/api/usage.py +17 -0
  254. src/harness/src/openharness/auth/__init__.py +29 -0
  255. src/harness/src/openharness/auth/external.py +610 -0
  256. src/harness/src/openharness/auth/flows.py +189 -0
  257. src/harness/src/openharness/auth/manager.py +482 -0
  258. src/harness/src/openharness/auth/storage.py +269 -0
  259. src/harness/src/openharness/autopilot/__init__.py +23 -0
  260. src/harness/src/openharness/autopilot/service.py +2239 -0
  261. src/harness/src/openharness/autopilot/types.py +91 -0
  262. src/harness/src/openharness/bridge/__init__.py +20 -0
  263. src/harness/src/openharness/bridge/manager.py +106 -0
  264. src/harness/src/openharness/bridge/session_runner.py +46 -0
  265. src/harness/src/openharness/bridge/types.py +37 -0
  266. src/harness/src/openharness/bridge/work_secret.py +41 -0
  267. src/harness/src/openharness/channels/UPSTREAM +6 -0
  268. src/harness/src/openharness/channels/__init__.py +22 -0
  269. src/harness/src/openharness/channels/adapter.py +131 -0
  270. src/harness/src/openharness/channels/bus/__init__.py +6 -0
  271. src/harness/src/openharness/channels/bus/events.py +38 -0
  272. src/harness/src/openharness/channels/bus/queue.py +44 -0
  273. src/harness/src/openharness/channels/impl/__init__.py +6 -0
  274. src/harness/src/openharness/channels/impl/base.py +141 -0
  275. src/harness/src/openharness/channels/impl/dingtalk.py +445 -0
  276. src/harness/src/openharness/channels/impl/discord.py +311 -0
  277. src/harness/src/openharness/channels/impl/email.py +410 -0
  278. src/harness/src/openharness/channels/impl/feishu.py +1342 -0
  279. src/harness/src/openharness/channels/impl/manager.py +257 -0
  280. src/harness/src/openharness/channels/impl/matrix.py +700 -0
  281. src/harness/src/openharness/channels/impl/mochat.py +897 -0
  282. src/harness/src/openharness/channels/impl/qq.py +141 -0
  283. src/harness/src/openharness/channels/impl/slack.py +284 -0
  284. src/harness/src/openharness/channels/impl/telegram.py +525 -0
  285. src/harness/src/openharness/channels/impl/whatsapp.py +159 -0
  286. src/harness/src/openharness/cli.py +2551 -0
  287. src/harness/src/openharness/commands/__init__.py +21 -0
  288. src/harness/src/openharness/commands/registry.py +2783 -0
  289. src/harness/src/openharness/config/__init__.py +34 -0
  290. src/harness/src/openharness/config/paths.py +160 -0
  291. src/harness/src/openharness/config/schema.py +119 -0
  292. src/harness/src/openharness/config/settings.py +1104 -0
  293. src/harness/src/openharness/coordinator/__init__.py +12 -0
  294. src/harness/src/openharness/coordinator/agent_definitions.py +975 -0
  295. src/harness/src/openharness/coordinator/coordinator_mode.py +520 -0
  296. src/harness/src/openharness/engine/__init__.py +80 -0
  297. src/harness/src/openharness/engine/cost_tracker.py +24 -0
  298. src/harness/src/openharness/engine/messages.py +222 -0
  299. src/harness/src/openharness/engine/query.py +1188 -0
  300. src/harness/src/openharness/engine/query_engine.py +313 -0
  301. src/harness/src/openharness/engine/stream_events.py +90 -0
  302. src/harness/src/openharness/hooks/__init__.py +50 -0
  303. src/harness/src/openharness/hooks/events.py +20 -0
  304. src/harness/src/openharness/hooks/executor.py +242 -0
  305. src/harness/src/openharness/hooks/hot_reload.py +31 -0
  306. src/harness/src/openharness/hooks/loader.py +68 -0
  307. src/harness/src/openharness/hooks/schemas.py +66 -0
  308. src/harness/src/openharness/hooks/types.py +38 -0
  309. src/harness/src/openharness/keybindings/__init__.py +14 -0
  310. src/harness/src/openharness/keybindings/default_bindings.py +11 -0
  311. src/harness/src/openharness/keybindings/loader.py +22 -0
  312. src/harness/src/openharness/keybindings/parser.py +18 -0
  313. src/harness/src/openharness/keybindings/resolver.py +13 -0
  314. src/harness/src/openharness/mcp/__init__.py +79 -0
  315. src/harness/src/openharness/mcp/client.py +298 -0
  316. src/harness/src/openharness/mcp/config.py +16 -0
  317. src/harness/src/openharness/mcp/types.py +76 -0
  318. src/harness/src/openharness/memory/__init__.py +25 -0
  319. src/harness/src/openharness/memory/agent.py +91 -0
  320. src/harness/src/openharness/memory/manager.py +183 -0
  321. src/harness/src/openharness/memory/memdir.py +52 -0
  322. src/harness/src/openharness/memory/migrate.py +137 -0
  323. src/harness/src/openharness/memory/paths.py +22 -0
  324. src/harness/src/openharness/memory/relevance.py +145 -0
  325. src/harness/src/openharness/memory/scan.py +116 -0
  326. src/harness/src/openharness/memory/schema.py +443 -0
  327. src/harness/src/openharness/memory/search.py +71 -0
  328. src/harness/src/openharness/memory/team.py +90 -0
  329. src/harness/src/openharness/memory/types.py +33 -0
  330. src/harness/src/openharness/memory/usage.py +153 -0
  331. src/harness/src/openharness/output_styles/__init__.py +5 -0
  332. src/harness/src/openharness/output_styles/loader.py +42 -0
  333. src/harness/src/openharness/permissions/__init__.py +26 -0
  334. src/harness/src/openharness/permissions/checker.py +200 -0
  335. src/harness/src/openharness/permissions/modes.py +13 -0
  336. src/harness/src/openharness/personalization/__init__.py +6 -0
  337. src/harness/src/openharness/personalization/extractor.py +138 -0
  338. src/harness/src/openharness/personalization/rules.py +64 -0
  339. src/harness/src/openharness/personalization/session_hook.py +65 -0
  340. src/harness/src/openharness/platforms.py +86 -0
  341. src/harness/src/openharness/plugins/__init__.py +53 -0
  342. src/harness/src/openharness/plugins/bundled/__init__.py +0 -0
  343. src/harness/src/openharness/plugins/installer.py +39 -0
  344. src/harness/src/openharness/plugins/loader.py +730 -0
  345. src/harness/src/openharness/plugins/schemas.py +24 -0
  346. src/harness/src/openharness/plugins/types.py +59 -0
  347. src/harness/src/openharness/prompts/__init__.py +14 -0
  348. src/harness/src/openharness/prompts/claudemd.py +48 -0
  349. src/harness/src/openharness/prompts/context.py +187 -0
  350. src/harness/src/openharness/prompts/environment.py +135 -0
  351. src/harness/src/openharness/prompts/system_prompt.py +109 -0
  352. src/harness/src/openharness/sandbox/Dockerfile +6 -0
  353. src/harness/src/openharness/sandbox/__init__.py +33 -0
  354. src/harness/src/openharness/sandbox/adapter.py +148 -0
  355. src/harness/src/openharness/sandbox/docker_backend.py +232 -0
  356. src/harness/src/openharness/sandbox/docker_image.py +103 -0
  357. src/harness/src/openharness/sandbox/path_validator.py +37 -0
  358. src/harness/src/openharness/sandbox/session.py +63 -0
  359. src/harness/src/openharness/services/__init__.py +30 -0
  360. src/harness/src/openharness/services/autodream/__init__.py +34 -0
  361. src/harness/src/openharness/services/autodream/backup.py +104 -0
  362. src/harness/src/openharness/services/autodream/lock.py +138 -0
  363. src/harness/src/openharness/services/autodream/prompt.py +128 -0
  364. src/harness/src/openharness/services/autodream/service.py +313 -0
  365. src/harness/src/openharness/services/compact/__init__.py +1725 -0
  366. src/harness/src/openharness/services/cron.py +137 -0
  367. src/harness/src/openharness/services/cron_scheduler.py +595 -0
  368. src/harness/src/openharness/services/lsp/__init__.py +216 -0
  369. src/harness/src/openharness/services/memory_extract/__init__.py +261 -0
  370. src/harness/src/openharness/services/oauth/__init__.py +0 -0
  371. src/harness/src/openharness/services/session_backend.py +97 -0
  372. src/harness/src/openharness/services/session_memory/__init__.py +139 -0
  373. src/harness/src/openharness/services/session_storage.py +230 -0
  374. src/harness/src/openharness/services/token_estimation.py +15 -0
  375. src/harness/src/openharness/services/tool_outputs.py +55 -0
  376. src/harness/src/openharness/skills/__init__.py +44 -0
  377. src/harness/src/openharness/skills/_frontmatter.py +97 -0
  378. src/harness/src/openharness/skills/bundled/__init__.py +75 -0
  379. src/harness/src/openharness/skills/bundled/content/commit.md +25 -0
  380. src/harness/src/openharness/skills/bundled/content/debug.md +25 -0
  381. src/harness/src/openharness/skills/bundled/content/diagnose.md +35 -0
  382. src/harness/src/openharness/skills/bundled/content/plan.md +39 -0
  383. src/harness/src/openharness/skills/bundled/content/review.md +33 -0
  384. src/harness/src/openharness/skills/bundled/content/simplify.md +26 -0
  385. src/harness/src/openharness/skills/bundled/content/skill-creator.md +175 -0
  386. src/harness/src/openharness/skills/bundled/content/test.md +38 -0
  387. src/harness/src/openharness/skills/loader.py +229 -0
  388. src/harness/src/openharness/skills/registry.py +29 -0
  389. src/harness/src/openharness/skills/types.py +24 -0
  390. src/harness/src/openharness/state/__init__.py +6 -0
  391. src/harness/src/openharness/state/app_state.py +30 -0
  392. src/harness/src/openharness/state/store.py +40 -0
  393. src/harness/src/openharness/swarm/__init__.py +70 -0
  394. src/harness/src/openharness/swarm/in_process.py +693 -0
  395. src/harness/src/openharness/swarm/lockfile.py +24 -0
  396. src/harness/src/openharness/swarm/mailbox.py +522 -0
  397. src/harness/src/openharness/swarm/permission_sync.py +1168 -0
  398. src/harness/src/openharness/swarm/registry.py +410 -0
  399. src/harness/src/openharness/swarm/spawn_utils.py +229 -0
  400. src/harness/src/openharness/swarm/subprocess_backend.py +171 -0
  401. src/harness/src/openharness/swarm/team_lifecycle.py +910 -0
  402. src/harness/src/openharness/swarm/types.py +398 -0
  403. src/harness/src/openharness/swarm/worktree.py +315 -0
  404. src/harness/src/openharness/tasks/__init__.py +18 -0
  405. src/harness/src/openharness/tasks/local_agent_task.py +28 -0
  406. src/harness/src/openharness/tasks/local_shell_task.py +17 -0
  407. src/harness/src/openharness/tasks/manager.py +475 -0
  408. src/harness/src/openharness/tasks/stop_task.py +11 -0
  409. src/harness/src/openharness/tasks/types.py +32 -0
  410. src/harness/src/openharness/themes/__init__.py +21 -0
  411. src/harness/src/openharness/themes/builtin.py +89 -0
  412. src/harness/src/openharness/themes/loader.py +55 -0
  413. src/harness/src/openharness/themes/schema.py +54 -0
  414. src/harness/src/openharness/tools/__init__.py +107 -0
  415. src/harness/src/openharness/tools/agent_tool.py +141 -0
  416. src/harness/src/openharness/tools/ask_user_question_tool.py +46 -0
  417. src/harness/src/openharness/tools/base.py +80 -0
  418. src/harness/src/openharness/tools/bash_tool.py +259 -0
  419. src/harness/src/openharness/tools/brief_tool.py +33 -0
  420. src/harness/src/openharness/tools/config_tool.py +54 -0
  421. src/harness/src/openharness/tools/cron_create_tool.py +105 -0
  422. src/harness/src/openharness/tools/cron_delete_tool.py +32 -0
  423. src/harness/src/openharness/tools/cron_list_tool.py +69 -0
  424. src/harness/src/openharness/tools/cron_toggle_tool.py +37 -0
  425. src/harness/src/openharness/tools/enter_plan_mode_tool.py +28 -0
  426. src/harness/src/openharness/tools/enter_worktree_tool.py +80 -0
  427. src/harness/src/openharness/tools/exit_plan_mode_tool.py +28 -0
  428. src/harness/src/openharness/tools/exit_worktree_tool.py +42 -0
  429. src/harness/src/openharness/tools/file_edit_tool.py +95 -0
  430. src/harness/src/openharness/tools/file_read_tool.py +72 -0
  431. src/harness/src/openharness/tools/file_write_tool.py +87 -0
  432. src/harness/src/openharness/tools/glob_tool.py +175 -0
  433. src/harness/src/openharness/tools/grep_tool.py +374 -0
  434. src/harness/src/openharness/tools/image_generation_tool.py +447 -0
  435. src/harness/src/openharness/tools/image_to_text_tool.py +237 -0
  436. src/harness/src/openharness/tools/list_mcp_resources_tool.py +36 -0
  437. src/harness/src/openharness/tools/lsp_tool.py +154 -0
  438. src/harness/src/openharness/tools/mcp_auth_tool.py +71 -0
  439. src/harness/src/openharness/tools/mcp_tool.py +72 -0
  440. src/harness/src/openharness/tools/notebook_edit_tool.py +97 -0
  441. src/harness/src/openharness/tools/read_mcp_resource_tool.py +38 -0
  442. src/harness/src/openharness/tools/remote_trigger_tool.py +74 -0
  443. src/harness/src/openharness/tools/send_message_tool.py +58 -0
  444. src/harness/src/openharness/tools/skill_tool.py +43 -0
  445. src/harness/src/openharness/tools/sleep_tool.py +32 -0
  446. src/harness/src/openharness/tools/task_create_tool.py +56 -0
  447. src/harness/src/openharness/tools/task_get_tool.py +33 -0
  448. src/harness/src/openharness/tools/task_list_tool.py +35 -0
  449. src/harness/src/openharness/tools/task_output_tool.py +35 -0
  450. src/harness/src/openharness/tools/task_stop_tool.py +30 -0
  451. src/harness/src/openharness/tools/task_update_tool.py +50 -0
  452. src/harness/src/openharness/tools/team_create_tool.py +31 -0
  453. src/harness/src/openharness/tools/team_delete_tool.py +30 -0
  454. src/harness/src/openharness/tools/todo_write_tool.py +46 -0
  455. src/harness/src/openharness/tools/tool_search_tool.py +38 -0
  456. src/harness/src/openharness/tools/web_fetch_tool.py +117 -0
  457. src/harness/src/openharness/tools/web_search_tool.py +119 -0
  458. src/harness/src/openharness/ui/__init__.py +5 -0
  459. src/harness/src/openharness/ui/app.py +320 -0
  460. src/harness/src/openharness/ui/backend_host.py +941 -0
  461. src/harness/src/openharness/ui/coordinator_drain.py +198 -0
  462. src/harness/src/openharness/ui/input.py +32 -0
  463. src/harness/src/openharness/ui/output.py +265 -0
  464. src/harness/src/openharness/ui/permission_dialog.py +14 -0
  465. src/harness/src/openharness/ui/protocol.py +247 -0
  466. src/harness/src/openharness/ui/react_launcher.py +179 -0
  467. src/harness/src/openharness/ui/runtime.py +799 -0
  468. src/harness/src/openharness/ui/textual_app.py +495 -0
  469. src/harness/src/openharness/utils/__init__.py +0 -0
  470. src/harness/src/openharness/utils/file_lock.py +86 -0
  471. src/harness/src/openharness/utils/fs.py +98 -0
  472. src/harness/src/openharness/utils/helpers.py +77 -0
  473. src/harness/src/openharness/utils/network_guard.py +340 -0
  474. src/harness/src/openharness/utils/shell.py +147 -0
  475. src/harness/src/openharness/vim/__init__.py +5 -0
  476. src/harness/src/openharness/vim/transitions.py +8 -0
  477. src/harness/src/openharness/voice/__init__.py +7 -0
  478. src/harness/src/openharness/voice/keyterms.py +10 -0
  479. src/harness/src/openharness/voice/stream_stt.py +8 -0
  480. src/harness/src/openharness/voice/voice_mode.py +44 -0
  481. src/llm/__init__.py +29 -0
  482. src/llm/image_generation.py +402 -0
  483. src/llm/provider_registry.py +419 -0
  484. src/llm/runtime_env.py +64 -0
  485. src/llm/structured_output.py +131 -0
  486. src/llm/vision.py +198 -0
  487. src/memory/__init__.py +2 -0
  488. src/memory/api/__init__.py +1 -0
  489. src/memory/api/base_memory_system_api.py +98 -0
  490. src/memory/api/base_symbolic_memory_system_api.py +190 -0
  491. src/memory/api/base_vector_memory_system_api.py +116 -0
  492. src/memory/api/faiss_memory_system_api.py +228 -0
  493. src/memory/api/slot_process_api.py +827 -0
  494. src/memory/api/symbolic_memory_system_api.py +572 -0
  495. src/memory/memory_system/__init__.py +48 -0
  496. src/memory/memory_system/component_taxonomy.py +430 -0
  497. src/memory/memory_system/llm.py +437 -0
  498. src/memory/memory_system/models.py +168 -0
  499. src/memory/memory_system/user_prompt.py +418 -0
  500. src/memory/memory_system/utils.py +282 -0
  501. src/memory/memory_system/vectorstore.py +311 -0
  502. src/memory/memory_system/working_slot.py +99 -0
  503. src/pipeline/__init__.py +129 -0
  504. src/pipeline/contracts.py +531 -0
  505. src/pipeline/discipline_taxonomy.py +916 -0
  506. src/pipeline/evidence_coverage_ledger.py +1150 -0
  507. src/pipeline/evidence_refinement.py +620 -0
  508. src/pipeline/experiment_to_symbolic.py +137 -0
  509. src/pipeline/multimodal_evidence/__init__.py +28 -0
  510. src/pipeline/multimodal_evidence/capabilities.py +107 -0
  511. src/pipeline/multimodal_evidence/claims.py +135 -0
  512. src/pipeline/multimodal_evidence/contract.py +291 -0
  513. src/pipeline/multimodal_evidence/data_sh_compiler.py +505 -0
  514. src/pipeline/multimodal_evidence/handoff_binding.py +135 -0
  515. src/pipeline/multimodal_evidence/manifest.py +254 -0
  516. src/pipeline/multimodal_evidence/native_analysis.py +479 -0
  517. src/pipeline/multimodal_evidence/perception.py +277 -0
  518. src/pipeline/multimodal_evidence/query_binding.py +65 -0
  519. src/pipeline/multimodal_evidence/rendering.py +120 -0
  520. src/pipeline/multimodal_evidence/safety.py +42 -0
  521. src/pipeline/multimodal_evidence/sampling.py +69 -0
  522. src/pipeline/multimodal_evidence/service.py +148 -0
  523. src/pipeline/multimodal_evidence/survey_integration.py +460 -0
  524. src/pipeline/paper_identity.py +52 -0
  525. src/pipeline/research_design_inventory.py +338 -0
  526. src/pipeline/research_domain_resolution.py +669 -0
  527. src/pipeline/research_identity.py +548 -0
  528. src/pipeline/research_question_contract.py +646 -0
  529. src/pipeline/retrieval_lanes.py +889 -0
  530. src/pipeline/run_loop.py +862 -0
  531. src/pipeline/science_events.py +30 -0
  532. src/pipeline/science_manifests.py +602 -0
  533. src/pipeline/science_run.py +918 -0
  534. src/pipeline/science_stages.py +709 -0
  535. src/pipeline/science_workflow.py +807 -0
  536. src/pipeline/sh_cluster_projection.py +306 -0
  537. src/pipeline/sh_graph_provenance.py +648 -0
  538. src/pipeline/subhypothesis_decomposition.py +392 -0
  539. src/pipeline/subhypothesis_evidence.py +856 -0
  540. src/pipeline/survey_evidence_plan.py +858 -0
  541. src/pipeline/survey_gap_adjudication.py +647 -0
  542. src/pipeline/survey_gap_candidates.py +840 -0
  543. src/pipeline/survey_gap_ledger.py +683 -0
  544. src/pipeline/survey_gap_triage.py +401 -0
  545. src/pipeline/survey_handoff_persistence.py +481 -0
  546. src/pipeline/survey_handoff_projection.py +457 -0
  547. src/pipeline/survey_idea_handoff.py +1112 -0
  548. src/pipeline/survey_idea_loader.py +289 -0
  549. src/research_run_ids.py +11 -0
@@ -0,0 +1,1729 @@
1
+ # All prompts used in the project are stored here.
2
+
3
+ SEED_PAPER_SELECTION = """You are an expert researcher assisting in collecting seed papers for a survey on the topic: "{topic}".
4
+
5
+ Project research context (this defines relevance; it is not paper evidence):
6
+ {research_context}
7
+
8
+ Candidate Paper:
9
+ Title: {title}
10
+ Abstract: {abstract}
11
+
12
+ Task:
13
+ Evaluate whether this paper is highly relevant and suitable as a SEED PAPER for the given survey topic.
14
+ A seed paper should be a core work, a survey, or a foundational paper directly addressing
15
+ the project research context. Generic overlap in words such as model, network, cell, AI,
16
+ prediction, or optimization is not sufficient. Require a concrete match to at least one
17
+ project entity or include anchor and to the project's task, object, outcome, or normalized objective.
18
+ If identity_status is "unresolved" and those anchors are empty, judge directly against the
19
+ original topic and normalized objective instead; do not penalize a candidate merely because
20
+ the project taxonomy is unresolved.
21
+ If a specific exclusion anchor is present without a positive project anchor, score it low.
22
+
23
+ Return a JSON object with:
24
+ - relevance_score: integer from 1 to 5
25
+ - project_fit: "core", "related", or "irrelevant"
26
+ - matched_anchors: list of exact project anchors supported by the title or abstract
27
+ - violated_exclusions: list of explicit exclusion anchors supported by the title or abstract
28
+ - reason: one concise sentence explaining the score
29
+
30
+ Scoring guideline:
31
+ 5 = Directly addresses the project object/task and is a foundational, empirical, benchmark, or survey work
32
+ 4 = Strong direct support for the project direction with clear entity and task/outcome anchors
33
+ 3 = Related but peripheral, missing either a project entity or a task/outcome anchor
34
+ 1-2 = Generic-word overlap, a mismatched domain, or an explicit exclusion without positive project evidence
35
+
36
+ Output strictly in JSON format.
37
+ """
38
+
39
+ SH_PAPER_SEMANTIC_ASSESSMENT = """You are an expert scientific research assistant assessing one candidate paper's contribution to one sub-hypothesis (SH).
40
+
41
+ Project research context:
42
+ {research_context}
43
+
44
+ Sub-hypothesis (SH):
45
+ {subhypothesis}
46
+
47
+ Candidate paper:
48
+ Title: {title}
49
+ Abstract: {abstract}
50
+ Metadata: {metadata}
51
+
52
+ Task:
53
+ Assess the paper's semantic contribution to this SH from the supplied title, abstract, and metadata only.
54
+ The optional candidate slots describe useful contribution dimensions; they are NOT a checklist and the paper does NOT need to cover every slot or establish a complete causal chain. A paper may be valuable as direct, partial, indirect, mechanistic, comparative, boundary, counterevidence, background, method/measurement, or hypothesis-generating material.
55
+
56
+ Do not infer facts absent from the supplied material. Distinguish what the paper supports from what it does not establish. A paper can be strongly relevant even if its terminology differs from the SH, including synonyms, abbreviations, or another discipline's phrasing. Conversely, a keyword match alone is not substantive support.
57
+
58
+ For every direct or partial contribution, quote one or more exact contiguous phrases from the title or abstract in evidence_spans. If the abstract is unavailable, keep the assessment appropriately uncertain; do not reject the paper merely for the missing abstract.
59
+
60
+ Return strictly one JSON object with this schema:
61
+ {
62
+ "semantic_relevance_score": 0,
63
+ "overall_relation": "direct|partial|indirect|boundary|counterevidence|background|method|hypothesis_generating|uncertain|irrelevant",
64
+ "contribution_types": ["DIRECT_EVIDENCE|PARTIAL_EVIDENCE|INDIRECT_EVIDENCE|MECHANISTIC_EVIDENCE|COMPARATIVE_EVIDENCE|BOUNDARY_EVIDENCE|COUNTEREVIDENCE|BACKGROUND_CONTEXT|METHOD_OR_MEASUREMENT|HYPOTHESIS_GENERATING"],
65
+ "candidate_slot_contributions": [
66
+ {"slot_name": "one supplied optional slot name", "support_level": "direct|partial|indirect|none", "reason": "concise explanation"}
67
+ ],
68
+ "supported_minimal_claims": ["narrow claim warranted by the supplied material"],
69
+ "claim_limits": ["what this paper does not establish"],
70
+ "evidence_spans": [
71
+ {"source": "title|abstract", "text": "exact supplied phrase", "interpretation": "what this phrase supports"}
72
+ ],
73
+ "scope_conflicts": ["explicit conflict, if any"],
74
+ "explicit_exclusion_matches": ["explicit project or SH exclusion, if any"],
75
+ "recommended_graph_role": "evidence_seed|exploration_seed|context_seed|do_not_expand",
76
+ "confidence": "high|medium|low",
77
+ "reason": "one concise explanation"
78
+ }
79
+
80
+ Scoring guideline:
81
+ 5 = strongly and specifically contributes to the SH, even if it contributes only one part of the broader research question
82
+ 4 = clear useful contribution, such as a mechanism, comparison, boundary, counterexample, or well-grounded partial relation
83
+ 3 = plausible meaningful contribution or strong hypothesis-generation value, with limitations made explicit
84
+ 1-2 = weak topical relation with no identifiable SH contribution from the supplied material
85
+ 0 = irrelevant or explicitly excluded without positive SH contribution
86
+ """
87
+
88
+ SH_FULLTEXT_EXPANDED_PROMOTION_ASSESSMENT = """You are an expert scientific research assistant assessing whether a citation-expanded paper may be promoted into the evidence plan for one sub-hypothesis (SH).
89
+
90
+ Project research context:
91
+ {research_context}
92
+
93
+ Sub-hypothesis (SH):
94
+ {subhypothesis}
95
+
96
+ Candidate paper metadata:
97
+ {metadata}
98
+
99
+ This paper has already completed complete-section reading. Its complete-section keynote is below:
100
+ {complete_section_keynote}
101
+
102
+ Task:
103
+ Assess this paper from its own complete-section keynote, not from its citation lineage. Citation expansion only explains how the paper was found; it is never evidence by itself. Promote the paper only if the keynote contains an explicit, narrow contribution to at least one supplied optional SH slot.
104
+
105
+ Choose the strongest justified role through the fields below:
106
+ - direct: the keynote contains grounded evidence for a named slot. This is still only evidence for that slot, not for an unstated full causal chain.
107
+ - partial or indirect: useful but limited support, a mechanism, comparison, boundary, counterexample, method, or hypothesis-generating contribution. It must be used only in qualified synthesis.
108
+ - background: contextual material only. It must not be used as direct empirical support.
109
+ - uncertain or irrelevant: do not promote.
110
+
111
+ Do not infer facts absent from the keynote. For every direct, partial, or indirect contribution, include one or more exact contiguous phrases from the supplied keynote in evidence_spans. Do not reuse wording from the SH or metadata as an evidence span.
112
+
113
+ Return strictly one JSON object with this schema:
114
+ {
115
+ "semantic_relevance_score": 0,
116
+ "overall_relation": "direct|partial|indirect|boundary|counterevidence|background|method|hypothesis_generating|uncertain|irrelevant",
117
+ "contribution_types": ["DIRECT_EVIDENCE|PARTIAL_EVIDENCE|INDIRECT_EVIDENCE|MECHANISTIC_EVIDENCE|COMPARATIVE_EVIDENCE|BOUNDARY_EVIDENCE|COUNTEREVIDENCE|BACKGROUND_CONTEXT|METHOD_OR_MEASUREMENT|HYPOTHESIS_GENERATING"],
118
+ "candidate_slot_contributions": [
119
+ {"slot_name": "one supplied optional slot name", "support_level": "direct|partial|indirect|none", "reason": "concise explanation"}
120
+ ],
121
+ "supported_minimal_claims": ["narrow claim warranted by the keynote"],
122
+ "claim_limits": ["what this paper does not establish"],
123
+ "evidence_spans": [
124
+ {"source": "complete_section_keynote", "text": "exact keynote phrase", "interpretation": "what this phrase supports"}
125
+ ],
126
+ "scope_conflicts": ["explicit conflict, if any"],
127
+ "explicit_exclusion_matches": ["explicit project or SH exclusion, if any"],
128
+ "recommended_graph_role": "evidence_seed|exploration_seed|context_seed|do_not_expand",
129
+ "confidence": "high|medium|low",
130
+ "reason": "one concise explanation"
131
+ }
132
+
133
+ Scoring guideline:
134
+ 5 = strongly and specifically contributes direct evidence to one named SH slot
135
+ 4 = clear useful contribution, such as a mechanism, comparison, boundary, counterexample, or grounded partial relation
136
+ 3 = meaningful but limited contribution that requires an explicit qualification
137
+ 1-2 = weak topical relation with no identifiable SH-slot contribution
138
+ 0 = irrelevant or explicitly excluded without positive SH contribution
139
+ """
140
+
141
+ PAPER_RELATEDNESS_BASED_ON_TITLE_AND_ABSTRACT = """You are assisting in filtering papers for a literature review.
142
+
143
+ Project research context (the candidate must fit this context as well as the seed paper):
144
+ {research_context}
145
+
146
+ Below is the SEED PAPER that defines the target research direction.
147
+
148
+ --- SEED PAPER ---
149
+ TITLE: {seed_title}
150
+ ABSTRACT: {seed_abstract}
151
+ -------------------
152
+
153
+ Evaluate the following CANDIDATE PAPER.
154
+
155
+ TITLE: {candidate_title}
156
+ ABSTRACT: {candidate_abstract}
157
+
158
+ Task:
159
+ Compare the candidate paper to the seed paper and judge how strongly it fits the same research direction.
160
+ Identify both key similarities and key differences. Pairwise similarity alone is insufficient:
161
+ the candidate must also match the project context through a concrete project entity or
162
+ include anchor and the relevant task, object, outcome, or normalized objective. Generic
163
+ overlap in model, network, cell, AI, prediction, or optimization must not justify a high score.
164
+ If identity_status is "unresolved" and project anchors are empty, use the original topic and
165
+ normalized objective as the relevance anchors instead of treating missing taxonomy entities
166
+ as negative evidence.
167
+
168
+ Return a JSON object with:
169
+ - relevance_score: integer from 0 to 5
170
+ - category: "core", "related", or "irrelevant"
171
+ - matched_anchors: list of exact project anchors supported by the candidate
172
+ - violated_exclusions: list of explicit exclusion anchors supported by the candidate
173
+ - reason: one concise sentence describing the key similarity/difference
174
+
175
+ Scoring guideline:
176
+ 5 = Direct continuation that also matches the project object/task and context anchors
177
+ 4 = Strong project-aligned relation with clear entity and task/outcome evidence
178
+ 3 = Peripheral but plausible project relation
179
+ 1-2 = Weak or generic overlap, mismatched domain, or exclusion conflict
180
+ 0 = Unrelated to the project context
181
+ """
182
+
183
+ PAPER_DEEP_READING = """
184
+ {paper_markdown_text}
185
+
186
+ Act as a senior researcher reading this paper.
187
+ Your task is to produce a **deep, structured understanding** of the paper.
188
+
189
+ Guidelines:
190
+
191
+ [
192
+ - Read the paper carefully and summarize its key contributions, methods, results, and significance.
193
+ - Include your own critical reflections, insights, and possible future directions.
194
+ - Generate a TL;DR paragraph capturing the core idea.
195
+ - Organize the output in JSON format, but do not fix the keys; include whatever fields make sense for this paper.
196
+ - Include relevant examples, observations, or specific results when appropriate.
197
+ - Focus on depth, clarity, and coherence, rather than adhering to a rigid template.
198
+ - Only use information contained in the paper; do not add external knowledge.
199
+ ]
200
+ """
201
+
202
+ PAPER_SECTION_READING = """You are reading one packet of complete sections from a paper.
203
+
204
+ Paper title: {paper_title}
205
+ Packet: {packet_index}/{packet_count}
206
+
207
+ Complete sections included in this packet:
208
+ {included_headings}
209
+
210
+ Other body sections not included in this packet:
211
+ {omitted_headings}
212
+
213
+ Rules:
214
+ 1. Every raw-text section below is complete. Do not infer the content of sections not included in this packet.
215
+ 2. Extract only claims grounded in the included text, equations, tables, and figures.
216
+ 3. For every important observation, retain the exact source section heading and an evidence quote when available.
217
+ 4. Explicitly record which information cannot be determined from this packet.
218
+ 5. Return exactly one JSON object, with no Markdown fence, prose before it, or prose after it.
219
+ 6. Use exactly this schema. Keep every value concise; use empty arrays when a category is not present.
220
+
221
+ {{
222
+ "source_sections": ["exact included section heading"],
223
+ "claims": [
224
+ {{
225
+ "claim": "one claim supported by this packet",
226
+ "evidence": "short supporting quote, result, equation reference, or table reference",
227
+ "source_section": "exact included section heading"
228
+ }}
229
+ ],
230
+ "methods": ["method or analytical approach"],
231
+ "results": ["result or observation"],
232
+ "limitations": ["stated limitation, caveat, or uncertainty"],
233
+ "unknowns": ["information not determined from this packet"]
234
+ }}
235
+
236
+ Do not add fields. ``source_sections`` must list the included headings used by the note.
237
+ Every item in ``claims`` must contain all three string fields shown above.
238
+
239
+ Complete section text:
240
+ {packet_markdown}
241
+ """
242
+
243
+ PAPER_KEYNOTE_SYNTHESIS = """You are synthesizing a paper-level keynote from section-level research notes.
244
+
245
+ Paper title: {paper_title}
246
+
247
+ Every note below came from one or more complete, non-truncated sections. Use only those notes as evidence.
248
+
249
+ Rules:
250
+ 1. Produce one deep, structured paper keynote in JSON.
251
+ 2. Preserve source section headings for important methods, results, limitations, and future work.
252
+ 3. Do not invent content for a category absent from every section note; state that it was not extracted instead.
253
+ 4. Resolve duplicated observations by merging their evidence, and preserve contradictions rather than guessing.
254
+ 5. Return JSON only.
255
+
256
+ Section notes:
257
+ {section_notes_json}
258
+ """
259
+
260
+ PAPER_KEYNOTE_COMPACTION = """You are compacting a subset of complete-section research notes.
261
+
262
+ Paper title: {paper_title}
263
+
264
+ The notes below are only one subset of the paper's complete-section notes. They are not the full paper.
265
+
266
+ Rules:
267
+ 1. Do not present this as a paper-level keynote or make a conclusion about sections not supplied here.
268
+ 2. Keep every important source_section heading and evidence quote or evidence reference present in the input notes.
269
+ 3. Merge only duplicate observations that have compatible evidence; preserve uncertainty and contradictions.
270
+ 4. State what cannot be determined from this subset instead of inferring missing methods, results, limitations, or future work.
271
+ 5. Return a compact JSON research-note object only. It will be supplied to a later whole-paper synthesis step.
272
+
273
+ Subset section notes:
274
+ {section_notes_json}
275
+ """
276
+
277
+ PAPER_CLUSTERING = """You are a research assistant specializing in analyzing scientific papers.
278
+
279
+ Existing clusters of papers:
280
+
281
+ {existing_clusters_json}
282
+
283
+ New batch of papers (each with a keynote):
284
+
285
+ {new_batch_json}
286
+
287
+ Task:
288
+ - Update the clusters by adding new papers, reorganizing existing papers, merging or splitting clusters if needed.
289
+ - Assign a name and a brief summary to each cluster.
290
+ - Aim to create clusters that are as detailed as possible, capturing subtle differences, while still making sense.
291
+ - A single paper may belong to multiple clusters if its research area reasonably intersects with multiple themes (multi-assignment is allowed).
292
+ - Output the full updated cluster list strictly **in JSON format**!
293
+ - Keep all the existing papers in the clusters; you can reorganize but do not remove any!
294
+ - Add all the new papers to the clusters; do not omit any!
295
+
296
+ Output format requirements:
297
+
298
+ The JSON should be a list of cluster objects.
299
+ Each cluster object should include the following fields:
300
+ - cluster_name: string, the name of the cluster
301
+ - summary: string, a brief description of the cluster
302
+ - papers: list of paper objects, each with:
303
+ - id: string, unique identifier of the paper
304
+ - title: string, title of the paper
305
+ - tldr: string, concise summary or TL;DR of the paper
306
+ """
307
+
308
+ PAPER_CLUSTERING_CREATING = """You are a research assistant specializing in analyzing scientific papers.
309
+
310
+ **Existing clusters and descriptions**:
311
+
312
+ {existing_clusters_json}
313
+
314
+ **New batch of papers** (each with a keynote):
315
+
316
+ {new_batch_json}
317
+
318
+ Task:
319
+ - You should adjust existing clusters and descriptions based on the new batch of papers.
320
+ - If **Existing clusters and descriptions** is empty, create new clusters from scratch based on the new batch of papers.
321
+ - Update the clusters by merging, splitting or adding clusters if needed. Make sure all new papers can be assigned to at least one cluster.
322
+ - Assign a name and a brief summary to each cluster.
323
+ - Aim to create clusters that are as detailed as possible, capturing subtle differences, while still making sense.
324
+ - A single paper may belong to multiple clusters if its research area reasonably intersects with multiple themes (multi-assignment is allowed).
325
+ - Output the full updated cluster list strictly **in JSON format**!
326
+ - You only need to output the clusters name and description; do not list or mention any specific papers!
327
+
328
+ Output format requirements:
329
+
330
+ The JSON should be a list of cluster objects.
331
+ Each cluster object should include the following fields:
332
+ - cluster_name: string, the name of the cluster
333
+ - summary: string, a brief description of the cluster
334
+
335
+ Output Example (strictly in JSON format):
336
+ [
337
+ {{
338
+ "cluster_name": "...",
339
+ "summary": "...",
340
+ }},
341
+ {{
342
+ "cluster_name": "...",
343
+ "summary": "...",
344
+ }}
345
+ ]
346
+ """
347
+
348
+ PAPER_CLUSTERING_ASSIGNING = """You are a research assistant specializing in analyzing scientific papers.
349
+
350
+ Clusters and descriptions:
351
+
352
+ {clusters_json}
353
+
354
+ batch of papers (each with a keynote):
355
+
356
+ {batch_json}
357
+
358
+ Task:
359
+ - Assign each paper in the batch to one or more existing clusters based on their keynotes.
360
+ - A single paper may belong to multiple clusters if its research area reasonably intersects with multiple themes (multi-assignment is allowed).
361
+ - Output strictly **in JSON format** and without any other text!
362
+
363
+ Output format requirements:
364
+
365
+ The JSON should be a list of paper objects.
366
+ Each cluster object should include the following fields:
367
+ - id: string, unique identifier of the paper
368
+ - title: string, title of the paper
369
+ - tldr: string, concise summary or TL;DR of the paper
370
+ - clusters: list of strings, names of clusters the paper belongs to, the name must exactly match the cluster_name in the input clusters_json
371
+
372
+ Output Example (strictly in JSON format):
373
+ [
374
+ {{
375
+ "id": "...",
376
+ "title": "...",
377
+ "tldr": "...",
378
+ "clusters": ["cluster_name_1", "cluster_name_2"]
379
+ }},
380
+ ...
381
+ ]
382
+ """
383
+
384
+ PROPOSE_QUESTIONS_FOR_CLUSTER = """You are an expert research assistant. I will give you a set of closely related papers, each with a keynote.
385
+
386
+ Your task is to read all the keynotes and propose a list of questions that would help someone deeply understand the ideas in these papers.
387
+
388
+ Guidelines:
389
+ - You may decide what questions are meaningful, surprising, or worth investigating.
390
+ - Questions should preferably involve relationships among multiple papers, such as comparisons, differences, shared assumptions, or conflicting claims.
391
+ - Do NOT mention paper IDs inside the question text.
392
+ - Each question must list the related paper IDs.
393
+ - You are encouraged to think critically, speculate, compare ideas, question assumptions, identify gaps, or propose future directions.
394
+ - Feel free to ask questions that are subtle, unconventional, or creative—your role is to guide deep thinking rather than summarize.
395
+
396
+ Requirements:
397
+ - Cite paper strictly in format: <paper_title> (like <Attention is All You Need>) when referencing specific papers under key "questions".
398
+ - You are encouraged to cite more papers from the provided content to strengthen your analysis.
399
+ - **Only** cite papers that appear in the provided input.
400
+ - Propose NO MORE THAN 5 problems to ensure conciseness so choose the most valuable ones.
401
+
402
+ Input:
403
+ {cluster_content}
404
+
405
+ Output (strictly in JSON format):
406
+ [
407
+ {{
408
+ "question": "...",
409
+ "related_papers": ["paper_id_1", "paper_id_2", ...]
410
+ }}
411
+ ]
412
+ """
413
+
414
+ ANSWER_QUESTION_FOR_PAPERS = """You are an expert research assistant. I will give you a question and a set of related papers.
415
+
416
+ Your task is to provide a comprehensive answer to the question based on the content of the related papers.
417
+
418
+ Guidelines:
419
+ - Read the question carefully and understand what is being asked.
420
+ - Synthesize information from all the related papers to construct a well-rounded answer.
421
+ - Provide citations to the papers by their IDs when referencing specific information.
422
+ - Aim for clarity, depth, and coherence in your answer.
423
+
424
+ Requirements:
425
+ - Cite paper strictly in format: <paper_title> (like <Attention is All You Need>) whenever referencing specific papers in your answer.
426
+ - You are encouraged to cite more papers from the provided content to strengthen your analysis.
427
+ - **Only** cite papers that appear in the provided input.
428
+ - Answer the problem CONCISELY! The answer should be no more than 150 words. Shorter is better (If you can answer the question completely and clearly).
429
+
430
+ Input:
431
+ Question: {question}
432
+ Related Papers:
433
+ {related_papers_content}
434
+
435
+ Output:
436
+ Provide a detailed answer to the question, citing relevant papers by their IDs.
437
+ """
438
+
439
+ INTER_CLUSTER_ANALYSIS = """You are an expert research analyst. I will provide several groups of research papers, each with a list of questions and discussion notes.
440
+
441
+ Your task:
442
+ - Read all content and produce a summary analysis that extracts key cross-group insights.
443
+ - You may analyze freely: identify patterns, differences, potential connections, unresolved issues, or research gaps.
444
+ - The goal is to generate meaningful insights and analytical synthesis, not just list the original content.
445
+
446
+ Optional approaches (not required):
447
+ - Connect concepts or themes that appear across multiple groups
448
+ - Highlight commonalities and differences in methods or conclusions
449
+ - Identify key unresolved challenges or gaps
450
+ - Suggest possible future research directions
451
+
452
+ Requirements:
453
+ - Do not repeat the original text verbatim.
454
+ - Output a concise analytical summary in clear prose.
455
+ - Cite paper strictly in format: <paper_title> (like <Attention is All You Need>) whenever referencing specific papers in your analysis.
456
+ - You are encouraged to cite more papers from the provided content to strengthen your analysis.
457
+ - **Only** cite papers that appear in the provided input.
458
+ - Analyze in CONCISE mode. The total word number should be no more than 700 words!
459
+
460
+ Input:
461
+ {cluster_analysis_content}
462
+
463
+ Output:
464
+ """
465
+
466
+ SURVEY_OUTLINE_GENERATION = """You are an expert research survey generator. Your task is to iteratively update an existing survey outline using a batch of new paper keynotes, the current outline, and the analysis results of relevant papers for the topic/subtopic being written.
467
+
468
+ **Guidance:**
469
+ - The analysis results contain summarized insights, comparisons, trends, and key points extracted from prior work. They should be the **important source of guidance** when updating the outline.
470
+ - Paper keynotes are also useful: use them to **supplement, validate, or provide additional details** for the sections/subsections.
471
+ - Balance both sources to create a comprehensive, accurate, and logically organized survey outline.
472
+
473
+ **Requirements:**
474
+ 1. Use the current outline as the base structure. Keep existing sections/subsections unless updated or merged.
475
+ 2. Update the outline by:
476
+ - Adding new sections/subsections for emerging topics or trends.
477
+ - Merging similar topics/subsections to avoid redundancy.
478
+ - Revising descriptions to reflect key insights, comparisons, trends, and challenges from the analysis results.
479
+ - Supplementing descriptions with relevant points from paper keynotes.
480
+ 3. Update "papers_to_use" for each section/subsection, including papers (paper ids) from the current batch and existing outline, ensuring that only paper IDs from the current batch, existing outline ,relevant papers analysis or other relevant papers abstract are included. no unrelated IDs should appear!!
481
+ 4. Maintain clarity, logical structure, and a survey-style narrative.
482
+ 5. Output strictly in JSON format, as shown below.
483
+ 6. {outline_size_budget}
484
+
485
+ **Input:**
486
+ - current outline: {current_outline}
487
+ - closely relevant papers analysis: {papers_analysis}
488
+ - new paper keynotes: {paper_keynotes}
489
+ - other relevant papers abstract: {other_relevant_papers}
490
+ - authoritative survey evidence plan: {survey_evidence_plan}
491
+
492
+ **Output JSON format:**
493
+ {{
494
+ "title" : "Survey Title",
495
+ "sections": [
496
+ {{
497
+ "title": "Section title",
498
+ "description": "Summary of content to include, emphasizing insights, comparisons, and trends from analysis, supplemented by keynotes",
499
+ "papers_to_use": ["Paper 1", "Paper 2"],
500
+ "subsections": [
501
+ {{
502
+ "title": "Subsection title",
503
+ "description": "Content description reflecting key insights, trends, comparisons from analysis, supplemented by keynotes",
504
+ "papers_to_use": ["Paper 1"]
505
+ }}
506
+ ]
507
+ }}
508
+ ]
509
+ }}
510
+
511
+ **Instruction to LLM:**
512
+ - Use the insights, trends, and comparisons from relevant paper analysis together with points from new paper keynotes to update the outline. Both sources should inform the content of each section/subsection.
513
+ - Add, merge, or revise sections/subsections as appropriate, keeping the outline structured and coherent.
514
+ - Ensure that each section/subsection reflects the combined contributions of the analysis results and the keynotes, capturing important insights, trends, and examples.
515
+ - If the evidence plan has evidence_bounded_writing=true, it is a hard scientific boundary: account for every SH, use its allowed_writing_mode, do not assign graph-expanded candidates as evidence, and do not turn background-only material into direct support.
516
+ - The final outline must make room to account for every SH, including evidence gaps, rejected scope, and limitations; this does not require one chapter per SH.
517
+ """
518
+
519
+ SURVEY_OUTLINE_GENERATION_OUTLINE_DRAFT = """You are an expert research survey generator. Your task is to generate and iteratively update an existing survey outline using a batch of new paper keynotes, the current outline, and the analysis results of relevant papers for the topic/subtopic being written.
520
+
521
+ **Guidance:**
522
+ - The analysis results contain summarized insights, comparisons, trends, and key points extracted from prior work. They should be the **important source of guidance** when updating the outline.
523
+ - Paper keynotes are also useful: use them to **supplement, validate, or provide additional details** for the sections/subsections.
524
+ - Balance both sources to create a comprehensive, accurate, and logically organized survey outline.
525
+
526
+ **Requirements:**
527
+ 1. The outline should contain multiple sections, subsections and their descriptions.
528
+ 2. The output outline should have excellent organization and meet academic standards.
529
+ 3. The outline should exhibit excellent rigor: ensuring that the content of each subsection falls within the scope of the current section.
530
+ 4. The outline should ensure that it covers a wide range of content under the topic while staying within the scope of the topic.
531
+ 5. Use the current outline as the base structure. Keep existing sections/subsections unless updated or merged. If the current outline is empty, create a new outline from scratch.
532
+ 6. {outline_size_budget}
533
+ 7. The outline should contain a **Conclusion** section and a **Future Work** section/subsection.
534
+ 8. The outline should exhibit good logic to ensure the entire survey flows smoothly
535
+ 9. Ensure a balanced number of subsections in the main sections (excluding the conclusion and introduction).
536
+ 10. Make sure most of the corresponding new paper in **new paper keynotes** can be included in at least one subsection or section of the outline.
537
+ 11. You are provided with other relevant papers which is retrieved from database, you can use them to better understand and generate.
538
+ 12. Maintain clarity, logical structure, and a survey-style narrative.
539
+ 13. Ensure logical coherence between the sections, avoiding excessive independence and fragmentation. For instance, do not add a "Conclusion" subsection to every section, which lead to logical fragmentation between different sections.
540
+ 14. If the current outline does not have enough sections/subsections, add more to meet the requirement.
541
+ 15. The outline description of the "Future work" section should emphasize specific guidance for future work rather than a general directional description.
542
+ 16. Output strictly in JSON format, as shown below.
543
+
544
+ **Input:**
545
+ - current outline: {current_outline}
546
+
547
+ - key papers: {paper_keynotes}
548
+
549
+ - key papers analysis: {papers_analysis}
550
+
551
+ - other relevant papers: {other_relevant_papers}
552
+
553
+ - authoritative survey evidence plan: {survey_evidence_plan}
554
+
555
+ **Output JSON format:**
556
+ {{
557
+ "title" : "Survey_Title",
558
+ "sections": [
559
+ {{
560
+ "title": "Section_title",
561
+ "description": "Summary of content to include, emphasizing insights, comparisons, and trends from analysis, supplemented by keynotes",
562
+ "subsections": [
563
+ {{
564
+ "title": "Subsection_title",
565
+ "description": "Content description reflecting key insights, trends, comparisons from analysis, supplemented by keynotes",
566
+ }}
567
+ ]
568
+ }}
569
+ ]
570
+ }}
571
+
572
+ **Instruction to LLM:**
573
+ - Use the insights, trends, and comparisons from relevant paper analysis together with points from new paper keynotes to update the outline. Both sources should inform the content of each section/subsection.
574
+ - Add, merge, or revise sections/subsections as appropriate, keeping the outline structured and coherent.
575
+ - Ensure that each section/subsection reflects the combined contributions of the analysis results and the keynotes, capturing important insights, trends, and examples.
576
+ - Check the whether the input outline satisfies the requirements and update to meet the requiremnets if not.
577
+ - Only generate the outline in the required JSON format. Do not include specific paper IDs in the outline.
578
+ - If the evidence plan has evidence_bounded_writing=true, it is a hard scientific boundary: account for every SH, use its allowed_writing_mode, do not assign graph-expanded candidates as evidence, and do not turn background-only material into direct support.
579
+ - The final outline must make room to account for every SH, including evidence gaps, rejected scope, and limitations; this does not require one chapter per SH.
580
+ """
581
+
582
+ SURVEY_OUTLINE_REPAIR = """Repair a survey outline response that failed local validation.
583
+
584
+ Return exactly one JSON object. Do not use Markdown fences or explanatory prose.
585
+
586
+ Validation error:
587
+ {validation_error}
588
+
589
+ Current valid outline before the failed response:
590
+ {current_outline}
591
+
592
+ Compact authoritative evidence plan:
593
+ {survey_evidence_plan}
594
+
595
+ Previous invalid response:
596
+ {previous_response}
597
+
598
+ Required JSON schema:
599
+ {{
600
+ "title": "Survey title",
601
+ "sections": [
602
+ {{
603
+ "title": "Section title",
604
+ "description": "What this section will synthesize",
605
+ "subsections": [
606
+ {{
607
+ "title": "Subsection title",
608
+ "description": "What this subsection will synthesize"
609
+ }}
610
+ ]
611
+ }}
612
+ ]
613
+ }}
614
+
615
+ Requirements:
616
+ 1. ``sections`` must be a non-empty JSON list.
617
+ 2. Every section and subsection must contain non-empty string ``title`` and ``description`` fields.
618
+ 3. Respect every SH's allowed_writing_mode and report evidence gaps or limitations where required.
619
+ 4. Do not include paper IDs in this draft outline; paper assignment happens later.
620
+ """
621
+
622
+ SURVEY_OUTLINE_GENERATION_PAPER_ASSIGNMENT = """You are an expert research survey writer. Your task is to assign papers to be cited to corresponding sections and subsections.
623
+
624
+ **Guidance:**
625
+ 1. Assign papers based on their relevance to the section and subsection topics.
626
+ 2. Make sure citing according to you assignment is reasonable and appropriate and help to provide insights in the survey.
627
+
628
+ **Requirements:**
629
+ 1. Assign EVERY paper in **key papers** to be assigned to one or more corresponding sections or subsections.
630
+ 2. The section title and subsection title in your assignment result must EXACTLY match the titles in the current outline.
631
+ 3. You can also assign suitable papers in other relevant papers to sections or subsections.
632
+ 4. ONLY assign papers that appear in the provided input.
633
+ 5. You are provided with key paper analysis. Use them to help better understand and assign papers.
634
+
635
+ **Input:**
636
+ - outline: {current_outline}
637
+
638
+ - key papers: {paper_keynotes}
639
+
640
+ - other relevant papers: {other_relevant_papers}
641
+
642
+ - key paper analysis: {papers_analysis}
643
+
644
+ - authoritative survey evidence plan: {survey_evidence_plan}
645
+
646
+ **Output format:**
647
+ {{
648
+ "assignments": [
649
+ {{
650
+ "paper_id": "...",
651
+ "paper_title": "...",
652
+ "assignment": {{
653
+ "section_title_1": ["subsection_title_1", "subsection_title_2"]
654
+ }}
655
+ }}
656
+ ]
657
+ }}
658
+
659
+ Return exactly one valid json object.
660
+ Do not use Markdown fences, prose, or any text outside the json object.
661
+
662
+ When evidence_bounded_writing=true in the plan, assign only the plan-listed direct evidence or background-context papers. Never assign graph-expanded candidates as SH evidence.
663
+ """
664
+
665
+ SURVEY_CLAIM_TRACE_REPAIR = """You repair only the evidence trace for an already accepted survey passage.
666
+
667
+ The passage below is immutable. Do not rewrite, shorten, expand, reorder, or add prose. Do not add citations. Return only one valid json object; no Markdown fence or explanatory text.
668
+
669
+ Immutable prose:
670
+ {visible_prose}
671
+
672
+ Admissible evidence paths for citations already present in the prose and for bounded supplied-data observations:
673
+ {admissible_paths}
674
+
675
+ Allowed SH claim modes and limitation slots:
676
+ {subhypothesis_contracts}
677
+
678
+ Previous trace validation errors, if any:
679
+ {validation_errors}
680
+
681
+ Return exactly this minimal JSON schema:
682
+ {{
683
+ "claims": [
684
+ {{
685
+ "claim_index": 1,
686
+ "claim_anchor": "a distinctive short phrase from the cited prose sentence",
687
+ "claim_text": "the cited prose sentence, if available",
688
+ "sub_hypothesis_ids": ["SH1"],
689
+ "claim_mode": "one allowed mode for this SH",
690
+ "evidence_paths": [
691
+ {{
692
+ "source_type": "paper",
693
+ "sub_hypothesis_id": "SH1",
694
+ "slot_name": "one listed slot",
695
+ "paper_id": "one cited paper ID listed above"
696
+ }}
697
+ ]
698
+ }}
699
+ ]
700
+ }}
701
+
702
+ Rules:
703
+ 1. ``claim_index`` is one-based, counting sentences in the immutable prose. Use it whenever possible.
704
+ 2. Trace only substantive SH claims. Every paper cited in a traced claim must have a listed path.
705
+ 3. Use only the listed paper or multimodal-observation paths. A paper path requires the listed SH, slot, and paper combination. A multimodal path uses only ``source_type``, SH, and ``observation_id``; it is never a literature citation. For a LOCAL_DATA_OBSERVATION, replace the sole paper object in the example with one sole multimodal object: ``{{"source_type":"multimodal_observation","sub_hypothesis_id":"MM_SH_01","observation_id":"one listed provided-data observation ID"}}``.
706
+ 4. For an EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED claim, use an empty ``evidence_paths`` list and use a listed limitation slot when required.
707
+ 5. The returned object repairs metadata only; it must not imply evidence absent from the immutable prose or the supplied admissible paths.
708
+ """
709
+
710
+ SUBSECTION_DRAFT = """You are an expert in writing top academic conference standards surveys. The ultimate goal is to complete a acadamic survey with depth, insights and can boost further development, rather than simply listing methods.
711
+
712
+ Now you are responsible for writing a subsection of the survey paper.
713
+
714
+ **Subsection Title**:
715
+ {title}
716
+
717
+ **Guidance**:
718
+ Write a coherent subsection that explains, analyzes, or discusses the topic indicated in the title and description.
719
+ You should synthesize relevant information from the papers, analysis results.
720
+ The content should be academically structured and readable, with emphasis on insights, trends, and comparisons where appropriate.
721
+ You may include examples from papers to support the discussion, but do not simply list papers.
722
+ You are encouraged to cite more papers from the relevant papers to strengthen your points.
723
+ You are provided with the outline of the whole survey. Make sure the subsection content coherent to the survey logic.
724
+ Utilize the input content in a safe and reasonable manner, and ensure that the readability, structure, and depth of the content of the paragraph meet the requirements of a top-tier conference survey.
725
+
726
+ **Information to use**:
727
+ - Subsection description:
728
+ {description}
729
+
730
+ - Closely Relevant papers:
731
+ {papers}
732
+
733
+ - Other Relevant papers:
734
+ {other_relevant_papers}
735
+
736
+ - Survey Outline:
737
+ {survey_outline}
738
+
739
+ - Insights from analysis:
740
+ {relevant_analysis}
741
+
742
+ - Authoritative survey evidence plan:
743
+ {survey_evidence_plan}
744
+
745
+ **Output**:
746
+ - A well-written subsection in several coherent paragraphs.
747
+ - Academic style; focused on synthesis and analysis, not just reporting.
748
+ - **Only** cite papers that appear in the provided input.
749
+ - Strictly use format: <paper_title> (like <Attention is All You Need>) to cite wherever appropriate.
750
+ - Use about {subsection_target_citations} distinct, relevant citations (never more than {subsection_max_citations}) when the applicable SH plan mode permits evidence-backed or qualified synthesis. Do not pad the prose with citations. If a subsection only reports an EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED SH, this generic target does not apply: state the limitation precisely and do not invent citations.
751
+ - Do not generate a bibliography or reference list here.
752
+ - Aim for about {subsection_target_words} words; the visible prose must not exceed {subsection_max_words} words. Be concise: merge closely related findings into synthesis rather than enumerating papers.
753
+ - Generate the content directly. DO NOT generate any subsection title or section header here.
754
+ - CRITICAL: '#' is used for section/subsection anchor. Avoid any '#' in the output content.
755
+ - When evidence_bounded_writing=true in the plan: every substantive SH claim must obey its allowed_writing_mode and paper_role_constraints. A GRAPH_EXPANDED_CANDIDATE remains lineage/retrieval context and is never evidence by itself. It may be cited only when the current SH evidence plan explicitly includes the same paper through a FULLTEXT_PROMOTION role earned from that paper's own complete-section reading; then use exactly its listed direct, qualified, or background strength. Do not use BACKGROUND_CONTEXT papers for direct empirical support. A QUALIFIED_SH_CONTRIBUTION may support only QUALIFIED_SYNTHESIS and must state the applicable limitation rather than asserting a complete causal chain. An EVIDENCE_GAP_REPORT must report the gap and must not make an affirmative scientific conclusion. A ``multimodal_projection`` is a bounded observation from supplied local data, not a paper: retain its sample scope and claim limits, name competing explanations, and use only cautious compatibility language. Never say that it proves, establishes, or generally demonstrates a mechanism.
756
+ - In evidence-bounded mode, end the response with exactly one final metadata block, using this literal delimiter (not angle brackets):
757
+ [[SH_CLAIM_TRACE]]
758
+ {{"claims":[{{"claim_index":1,"claim_anchor":"a distinctive short phrase from the visible prose sentence","claim_text":"the visible prose sentence when available","sub_hypothesis_ids":["SH1"],"claim_mode":"one allowed mode from the plan","evidence_paths":[{{"source_type":"paper","sub_hypothesis_id":"SH1","slot_name":"one plan slot","paper_id":"the cited plan-listed paper id"}}]}}]}}
759
+ [[/SH_CLAIM_TRACE]]
760
+ The metadata must be valid JSON, must be final, and must not introduce claims or paper IDs absent from the prose/plan. ``claim_index`` is one-based among visible prose sentences and lets the program recover the exact sentence despite harmless spacing or punctuation differences. Do not emit evidence_role, support_kind, or limitation_slots: the program derives them from the authoritative evidence plan. A paper path may trace a citation; a multimodal-observation path uses only ``source_type``, SH, and ``observation_id`` and is not a literature citation. A LOCAL_DATA_OBSERVATION must use only its listed multimodal-observation path, for example ``{{"source_type":"multimodal_observation","sub_hypothesis_id":"MM_SH_01","observation_id":"one plan-listed supplied-data observation"}}``, and must retain supplied-data scope plus uncertainty in the visible prose. Every bounded response must include at least one claim. For EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED, use evidence_paths: [] and include an appropriate claim_index / claim_anchor; do not cite a paper. If the plan is inactive, omit this block.
761
+ """
762
+
763
+ SUBSECTION_DRAFT_WITH_CODE = """You are an expert in writing top academic conference standards surveys. The ultimate goal is to complete a acadamic survey with depth, insights and can boost further development, rather than simply listing methods.
764
+
765
+ Now you are responsible for writing a subsection of the survey paper.
766
+
767
+ **Subsection Title**:
768
+ {title}
769
+
770
+ **Guidance**:
771
+ Write a coherent subsection that explains, analyzes, or discusses the topic indicated in the title and description.
772
+ You should synthesize relevant information from the papers, analysis results.
773
+ The content should be academically structured and readable, with emphasis on insights, trends, and comparisons where appropriate.
774
+ You may include examples from papers to support the discussion, but do not simply list papers.
775
+ You are encouraged to cite more papers from the relevant papers to strengthen your points.
776
+ You are provided with the outline of the whole survey. Make sure the subsection content coherent to the survey logic.
777
+ Utilize the input content in a safe and reasonable manner, and ensure that the readability, structure, and depth of the content of the paragraph meet the requirements of a top-tier conference survey.
778
+
779
+ {code_report_prompt}
780
+
781
+ **Information to use**:
782
+ - Subsection description:
783
+ {description}
784
+
785
+ - Closely Relevant papers:
786
+ {papers}
787
+
788
+ - Other Relevant papers:
789
+ {other_relevant_papers}
790
+
791
+ - Survey Outline:
792
+ {survey_outline}
793
+
794
+ - Insights from analysis:
795
+ {relevant_analysis}
796
+
797
+ - Authoritative survey evidence plan:
798
+ {survey_evidence_plan}
799
+
800
+ **Output:**
801
+ - A well-written subsection in several coherent paragraphs.
802
+ - Academic style; focused on synthesis and analysis, not just reporting.
803
+ - **Only** cite papers that appear in the provided input.
804
+ - Strictly use format: <paper_title> (like <Attention is All You Need>) to cite wherever appropriate.
805
+ - Use about {subsection_target_citations} distinct, relevant citations (never more than {subsection_max_citations}) when the applicable SH plan mode permits evidence-backed or qualified synthesis. Do not pad the prose with citations. If a subsection only reports an EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED SH, this generic target does not apply: state the limitation precisely and do not invent citations.
806
+ - Do not generate a bibliography or reference list here.
807
+ - Aim for about {subsection_target_words} words; the visible prose must not exceed {subsection_max_words} words. Be concise: merge closely related findings into synthesis rather than enumerating papers.
808
+ - Generate the content directly. DO NOT generate any subsection title or section header here.
809
+ - CRITICAL: '#' is used for section/subsection anchor. Avoid any '#' in the output content.
810
+ - When evidence_bounded_writing=true in the plan: every substantive SH claim must obey its allowed_writing_mode and paper_role_constraints. A GRAPH_EXPANDED_CANDIDATE remains lineage/retrieval context and is never evidence by itself. It may be cited only when the current SH evidence plan explicitly includes the same paper through a FULLTEXT_PROMOTION role earned from that paper's own complete-section reading; then use exactly its listed direct, qualified, or background strength. Do not use BACKGROUND_CONTEXT papers for direct empirical support. A QUALIFIED_SH_CONTRIBUTION may support only QUALIFIED_SYNTHESIS and must state the applicable limitation rather than asserting a complete causal chain. An EVIDENCE_GAP_REPORT must report the gap and must not make an affirmative scientific conclusion. A ``multimodal_projection`` is a bounded observation from supplied local data, not a paper: retain its sample scope and claim limits, name competing explanations, and use only cautious compatibility language. Never say that it proves, establishes, or generally demonstrates a mechanism.
811
+ - In evidence-bounded mode, end the response with exactly one final metadata block, using this literal delimiter (not angle brackets):
812
+ [[SH_CLAIM_TRACE]]
813
+ {{"claims":[{{"claim_index":1,"claim_anchor":"a distinctive short phrase from the visible prose sentence","claim_text":"the visible prose sentence when available","sub_hypothesis_ids":["SH1"],"claim_mode":"one allowed mode from the plan","evidence_paths":[{{"source_type":"paper","sub_hypothesis_id":"SH1","slot_name":"one plan slot","paper_id":"the cited plan-listed paper id"}}]}}]}}
814
+ [[/SH_CLAIM_TRACE]]
815
+ The metadata must be valid JSON, must be final, and must not introduce claims or paper IDs absent from the prose/plan. ``claim_index`` is one-based among visible prose sentences and lets the program recover the exact sentence despite harmless spacing or punctuation differences. Do not emit evidence_role, support_kind, or limitation_slots: the program derives them from the authoritative evidence plan. A paper path may trace a citation; a multimodal-observation path uses only ``source_type``, SH, and ``observation_id`` and is not a literature citation. A LOCAL_DATA_OBSERVATION must use only its listed multimodal-observation path, for example ``{{"source_type":"multimodal_observation","sub_hypothesis_id":"MM_SH_01","observation_id":"one plan-listed supplied-data observation"}}``, and must retain supplied-data scope plus uncertainty in the visible prose. Every bounded response must include at least one claim. For EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED, use evidence_paths: [] and include an appropriate claim_index / claim_anchor; do not cite a paper. If the plan is inactive, omit this block.
816
+ """
817
+
818
+ CODE_REPORT_PROMPT = """Code Report Context:
819
+ You are provided with a **Code Report** containing implementation insights for the papers in this survey topic, including: framework choices, environment setup guidance, and repository quality assessment.
820
+
821
+ **Usage Principles (CRITICAL - Follow Strictly):**
822
+ - **Topic coherence**: Only incorporate code report content that directly relates to the current subsection's theme; unrelated framework details must be ignored
823
+ - **Structure preservation**: Integrate insights seamlessly into existing paragraphs without disrupting the survey's logical flow or section organization
824
+ - **Readability maintenance**: Add technical details sparingly; if code snippets are needed, ensure clean formatting
825
+ - **Proportionality**: Code report insights should complement, not replace, paper-based analysis; aim for subtle enhancement rather than extensive additions
826
+
827
+ **Code Report:**
828
+ {code_report}
829
+ """
830
+
831
+ CODE_REPORT_PROMPT_FOR_SECTION_REVISER = """Code Report Context:
832
+ You are provided with a **Code Report** containing implementation insights for the papers in this survey topic, including: framework choices, environment setup guidance, and repository quality assessment.
833
+
834
+ **Usage Principles (CRITICAL - Follow Strictly):**
835
+ - **Topic coherence**: Only incorporate code report content that directly relates to the current section's theme; unrelated framework details must be ignored
836
+ - **Structure preservation**: Integrate insights seamlessly into existing paragraphs without disrupting the survey's logical flow or section organization
837
+ - **Readability maintenance**: Add technical details sparingly; if code snippets are needed, ensure clean formatting
838
+ - **Proportionality**: Code report insights should complement, not replace, paper-based analysis; aim for subtle enhancement rather than extensive additions
839
+
840
+ **Code Report:**
841
+ {code_report}
842
+ """
843
+
844
+ CODE_REPORT_PROMPT_FOR_SECTION_REVIEWER = """Code Report Context:
845
+ You are provided with a **Code Report** containing implementation insights for the papers in this survey topic, including: framework choices, environment setup guidance, and repository quality assessment.
846
+
847
+ **Usage Principles (CRITICAL - Follow Strictly):**
848
+ - **Topic coherence**: Only incorporate code report content that directly relates to the current section's theme; unrelated framework details must be ignored
849
+ - **Structure preservation**: Integrate insights seamlessly into existing paragraphs without disrupting the survey's logical flow or section organization
850
+ - **Readability maintenance**: Add technical details sparingly; if code snippets are needed, ensure clean formatting
851
+ - **Proportionality**: Code report insights should complement, not replace, paper-based analysis; aim for subtle enhancement rather than extensive additions
852
+
853
+ **Code Report:**
854
+ {code_report}
855
+ """
856
+
857
+ CODE_REPORT_PROMPT_FOR_SURVEY_REVISER = """Code Report Context:
858
+ You are provided with a **Code Report** containing implementation insights for the papers in this survey topic, including: framework choices, environment setup guidance, and repository quality assessment.
859
+
860
+ **Usage Principles (CRITICAL - Follow Strictly):**
861
+ - **Topic coherence**: Only incorporate code report content that directly relates to the survey's themes; unrelated framework details must be ignored
862
+ - **Structure preservation**: Integrate insights seamlessly into existing sections without disrupting the survey's logical flow or organization
863
+ - **Readability maintenance**: Add technical details sparingly; if code snippets are needed, ensure clean formatting
864
+ - **Proportionality**: Code report insights should complement, not replace, paper-based analysis; aim for subtle enhancement rather than extensive additions
865
+
866
+ **Code Report:**
867
+ {code_report}
868
+ """
869
+
870
+ CODE_REPORT_PROMPT_FOR_SURVEY_REVIEWER = """Code Report Context:
871
+ You are provided with a **Code Report** containing implementation insights for the papers in this survey topic, including: framework choices, environment setup guidance, and repository quality assessment.
872
+
873
+ **Usage Principles (CRITICAL - Follow Strictly):**
874
+ - **Topic coherence**: Only incorporate code report content that directly relates to the survey's themes; unrelated framework details must be ignored
875
+ - **Structure preservation**: Integrate insights seamlessly into existing sections without disrupting the survey's logical flow or organization
876
+ - **Readability maintenance**: Add technical details sparingly; if code snippets are needed, ensure clean formatting
877
+ - **Proportionality**: Code report insights should complement, not replace, paper-based analysis; aim for subtle enhancement rather than extensive additions
878
+
879
+ **Code Report:**
880
+ {code_report}
881
+ """
882
+
883
+ PAPER_RELATIONSHIP_ANALYSIS = """You are an expert researcher analyzing the citation relationship between two scientific papers to understand the evolution of ideas.
884
+
885
+ Paper A (The Citer) cites Paper B (The Cited).
886
+
887
+ --- Paper A (Citing Paper) ---
888
+ {src_title}:
889
+ {src_keynote}
890
+
891
+ --- Paper B (Cited Paper) ---
892
+ {dist_title}:
893
+ {dist_keynote}
894
+
895
+ Task:
896
+ Analyze the citation relationship to determine how Paper A utilizes or relates to Paper B.
897
+
898
+ 1. Classify the **Relationship Type** into one of the following categories:
899
+ - "Foundation": Paper B provides the theoretical basis, core method, or backbone architecture that Paper A is built upon.
900
+ - "Extension": Paper A explicitly improves, optimizes, or addresses a limitation of Paper B (e.g., "We improve [B] by...").
901
+ - "Comparison": Paper B is used primarily as a baseline or state-of-the-art method for experimental comparison.
902
+ - "Application": Paper A applies the method/theory from Paper B to a new problem setting or domain.
903
+ - "Alternative": Paper A proposes a different approach to solve the same problem as Paper B, citing it as a contrasting method.
904
+ - "Background": Paper B is cited to provide general context, definition, or motivation, without a strong technical dependency.
905
+ - "Other": Any other type of relationship not covered above. Provide a brief explanation.
906
+
907
+ 2. Provide a **Specific Analysis** (1-3 sentences).
908
+ - Explain the logical connection.
909
+ - Clearly state what specific part of Paper B is used, improved, or compared against by Paper A.
910
+
911
+ - Generate JSON directly without any other things.
912
+ - Output strictly in JSON format:
913
+ {{
914
+ "type": "...",
915
+ "analysis": "..."
916
+ }}
917
+ """
918
+
919
+ CLUSTER_TABLE_GENERATION = """You are an expert research analyst creating a comparative survey table for a specific cluster of papers.
920
+
921
+ **Cluster Context:**
922
+ Name: {cluster_name}
923
+ Description: {cluster_description}
924
+
925
+ **Papers in Cluster:**
926
+ {paper_content}
927
+
928
+ **Task:**
929
+ 1. Analyze the papers to identify 3-5 **Dimensions of Comparison** that best highlight the similarities and differences within this specific cluster.
930
+ - Do NOT use generic dimensions like "Year" or "Author" unless they are critical to the scientific trend.
931
+ - Choose technical dimensions relevant to the topic (e.g., "Methodology Paradigm", "Supervision Type", "Complexity", "Auxiliary Data", "Key Assumption").
932
+ 2. Create a comparison table where each row is a paper and each column is one of the dimensions you identified.
933
+ 3. Fill in the cells concisely (phrases, not paragraphs). Use "N/A" if the information is not applicable or available.
934
+
935
+ **Output Requirement:**
936
+ - Generate JSON directly without any other things.
937
+ - The top-level JSON value MUST be one object (``{{...}}``), never a JSON list
938
+ (``[...]``), Markdown table, or prose. A list response is invalid and will be
939
+ regenerated.
940
+ - Include both ``comparison_dimensions`` and ``table_data`` exactly as shown.
941
+ - Output strictly in JSON format with the following structure:
942
+ {{
943
+ "comparison_dimensions": ["Dimension 1", "Dimension 2", "Dimension 3", ...],
944
+ "table_data": [
945
+ {{
946
+ "paper_id": "Paper ID",
947
+ "paper_title": "Paper Title",
948
+ "columns": {{
949
+ "Dimension 1": "Value...",
950
+ "Dimension 2": "Value...",
951
+ ...
952
+ }}
953
+ }},
954
+ ...
955
+ ]
956
+ }}
957
+ """
958
+
959
+ SECTION_DRAFT = """You are writing the Introductory Paragraphs/Preamble for a specific section of an academic top-tier conference survey paper.
960
+ **Task**:
961
+ Write the opening text that appears immediately after the Section Title but before the first subsection. This content should serve as a high-level synthesis and roadmap for the reader.
962
+
963
+ **Requirements**:
964
+ 1. Synthesize, Don't Summarize: Do not simply list what each subsection will do. Instead, explain the logic behind why this section is structured this way and the significance of these topics within the broader field.
965
+ 2. Establish Definition & Scope: Clearly define the core concepts covered in this section. Refer to <paper_title> to establish foundational definitions or taxonomies.
966
+ 3. Identify Trends: Highlight the overarching trends or challenges that link the following subsections together.
967
+ 4. Academic Tone: Maintain a formal, authoritative, and objective voice.
968
+ 5. Citations: * Only cite papers provided in the relevant papers provided below(Closely Relevant papers and Other Relevant papers).
969
+ Use the format: <paper_title>.
970
+ 6. Use about {section_target_citations} citations (never more than {section_max_citations}) to ground the section's scope when its SH plan allows evidence-backed or qualified synthesis. If the section only explains EVIDENCE_GAP_REPORT or OUT_OF_SCOPE_OR_REJECTED SHs, this generic target does not apply: identify the limitation and do not invent citations.
971
+ 7. Utilize the input content in a safe and reasonable manner, and ensure that the readability, structure, and depth of the content of the paragraph meet the requirements of a top-tier conference survey.
972
+ 8. Length: Aim for about {section_target_words} words and do not exceed {section_max_words} words. Keep this preamble compact so the subsection budgets control the complete survey length.
973
+ 9. CRITICAL: '#' is used for section/subsection anchor. Avoid any '#' in the output content.
974
+
975
+ **Input**:
976
+ - Section Title:
977
+ {title}
978
+
979
+ - Section Description:
980
+ {description}
981
+
982
+ - Full Survey Outline:
983
+ {survey_outline}
984
+
985
+ Planned Subsections under this Section: {subsection_drafts} (Use these as a roadmap, do not detail their findings yet).
986
+
987
+ - Closely Relevant papers:
988
+ {papers}
989
+
990
+ - Other Relevant papers:
991
+ {other_relevant_papers}
992
+
993
+ - Authoritative survey evidence plan:
994
+ {survey_evidence_plan}
995
+
996
+ **Output**:
997
+ Generate the introductory content directly. DO NOT generate any subsection title or section header here.
998
+ When evidence_bounded_writing=true in the plan, obey every SH writing mode and paper_role_constraints: do not use graph-expanded candidates as evidence, because root lineage never upgrades them; do not use background papers as direct support; use QUALIFIED_SH_CONTRIBUTION only for qualified, limitation-bearing synthesis. A multimodal_projection is supplied local data rather than literature: retain its sample scope, limits, alternatives, and uncertainty; never say it proves or establishes a mechanism. End with the same single final [[SH_CLAIM_TRACE]] JSON block required for bounded subsection writing. Each trace claim should use a one-based claim_index, a short claim_anchor, SH, claim mode, and either a minimal (SH, slot, paper) paper path or a minimal (SH, observation_id) multimodal-observation path. Do not emit evidence_role, support_kind, or limitation_slots: the program derives them from the plan. Every bounded response must contain at least one claim; only gap/rejection claims may use evidence_paths: []. Omit the block only when the plan is inactive.
999
+ """
1000
+
1001
+ SECTION_REVIEW = """You are an expert reviewer for an academic survey paper with deep analysis and insights concerning topic: {topic}. You are reviewing the section:{section_title}.
1002
+ The draft section may contain inline paper citations in angle brackets (e.g., "<Attention is All You Need>").
1003
+
1004
+ **Task**:
1005
+ 1. Read the Draft Text for the given section and perform a short, careful review focused on clarity, logical flow, technical accuracy, and depth for an academic survey.
1006
+ 2. Produce a clear, specific, and actionable **list of revision suggestion list**.
1007
+ 3. Each suggestion should concisely explain *what* to change, *why* and *how* to implement it. When appropriate, point to the exact sentence or short excerpt from the draft to anchor the suggestion.
1008
+ 4. You will be provided with the previous and next sections for context. Use them to ensure logical flow and coherence across sections.
1009
+ 5. Only give suggestions on the current section.
1010
+ 6. There are some basic requirements as follow. If the section does not meet any, provide relevant modification suggestions.
1011
+ 7. If the section is satisfactory, provide an empty suggestion list.
1012
+ 8. Suggest sorting by importance, with important ones coming first.
1013
+ 9. You are suggested to give no more than 5 suggestions
1014
+
1015
+ **Requirements**:
1016
+ 1. You should only provide suggestions on content. DO NOT give any suggestions that involve changing the titles of the section and any subsections.
1017
+ 2. The section text should have around {section_target_words} words and stay within the survey's total length budget. Current section length: {current_section_length} words. Avoid over long or over short section.
1018
+ 3. All citations in the section must be in correct format: <paper_title> (like <Attention is All You Need>).
1019
+ 4. The goal is to ultimately complete a survey section with depth, insights and can boost further development, rather than simply listing methods.
1020
+ 5. The section content should have deep insights, novelty and analysis under the field of the section.
1021
+ 6. The section content should be clear and coherent. Avoid over verbose phrase or any repetitions.
1022
+ 7. The section content should be elegantly formatted and have good readability, avoid extremely long sentences ,paragraphs or subsections.
1023
+ 8. The content of the section should be strictly consistent with the outline of the section provided below.
1024
+ 9. The section content should be logically coherent and academically styled with acdamic rigor and precise description.
1025
+ 10. The paragraph should contain sufficient citations to support the viewpoints and provide specific and in-depth analysis
1026
+ 11. The introduction/preamble of each section must be concise, and the main content should be placed in each specific subsection.
1027
+ 12. You should only change the content of the current section.
1028
+ 13. You can use content in Additional Context if it's not None and you consider it necessary.
1029
+
1030
+ **Input**:
1031
+ Previous Section:
1032
+ {previous_section_text}
1033
+
1034
+ Next Section:
1035
+ {next_section_text}
1036
+
1037
+ Current Section:
1038
+ {section_text}
1039
+
1040
+ Section Outline:
1041
+ {section_outline}
1042
+
1043
+ Additional Context:
1044
+ {additional_context}
1045
+
1046
+ **Output format (exact)**:
1047
+ [
1048
+ "suggestion 1",
1049
+ "suggestion 2",
1050
+ ...
1051
+ ]
1052
+ """
1053
+
1054
+ SECTION_REVISE = """
1055
+ You are a revise assistant. The section content of a survey concerning {topic} is provided below. The section name is: {section_title}.
1056
+ You must propose at most ONE exact textual substitution per response according to the suggestion of reviewer.
1057
+ If you think the document requires changes, choose one that you think is most important to address next, and output ONE JSON object (and nothing else).
1058
+
1059
+ **Revision Goal:**
1060
+ Your revision target: produce a survey section that meets the quality standards of a top-tier academic conference survey, with rigorous logic, excellent readability, and sufficient depth.
1061
+
1062
+ **Output format:**
1063
+ {{
1064
+ "action":"replace",
1065
+ "originalText":"<the exact substring to replace>",
1066
+ "newText":"<the replacement text>"
1067
+ }}
1068
+
1069
+ The originalText field must match EXACTLY ONE substring in the document.
1070
+ If you believe no edits are required, output exactly: {{"action":"done"}}.
1071
+
1072
+ Section Outline(You should not change):
1073
+ {section_outline}
1074
+
1075
+ Original Section Text:
1076
+ {text}
1077
+
1078
+ Citation Text:
1079
+ {citations}
1080
+
1081
+ Additional Context:
1082
+ {additional_context}
1083
+
1084
+ Guidance:
1085
+ - Give one minimal but precise modification.
1086
+ - Revise the paragraph to enhance its readability, logicality and depth.
1087
+ - Your modifications **MUST** be consistent with the overall structure, logic and the scope(title) of the section.
1088
+ - The revise should meets the standards of a top-tier academic literature review
1089
+
1090
+ Revision instructions:
1091
+ - The field originalText must be an exact substring of the document matches the content part, NOT the header part (### Title).
1092
+ - The section and subsection headers (lines starting with #) remain IMMUTABLE anchors. Do not change them.
1093
+ - The modification has multiple iterations, so make minimal changes: prefer a single precise substitution rather than rewriting whole paragraphs.
1094
+ - You will be provided with Reivewer Suggestion which guides you what and how to modify.
1095
+ - You can add analysis, specific details or insights to increase the depth of survey.
1096
+ - If the Review Suggestion is empty, you can give modification that enhance depth, readability, or acdamic rigor of the paper.
1097
+ - You can cite new literature from Citation Text(if provided) if it helps improve the content's depth, novelty or completeness.
1098
+ - You can only cite papers from the Citation Text. Make sure the title matches EXACTLY.
1099
+ - You can use content in Additional Context if its's not None and you consider it necessary.
1100
+
1101
+ Reviewer Suggestion:
1102
+ {reviewer_suggestion}
1103
+
1104
+ Strict rules:
1105
+ - Any modification with titles in "originalText" is strictly prohibited.
1106
+ - The field originalText must be an exact substring of the document (it may include newlines).
1107
+ - Output only the JSON object described above. Do NOT output any prose.
1108
+ - Do not return arrays. Only one JSON object.
1109
+ - Keep the substitution minimal and precise.
1110
+ - Any additions that are repetitive, spoil the format, inconsistent with the paragraph logic, or beyond the scope of the content are strictly prohibited
1111
+
1112
+ """
1113
+
1114
+
1115
+ EVIDENCE_BOUNDED_SECTION_QUALITY_REVIEW = """You are a quality reviewer for one section of an evidence-bounded academic survey on {topic}.
1116
+
1117
+ Assess the section itself; do not propose title changes, new citations, or claims that require evidence not already present in the text. The outline is immutable.
1118
+
1119
+ Score each dimension from 0 to 10:
1120
+ - readability: clarity, paragraph flow, concise academic prose, and formatting;
1121
+ - scientific: scientific precision, cautious interpretation, analytical depth, and whether the existing evidence is represented without overclaiming;
1122
+ - framework: fidelity to the supplied section outline, logical organisation, and terminological consistency.
1123
+
1124
+ Give at most {max_suggestions} concrete, local revision suggestions. Each suggestion must be feasible without adding, removing, or replacing a citation, changing any heading, or introducing a new empirical result.
1125
+
1126
+ Previous Section:
1127
+ {previous_section_text}
1128
+
1129
+ Next Section:
1130
+ {next_section_text}
1131
+
1132
+ Current Section:
1133
+ {section_text}
1134
+
1135
+ Immutable Section Outline:
1136
+ {section_outline}
1137
+
1138
+ Return exactly one JSON object and nothing else:
1139
+ {{
1140
+ "scores": {{
1141
+ "readability": 0,
1142
+ "scientific": 0,
1143
+ "framework": 0
1144
+ }},
1145
+ "suggestions": ["specific, local suggestion"]
1146
+ }}
1147
+ """
1148
+
1149
+
1150
+ EVIDENCE_BOUNDED_SECTION_QUALITY_REVISE = """Revise one section of an evidence-bounded academic survey on {topic}.
1151
+
1152
+ Apply only the supplied quality suggestions. This is a constrained editorial revision, not new research or a new evidence synthesis.
1153
+
1154
+ Strict rules:
1155
+ 1. Return the complete revised section, including all existing Markdown headings.
1156
+ 2. Preserve every heading line verbatim. Do not add, remove, rename, reorder, or promote/demote headings.
1157
+ 3. Preserve the set of cited papers exactly. Do not add, remove, replace, or edit any inline citation token in angle brackets.
1158
+ 4. Do not add empirical facts, numerical results, causal claims, or paper-specific claims that are not already expressed in the original section.
1159
+ 5. Keep the section aligned with the immutable outline and within {section_word_cap} words.
1160
+ 6. Improve prose, caveats, transitions, precision, and explanation where possible; if no safe improvement is possible, return the original section unchanged.
1161
+
1162
+ Immutable Section Outline:
1163
+ {section_outline}
1164
+
1165
+ Original Section:
1166
+ {section_text}
1167
+
1168
+ Quality Suggestions:
1169
+ {suggestions}
1170
+
1171
+ Return exactly one JSON object and nothing else:
1172
+ {{
1173
+ "revised_section": "complete revised section text"
1174
+ }}
1175
+ """
1176
+
1177
+ SURVEY_REVIEW = """You are an expert reviewer for an academic survey paper concerning topic: {topic}. You are reviewing the whole survey.
1178
+ The survey may contain inline paper citations in angle brackets (e.g., "<Attention is All You Need>").
1179
+
1180
+ **Task**:
1181
+ 1. Read the Draft Text for the given survey and perform a short, careful review focused on clarity, logical flow, technical accuracy, integrity and depth for an academic survey.
1182
+ 2. Produce a clear, specific, and actionable **list of revision suggestion list**.
1183
+ 3. Each suggestion should concisely explain *what* to change, *why* and *how* to implement it. When appropriate, point to the exact sentence or short excerpt from the draft to anchor the suggestion.
1184
+ 4. There are some basic requirements as follow. If the survey does not meet any, provide relevant modification suggestions.
1185
+ 5. If the survey is satisfactory, provide an empty suggestion list.
1186
+
1187
+ **Requirements**:
1188
+ 1. You should only provide suggestions on content. DO NOT give any suggestions that involve changing the outline(title of the section and any subsections).
1189
+ 2. All citations in the survey must be in correct format: <paper_title> (like <Attention is All You Need>).
1190
+ 3. The survey should avoid over verbose phrase or any repetitive content.
1191
+ 4. The survey content should be logically coherent and academically styled with acdamic rigor and precise description.
1192
+ 5. The survey content should have deep insights, novelty and analysis under the field of the survey.
1193
+ 6. The survey content should be elegantly formatted and have good readability, avoid extremely long sentences or paragraphs.
1194
+ 7. Avoid Extremely long section or subsection.
1195
+ 8. The introduction/preamble of each section must be concise, and the main content should be placed in each specific subsection.
1196
+ 9. The survey should have good clarity, acadamic rigor and coherence in description and all the conceptions.
1197
+ 10. The content of the survey should be strictly consistent with the outline provided below.
1198
+ 11. The survey should provide specific guidance on possible furture direction.
1199
+ 12. You can use content in Additional Context if its's not None and you consider it necessary.
1200
+
1201
+ **Input**:
1202
+ Survey:
1203
+ {survey}
1204
+
1205
+ SURVEY Outline:
1206
+ {survey_outline}
1207
+
1208
+ Additional Context:
1209
+ {additional_context}
1210
+
1211
+ **Output format (exact)**:
1212
+ [
1213
+ "suggestion 1",
1214
+ "suggestion 2",
1215
+ ...
1216
+ ]
1217
+ """
1218
+
1219
+ SURVEY_REVISE = """
1220
+ You are a revise assistant. The content of a survey concerning {topic} is provided below. .
1221
+ You must propose at most ONE exact textual substitution per response according to the suggestion of reviewer.
1222
+ If you think the document requires changes, choose one that you think is most important to address next, and output ONE JSON object (and nothing else).
1223
+
1224
+ **Output format:**
1225
+ {{
1226
+ "action":"replace",
1227
+ "originalText":"<the exact substring to replace>",
1228
+ "newText":"<the replacement text>"
1229
+ }}
1230
+
1231
+ The originalText field must match EXACTLY ONE substring in the document.
1232
+ If you believe no edits are required, output exactly: {{"action":"done"}}.
1233
+
1234
+ **Revision Goal:**
1235
+ Your revision target: produce a survey that meets the quality standards of a top-tier academic conference survey, with rigorous logic, excellent readability, and sufficient depth.
1236
+
1237
+ Survey Outline(You should not change):
1238
+ {survey_outline}
1239
+
1240
+ Original Survey Text:
1241
+ {survey}
1242
+
1243
+ Additional Context:
1244
+ {additional_context}
1245
+
1246
+ Guidance:
1247
+ - Give one minimal but precise modification.
1248
+ - Revise the paragraph to enhance its readability, logicality and depth.
1249
+ - Your modifications **MUST** be consistent with the overall structure, logic and the topic of the survey.
1250
+ - The revise should meets the standards of a top-tier academic literature review
1251
+
1252
+ Revision instructions:
1253
+ - The field originalText must be an exact substring of the document matches the content part, NOT the header part (### Title).
1254
+ - The section and subsection headers (lines starting with #) remain IMMUTABLE anchors. Do not change them.
1255
+ - The modification has multiple iterations, so make minimal changes: prefer a single precise substitution rather than rewriting whole paragraphs.
1256
+ - You will be provided with Reivewer Suggestion which guides you what and how to modify.
1257
+ - If the Review Suggestion is empty, you can give modification that enhance coherence, readability, depth, or acdamic rigor.
1258
+ - You can use content in Additional Context if its's not None and you consider it necessary.
1259
+
1260
+ Reviewer Suggestion:
1261
+ {reviewer_suggestion}
1262
+
1263
+ Strict rules:
1264
+ - Any modification with titles in "originalText" is strictly prohibited.
1265
+ - The field originalText must be an exact substring of the document (it may include newlines).
1266
+ - Output only the JSON object described above. Do NOT output any prose.
1267
+ - Do not return arrays. Only one JSON object.
1268
+ - Keep the substitution minimal and precise.
1269
+ - Any additions that are repetitive, spoil the format, inconsistent with the paragraph logic, or beyond the scope of the content are strictly prohibited
1270
+
1271
+ """
1272
+
1273
+
1274
+ DRAFT_REFINEMENT = """You are refining an academic survey paper draft. The draft currently contains paper titles as citations (e.g., "<Attention is All You Need>").
1275
+
1276
+ **Task**:
1277
+ 1. Refine the draft to improve clarity, coherence, and academic style.
1278
+ 2. Replace all paper Title citations in format like <paper_title> (like <Attention is All You Need>) in the draft with numbered references in square brackets, in the order of first appearance.
1279
+ 3. Each citation number corresponds to a single paper title.
1280
+ 4. Keep all original content and ideas.
1281
+ 5. Integrate citations smoothly and naturally within the text.
1282
+
1283
+ **Input**:
1284
+ Draft Text:
1285
+ {draft_text}
1286
+
1287
+ **Output**:
1288
+ Provide a **JSON object** with the following structure:
1289
+
1290
+ {{
1291
+ "refined_survey": "<refined survey text with numbered citations>",
1292
+ "references": [<paper_title for citation 1>, <paper_title for citation 2>, ...]
1293
+ }}
1294
+
1295
+ - `refined_survey` is a string containing the survey text with citations replaced by `[number]`.
1296
+ - `references` is a list of objects ordered by citation number, each mapping the index to its corresponding paper IDs.
1297
+ - Ensure JSON is valid and parsable.
1298
+ - Generate JSON directly without any other things.
1299
+ - Do not generate a bibliography or reference list here.
1300
+ """
1301
+
1302
+ DRAFT_REFINEMENT_IN_PARTS = """You are refining an section of academic survey paper draft with title: {title}. The draft currently contains paper titles as citations (e.g., "<Attention is All You Need>").
1303
+
1304
+ **Key Task**:
1305
+ 1. Improve the overall quality of the subsection according to the standards of a well formatted and in-depth academic survey
1306
+ 2. Refine the draft to improve clarity, coherence, and academic style.
1307
+ 3. Improve obscure expressions and overly lengthy sentences in subsections to enhance readability.
1308
+ 4. Avoid meaningless repetitions, over verbose phrases, or extremely long sentences or paragraphs.
1309
+
1310
+ **Requirements**:
1311
+ 1. Fix all the citations in other format. The correct citation must be paper title in <> (like <Attention is All You Need>).
1312
+ 2. Make sure each <> contains only one paper title. Split titles in to seperate <> if one <> contains multiple paper titles.
1313
+ 3. Keep all original content and ideas. Do not delete any citations.
1314
+ 4. You are provided with the previous and next section/subsection of the draft. Use them to ensure logical flow and coherence across sections.
1315
+ 5. Directly output the refined draft text. Do not generate any other explanations.
1316
+ 6. Only refine the draft in Draft Text. Do not modify the previous or next sections.
1317
+ 7. Enhance the readability, coherence and academic style of the draft.
1318
+ 8. You can make any modification that does not change the original content and ideas, such as rephrasing sentences, improving transitions, fixing grammar or formatting issues, etc.
1319
+
1320
+ **Input**:
1321
+ Previous Section:
1322
+ {previous_text}
1323
+
1324
+ Next Section:
1325
+ {next_text}
1326
+
1327
+ Draft Text:
1328
+ {draft_text}
1329
+
1330
+ Generate refined draft content directly.
1331
+ - Do not generate any section/subsection title or header here.
1332
+ - Do not generate a bibliography or reference list here.
1333
+ """
1334
+
1335
+ DRAFT_REFINEMENT_SUBSECTION_IN_PARTS = """You are an expert in acdamic top-tier survey/literature review writing. Now you are refining an survey with topic {topic}'s subsection titled {subsection_title}. The subsection is under a section titled {section_title}. The draft currently contains paper titles as citations (e.g., "<Attention is All You Need>").
1336
+
1337
+ **Key Task**:
1338
+ revision target: a subsection of survey that meets the quality standards of a top-tier academic conference survey, with rigorous logic, excellent readability, and sufficient depth.
1339
+ 1. Improve the overall quality of the subsection according to the standards of a well formatted and in-depth academic survey
1340
+ 2. Refine the draft to improve clarity, coherence, and academic style.
1341
+ 3. Improve obscure expressions and overly lengthy sentences in subsections to enhance readability.
1342
+ 4. Avoid meaningless repetitions, over verbose phrases, or extremely long sentences or paragraphs.
1343
+
1344
+ **Requirements**:
1345
+ 1. Fix all the citations in other format. The correct citation must be paper title in <> (like <Attention is All You Need>).
1346
+ 2. Make sure each <> contains only one paper title. Split titles in to seperate <> if one <> contains multiple paper titles.
1347
+ 3. Keep all original content and ideas. Do not delete any citations.
1348
+ 4. You are provided with the previous and next section/subsection of the draft. Use them to ensure logical flow and coherence across sections.
1349
+ 5. Directly output the refined draft text. Do not generate any other explanations.
1350
+ 6. Only refine the draft in Draft Text. Do not modify the previous or next sections.
1351
+ 7. Enhance the readability, coherence and academic style of the draft.
1352
+ 8. You can make any modification that does not change the original content and ideas, such as rephrasing sentences, improving transitions, fixing grammar or formatting issues, etc.
1353
+
1354
+ **Input**:
1355
+ Previous Section:
1356
+ {previous_text}
1357
+
1358
+ Next Section:
1359
+ {next_text}
1360
+
1361
+ Draft Text:
1362
+ {draft_text}
1363
+
1364
+ Generate refined draft content directly.
1365
+ - Do not generate any section/subsection title or header here.
1366
+ - Do not generate a bibliography or reference list here.
1367
+ """
1368
+
1369
+ ERROR_FEEDBACK_PROMPT = """The previous draft attempt encountered the following issues:
1370
+ {info}
1371
+ Please use this feedback to improve the next draft attempt.
1372
+ For example, if previous attempt cited non-existent or error papers, avoid citing the same paper_id and ensure all cited papers are from the provided relevant papers list.
1373
+ """
1374
+
1375
+ ###----EVALUATOR PROMPTS----###
1376
+ EVAL_CRITERIA = {
1377
+ 'Coverage':{
1378
+ 'description':'Coverage: Coverage assesses the extent to which the survey encapsulates all relevant aspects of the topic, ensuring comprehensive discussion on both central and peripheral topics.',
1379
+ 'score 1':'The survey has very limited coverage, only touching on a small portion of the topic and lacking discussion on key areas.',
1380
+ 'score 2':'The survey covers some parts of the topic but has noticeable omissions, with significant areas either underrepresented or missing.',
1381
+ 'score 3':'The survey is generally comprehensive in coverage but still misses a few key points that are not fully discussed.',
1382
+ 'score 4':'The survey covers most key areas of the topic comprehensively, with only very minor topics left out.',
1383
+ 'score 5':'The survey comprehensively covers all key and peripheral topics, providing detailed discussions and extensive information.',
1384
+ },
1385
+
1386
+ 'Structure':{
1387
+ 'description':'Structure: Structure evaluates the logical organization and coherence of sections and subsections, ensuring that they are logically connected.',
1388
+ 'score 1':'The survey lacks logic, with no clear connections between sections, making it difficult to understand the overall framework.',
1389
+ 'score 2':'The survey has weak logical flow with some content arranged in a disordered or unreasonable manner.',
1390
+ 'score 3':'The survey has a generally reasonable logical structure, with most content arranged orderly, though some links and transitions could be improved such as repeated subsections.',
1391
+ 'score 4':'The survey has good logical consistency, with content well arranged and natural transitions, only slightly rigid in a few parts.',
1392
+ 'score 5':'The survey is tightly structured and logically clear, with all sections and content arranged most reasonably, and transitions between adajecent sections smooth without redundancy.',
1393
+ },
1394
+
1395
+ 'Relevance':{
1396
+ 'description':'Relevance: Relevance measures how well the content of the survey aligns with the research topic and maintain a clear focus.',
1397
+ 'score 1':'The content is outdated or unrelated to the field it purports to review, offering no alignment with the topic',
1398
+ 'score 2':'The survey is somewhat on topic but with several digressions; the core subject is evident but not consistently adhered to.',
1399
+ 'score 3':'The survey is generally on topic, despite a few unrelated details.',
1400
+ 'score 4':'The survey is mostly on topic and focused; the narrative has a consistent relevance to the core subject with infrequent digressions.',
1401
+ 'score 5':'The survey is exceptionally focused and entirely on topic; the article is tightly centered on the subject, with every piece of information contributing to a comprehensive understanding of the topic.',
1402
+ },
1403
+
1404
+ "Relevance-10-score": {
1405
+ "aspect": "Core Quality",
1406
+ "description": "Relevance (10-point scale): measures how well the content of the survey aligns with the research topic and maintains a clear, unwavering focus throughout. It evaluates whether every section, paragraph, and sentence contributes to advancing the reader's understanding of the stated topic, and whether tangential content is either absent or minimal.",
1407
+ "score 1": "Completely irrelevant — the survey addresses a fundamentally different topic; content has no meaningful connection to the stated research area.",
1408
+ "score 2": "Mostly irrelevant — the survey only tangentially touches the topic, with the majority of content being off-topic, peripheral, or unrelated.",
1409
+ "score 3": "Weakly relevant — several sections or subsections discuss the topic, but significant portions (more than 30%) are digressive or off-topic.",
1410
+ "score 4": "Somewhat relevant — the survey covers the topic but often digresses into unrelated areas; focus is inconsistent throughout.",
1411
+ "score 5": "Moderately relevant — the survey is generally on topic, with most content aligning with the research focus, though notable unrelated details appear in places.",
1412
+ "score 6": "Reasonably relevant — the survey maintains focus on the topic with occasional minor digressions; most sections contribute meaningfully to the core subject.",
1413
+ "score 7": "Strongly relevant — the survey is largely focused, with consistent alignment to the research topic; only rare and minor unrelated content present.",
1414
+ "score 8": "Very strongly relevant — the survey is tightly focused with near-perfect topical alignment; every section contributes to the core subject with only negligible peripheral content.",
1415
+ "score 9": "Exceptionally relevant — the survey demonstrates exemplary topical coherence; content is exclusively focused on the research topic with no discernible digressions.",
1416
+ "score 10": "Perfectly relevant — the survey is a model of topical unity; every single element, from introduction to conclusion, is laser-focused on advancing the reader's understanding of the research topic, with no off-topic content whatsoever."
1417
+ },
1418
+
1419
+ 'Depth':{
1420
+ 'description':'Depth: Depth evaluates the level of *technical and analytical rigor* in explaining underlying principles, assumptions, failure modes, trade-offs, and engineering implementations of different methods. It emphasizes *mechanism-level reasoning*, *comparative analysis with clear criteria*, and *actionable synthesis* (not just literature aggregation).',
1421
+ 'score 1':'The survey is largely a bibliography or a list of methods/tasks with near-zero technical content. It does not explain how methods work, what assumptions they rely on, or why they differ; comparisons are absent or purely descriptive.',
1422
+ 'score 2':'The survey contains minimal technical explanation (mostly high-level intuition or slogans). Comparisons are shallow (e.g., “better/worse” without conditions), key assumptions and limitations are ignored, and there is little to no discussion of implementation details, complexity, or failure cases.',
1423
+ 'score 3':'The survey provides basic mechanism-level descriptions for a subset of methods and can state a few meaningful differences. However, analysis remains coarse: trade-offs are not articulated with clear axes (e.g., compute/data/latency/robustness), evidence is not tied to claims, and engineering details (hyperparameters, architectures, training regimes, evaluation setups) are only partially covered.',
1424
+ 'score 4':'The survey gives *substantive* technical analysis for most core methods, including explicit trade-off axes (e.g., accuracy vs. efficiency, scalability vs. stability, robustness vs. alignment), common failure modes, and reproducibility-relevant engineering details. It synthesizes patterns across works (not just per-paper summaries) and derives *well-supported* future directions with concrete open problems.',
1425
+ 'score 5':'The survey demonstrates *exceptional* depth with rigorous, end-to-end synthesis: it explains methods at the level of objectives/derivations or algorithmic steps, clarifies assumptions and when they break, analyzes empirical outcomes through causal or mechanistic hypotheses, and connects theory ↔ implementation ↔ evaluation. It provides taxonomy-level insights grounded in evidence (e.g., why certain design choices dominate under specific constraints), highlights non-obvious pitfalls and boundary conditions, and proposes *actionable, testable* research directions (including what to measure, how to evaluate, and what would falsify key claims).',
1426
+ },
1427
+
1428
+ 'Rigor&Authenticity':{
1429
+ 'description':'Rigor&Authenticity: Rigor&Authenticity assesses whether the survey\'s claims are truthful, verifiable, and precisely stated. It evaluates citation integrity, evidence support, correct attribution, numerical/detail accuracy, and the avoidance of hallucinations, fabricated references, or overconfident unsupported assertions. It also checks whether uncertainty and limitations are clearly disclosed, and whether the survey enables readers to trace key statements back to reliable sources.',
1430
+ 'score 1':'The survey contains pervasive hallucinations or fabricated content (e.g., non-existent papers, wrong attributions, invented datasets/metrics). Many core claims are unverifiable or false; citations are missing or clearly incorrect; strong conclusions are made without evidence.',
1431
+ 'score 2':'The survey shows frequent factual errors or questionable claims. Citations are sparse, mismatched, or low-quality; multiple key details (dates, numbers, method names, benchmarks) appear unreliable or cannot be traced. Uncertainty is rarely acknowledged.',
1432
+ 'score 3':'The survey is mostly plausible and broadly accurate, but has several unverified statements or minor inaccuracies. Some important claims lack direct support or use vague referencing; a few citations may be incomplete or weakly connected. Limitations/uncertainty are mentioned but not systematically handled.',
1433
+ 'score 4':'The survey is largely factual and carefully grounded. Most nontrivial claims are supported by credible, traceable references; attribution is correct; numerical/details are consistent. Uncertainty, assumptions, and limitations are clearly stated, with only minor lapses (e.g., occasional vague wording or missing support for a small claim).',
1434
+ 'score 5':'The survey is exceptionally rigorous and trustworthy. All key claims are verifiable with high-quality sources; citations precisely match statements and are sufficient for tracing. It avoids overgeneralization, clearly distinguishes evidence from speculation, reports uncertainty and boundary conditions, and includes falsification-friendly details (e.g., exact settings, metrics, datasets, versions) enabling independent verification. No fabricated, misleading, or unsupported content is present.',
1435
+ },
1436
+
1437
+ "Synthesis Quality": {
1438
+ "aspect": "Core Quality",
1439
+ "description": "Synthesis quality: distinguishes true integration and conceptual grouping of literature from mere enumeration of papers.",
1440
+ "score 1": "No synthesis — the text is a disconnected list of papers with no comparison, grouping, or integrative statements.",
1441
+ "score 2": "Very weak synthesis — occasional grouping but mostly descriptive lists; links between works are absent or mistaken.",
1442
+ "score 3": "Minimal synthesis — some attempts to group papers or note similarities, but links are shallow and inconsistent.",
1443
+ "score 4": "Basic synthesis — groups and comparisons exist but are superficial and miss deeper patterns or tensions.",
1444
+ "score 5": "Moderate synthesis — reasonable grouping and some comparative statements; important cross-paper themes are noted but not developed.",
1445
+ "score 6": "Good synthesis — clear groups and comparisons, with emerging themes and some cross-cutting analysis.",
1446
+ "score 7": "Strong synthesis — integrates findings across multiple works, highlights causes of differences, and builds partial conceptual links.",
1447
+ "score 8": "Very strong synthesis — conveys nuanced relationships among studies, articulates patterns and contradictions, and forms clear conceptual maps.",
1448
+ "score 9": "Excellent synthesis — deeply integrates diverse sources, proposes coherent frameworks, and resolves or explains major discrepancies.",
1449
+ "score 10": "Outstanding synthesis — creates novel unifying frameworks or taxonomies, transforms raw literature into new conceptual insight."
1450
+ },
1451
+
1452
+ "Organization": {
1453
+ "aspect": "Core Quality",
1454
+ "description": "Organization: evaluates logical flow, section/subsection ordering, and ease of following the argument across the survey.",
1455
+ "score 1": "No logical order — sections are chaotic and the reader cannot form a coherent view of the topic.",
1456
+ "score 2": "Very poor ordering — frequent abrupt jumps and misplaced content; reader must constantly backtrack.",
1457
+ "score 3": "Weak organization — some logical chunks but many misplaced paragraphs or unclear section boundaries.",
1458
+ "score 4": "Below-average organization — parts make sense but transitions are rough and structure sometimes redundant.",
1459
+ "score 5": "Adequate organization — overall structure is serviceable though some sections could be rearranged for clarity.",
1460
+ "score 6": "Good organization — clear sections and logical progression with occasional weak transitions or minor redundancies.",
1461
+ "score 7": "Strong organization — well-ordered sections, clear flow, and purposeful subsectioning.",
1462
+ "score 8": "Very strong organization — sections build on each other smoothly; transitions are purposeful and guide the reader.",
1463
+ "score 9": "Excellent organization — highly coherent structure, logical sequencing, and efficient, non-redundant layout.",
1464
+ "score 10": "Exemplary organization — impeccable flow, perfect chapter/subsection design, and the structure itself aids understanding."
1465
+ },
1466
+
1467
+ # ---------- Writing Quality ----------
1468
+ "Readability": {
1469
+ "aspect": "Writing Quality",
1470
+ "description": "Readability: clarity and accessibility for the intended academic audience (sentence-level clarity, pacing, and jargon handling).",
1471
+ "score 1": "Unreadable — sentences are confusing, grammar errors abound, and jargon is opaque.",
1472
+ "score 2": "Very poor readability — frequent grammar issues and unclear sentences; reader struggles to extract meaning.",
1473
+ "score 3": "Low readability — many awkward sentences and unclear phrasing; frequent re-reading required.",
1474
+ "score 4": "Below-average readability — understandable in places but style is verbose or clumsy; jargon often unexplained.",
1475
+ "score 5": "Fair readability — generally clear though some sentences or paragraphs are convoluted.",
1476
+ "score 6": "Good readability — clear prose overall with occasional dense passages or uneven pacing.",
1477
+ "score 7": "Very good readability — fluent writing, appropriate use of terminology, and easy to follow.",
1478
+ "score 8": "Excellent readability — crisp sentences, well-balanced pacing, and accessible to the target academic audience.",
1479
+ "score 9": "Near-perfect readability — highly engaging academic prose with precise phrasing and smooth flow.",
1480
+ "score 10": "Outstanding readability — exemplary clarity and elegance; highly accessible without loss of technical precision."
1481
+ },
1482
+
1483
+ "Academic Rigor": {
1484
+ "aspect": "Writing Quality",
1485
+ "description": "Academic rigor: fidelity to scholarly standards (proper citations, fair representation of prior work, and methodological transparency).",
1486
+ "score 1": "No rigor — citations missing or blatantly incorrect; claims unsupported and methods misrepresented.",
1487
+ "score 2": "Very low rigor — many unsupported claims, poor citation practice, and factual errors.",
1488
+ "score 3": "Low rigor — partial or inconsistent citation and occasional misrepresentation of methods/results.",
1489
+ "score 4": "Below-average rigor — citations present but incomplete and some claims lack supporting evidence.",
1490
+ "score 5": "Moderate rigor — generally correct citations and basic methodological descriptions but missing nuance.",
1491
+ "score 6": "Good rigor — solid citation practice and fair representation of methods with minor gaps.",
1492
+ "score 7": "Strong rigor — careful referencing, transparent presentation of methods and limitations.",
1493
+ "score 8": "Very strong rigor — thorough citations, balanced critique of methods, and clear evidence-backed claims.",
1494
+ "score 9": "Excellent rigor — meticulous referencing, rigorous methodological critique, and consistently supported claims.",
1495
+ "score 10": "Exceptional rigor — exemplary scholarship: exhaustive, accurate citations and deep, transparent methodological analysis."
1496
+ },
1497
+
1498
+ "Clarity": {
1499
+ "aspect": "Writing Quality",
1500
+ "description": "Clarity: precision in technical descriptions, definitions, and explanations so readers can unambiguously understand methods and results.",
1501
+ "score 1": "Opaque — technical terms undefined, descriptions vague or misleading.",
1502
+ "score 2": "Very unclear — frequent ambiguity in definitions and technical statements.",
1503
+ "score 3": "Unclear in places — several technical passages lack precision or necessary definitional context.",
1504
+ "score 4": "Somewhat clear — important terms sometimes defined, but many explanations remain imprecise.",
1505
+ "score 5": "Moderately clear — most terms and methods are defined, but some technical ambiguity persists.",
1506
+ "score 6": "Generally clear — technical descriptions are understandable though occasionally terse or under-specified.",
1507
+ "score 7": "Clear — good precision in explanations and consistent definitions of key concepts.",
1508
+ "score 8": "Very clear — technical passages are well-explained and precise; readers can reproduce reasoning.",
1509
+ "score 9": "Extremely clear — excellent definitional consistency and precise, unambiguous technical exposition.",
1510
+ "score 10": "Perfect clarity — crystal-clear technical writing enabling immediate reproducibility and understanding."
1511
+ },
1512
+
1513
+ "Coherence": {
1514
+ "aspect": "Writing Quality",
1515
+ "description": "Coherence: internal consistency of claims, definitions, and conclusions across sections (no contradictions or drifting terms).",
1516
+ "score 1": "Contradictory — multiple direct contradictions and inconsistent use of terms across the text.",
1517
+ "score 2": "Very incoherent — frequent inconsistencies and shifting definitions or claims.",
1518
+ "score 3": "Inconsistent — notable contradictions or drifting terminology that confuse the narrative.",
1519
+ "score 4": "Some inconsistencies — occasional contradictions or uneven use of terms across sections.",
1520
+ "score 5": "Partly coherent — most sections consistent but a few conflicting statements remain.",
1521
+ "score 6": "Generally coherent — consistent claims and terminology with minor lapses.",
1522
+ "score 7": "Coherent — internally consistent throughout, with good alignment between sections and conclusions.",
1523
+ "score 8": "Very coherent — strong internal consistency; different parts reinforce a unified message.",
1524
+ "score 9": "Highly coherent — near-perfect consistency and thematic harmony across the survey.",
1525
+ "score 10": "Exceptionally coherent — flawless internal consistency; every section supports the central narrative."
1526
+ },
1527
+
1528
+ "Clarity & Coherence": {
1529
+ "aspect": "Writing Quality",
1530
+ "description": "Clarity and Coherence: the extent to which the survey presents technical ideas with precision, unambiguous definitions, and internally consistent terminology, claims, and conclusions across sections.",
1531
+ "score 1": "Very poor — highly vague, undefined terms, and multiple contradictions or inconsistent claims throughout.",
1532
+ "score 2": "Poor — frequent ambiguity and major inconsistencies that seriously hinder understanding.",
1533
+ "score 3": "Weak — many passages are unclear, with noticeable drifting terminology or conflicting statements.",
1534
+ "score 4": "Below average — some key ideas are understandable, but clarity is limited and inconsistencies remain in several places.",
1535
+ "score 5": "Moderate — the survey is mostly understandable, but important technical details are under-specified and coherence is uneven.",
1536
+ "score 6": "Fairly good — generally clear and mostly consistent, with a few imprecise explanations or minor inconsistencies.",
1537
+ "score 7": "Good — technical terms are usually defined well, and the narrative is coherent with only small lapses.",
1538
+ "score 8": "Very good — clear, precise, and internally consistent; readers can follow the logic with little effort.",
1539
+ "score 9": "Excellent — highly precise exposition with strong definitional consistency and near-zero contradictions.",
1540
+ "score 10": "Outstanding — crystal-clear, fully consistent, and immediately understandable; every section reinforces a unified narrative."
1541
+ },
1542
+
1543
+ # ---------- Content Depth ----------
1544
+ "Comprehensiveness": {
1545
+ "aspect": "Content Depth",
1546
+ "description": "Comprehensiveness: breadth of coverage across subtopics, methods, datasets, and perspectives relevant to the research area.",
1547
+ "score 1": "Extremely narrow — only a tiny slice of the topic covered; many core areas absent.",
1548
+ "score 2": "Very limited — major subtopics missing; coverage skewed to a few papers or approaches.",
1549
+ "score 3": "Sparse — several important areas omitted and coverage lacks depth.",
1550
+ "score 4": "Partial — some important areas covered but many relevant subtopics absent or lightly treated.",
1551
+ "score 5": "Moderate — key areas present but notable gaps in methods, datasets, or perspectives.",
1552
+ "score 6": "Reasonably comprehensive — most core areas covered though some peripheral topics missing.",
1553
+ "score 7": "Comprehensive — broad coverage including major methods and datasets with minor omissions.",
1554
+ "score 8": "Very comprehensive — covers almost all relevant facets with useful detail across areas.",
1555
+ "score 9": "Extensive — deep and wide coverage across subfields and perspectives; only small gaps remain.",
1556
+ "score 10": "Exhaustive — near-complete coverage across the domain, methods, datasets, and viewpoints."
1557
+ },
1558
+
1559
+ "Critical Analysis": {
1560
+ "aspect": "Content Depth",
1561
+ "description": "Critical analysis: depth of evaluation, fairness of critique, and the comparative assessment of strengths/weaknesses across works.",
1562
+ "score 1": "No critique — purely descriptive with no critical evaluation of methods or findings.",
1563
+ "score 2": "Very weak critique — token criticisms that are superficial or inaccurate.",
1564
+ "score 3": "Shallow critique — limited or one-sided criticisms lacking evidence or depth.",
1565
+ "score 4": "Some critique — occasional meaningful evaluation but inconsistent and incomplete.",
1566
+ "score 5": "Moderate critique — reasonable evaluations but lacking systematic comparative rigor.",
1567
+ "score 6": "Good critique — fair assessments, identifies key weaknesses and trade-offs in several areas.",
1568
+ "score 7": "Strong critique — systematic comparisons, balanced judgments, and evidence-backed critiques.",
1569
+ "score 8": "Very strong critique — deep analysis of methodological limitations, assumptions, and empirical gaps.",
1570
+ "score 9": "Excellent critique — rigorous, balanced, and insightful comparative evaluation across major works.",
1571
+ "score 10": "Masterful critique — transformative critique that clarifies fundamental limits, suggests remedies, and reshapes thinking."
1572
+ },
1573
+
1574
+ "Novelty and Insights": {
1575
+ "aspect": "Content Depth",
1576
+ "description": "Novelty and insights: the degree to which the survey produces original synthesis, useful conceptual reframing, or fresh research questions.",
1577
+ "score 1": "No novelty — restates existing content without any new perspective or insight.",
1578
+ "score 2": "Very little novelty — trivial observations only; no original framing or notable insight.",
1579
+ "score 3": "Low novelty — occasional small observations, but no meaningful new contribution.",
1580
+ "score 4": "Limited novelty — a few modest insights but mostly derivative.",
1581
+ "score 5": "Some novelty — useful observations that add modest clarity or re-organization.",
1582
+ "score 6": "Notable novelty — several original observations or useful reframings emerge.",
1583
+ "score 7": "Strong novelty — clear new insights or a helpful conceptual framing that aids understanding.",
1584
+ "score 8": "Very strong novelty — original synthesis that changes how parts of the field are seen.",
1585
+ "score 9": "Excellent novelty — significant conceptual contribution or new taxonomy with wide applicability.",
1586
+ "score 10": "Exceptional novelty — groundbreaking synthesis or insight that opens new directions or major re-interpretation."
1587
+ },
1588
+
1589
+ "Future Directions": {
1590
+ "aspect": "Content Depth",
1591
+ "description": "Future directions: quality and specificity of identified open problems, research trajectories, and actionable next steps for the field.",
1592
+ "score 1": "No future directions — none suggested or suggestions are irrelevant/obvious to the point of uselessness.",
1593
+ "score 2": "Very weak — vague or trivial future work statements without justification.",
1594
+ "score 3": "Weak — a few general suggestions that lack specificity or connection to gaps.",
1595
+ "score 4": "Limited — some potential directions mentioned but they are broad and under-motivated.",
1596
+ "score 5": "Moderate — plausible future directions linked to gaps but lacking concrete research paths.",
1597
+ "score 6": "Good — relevant and justified directions with some sense of how to pursue them.",
1598
+ "score 7": "Strong — clear, actionable research directions that address concrete gaps and trade-offs.",
1599
+ "score 8": "Very strong — well-motivated, specific proposals and near-term experiments or benchmarks suggested.",
1600
+ "score 9": "Excellent — insightful and prioritized research agenda with clear milestones and evaluation ideas.",
1601
+ "score 10": "Outstanding — visionary yet practical roadmap for the field, with detailed, high-impact research programs and measurable goals."
1602
+ },
1603
+
1604
+ "Specified Future Directions": {
1605
+ "aspect": "Content Depth",
1606
+ "description": "Future directions: the extent to which the survey provides concrete, well-justified, and actionable guidance for future research, including clearly defined problems, feasible methodologies, experimental setups, and evaluation strategies.",
1607
+ "score 1": "Absent — no meaningful future directions or only trivial/obvious statements.",
1608
+ "score 2": "Very weak — vague suggestions with no actionable detail or justification.",
1609
+ "score 3": "Weak — general directions mentioned but disconnected from identified gaps and lacking feasibility discussion.",
1610
+ "score 4": "Limited — some relevant directions, but still broad, under-specified, and difficult to operationalize.",
1611
+ "score 5": "Moderate — plausible directions linked to gaps, but limited detail on how to implement or evaluate them.",
1612
+ "score 6": "Good — directions are relevant and partially actionable, with some discussion of methods or evaluation.",
1613
+ "score 7": "Strong — clearly defined problems with actionable research paths, including hints of methodology or experimental design.",
1614
+ "score 8": "Very strong — specific and well-motivated directions, with concrete proposals (e.g., datasets, benchmarks, model designs) and feasibility considerations.",
1615
+ "score 9": "Excellent — detailed and insightful research agenda, including prioritized problems, methodological guidance.",
1616
+ "score 10": "Outstanding — highly actionable and deeply analyzed roadmap, offering concrete research programs with justified feasibility, step-by-step strategies, and measurable success criteria."
1617
+ },
1618
+
1619
+ "Specificity": {
1620
+ "aspect": "Content Depth",
1621
+ "description": "Specificity: the granularity and concreteness of the survey's analysis, including whether it goes beyond high-level summaries to discuss concrete implementation details, code-level mechanisms, module interactions, design choices, operational steps, and fine-grained distinctions between methods.",
1622
+ "score 1": "Extremely vague — entirely generic statements with no concrete mechanisms, examples, or fine-grained analysis.",
1623
+ "score 2": "Very low specificity — mostly broad labels or superficial lists; almost no detail beyond high-level descriptions.",
1624
+ "score 3": "Low specificity — a few concrete terms appear, but the survey remains mostly abstract and non-operational.",
1625
+ "score 4": "Below-average specificity — some partial detail is given, but analysis is still dominated by general summaries.",
1626
+ "score 5": "Moderate specificity — the survey includes some concrete mechanisms or examples, but many sections remain at a high level.",
1627
+ "score 6": "Fair specificity — several parts discuss implementation or structural details, though the analysis is not consistently fine-grained.",
1628
+ "score 7": "Good specificity — the survey regularly addresses concrete methods, internal mechanisms, or module-level distinctions.",
1629
+ "score 8": "Very good specificity — detailed analysis of implementation choices, workflow steps, architectural components, or code-level behavior in multiple places.",
1630
+ "score 9": "Excellent specificity — highly fine-grained discussion with precise breakdowns of mechanisms, modules, design trade-offs, and operational details.",
1631
+ "score 10": "Outstanding specificity — exceptionally granular analysis that closely examines implementation logic, code mechanisms, and detailed system behavior throughout the survey."
1632
+ }
1633
+ }
1634
+
1635
+ JUDGE_WITH_CRITERIA_PROMPT = """Here is an academic survey about the topic "{TOPIC}":
1636
+ {SURVEY}
1637
+ Please evaluate this survey about the topic "{TOPIC}" based on the criterion above provided below, and give a score from 1 to 10 according to the score description:
1638
+ ---
1639
+ Criterion Description: {Criterion_Description}
1640
+ ---
1641
+ Score 1 Description: {Score_1_Description}
1642
+ Score 2 Description: {Score_2_Description}
1643
+ Score 3 Description: {Score_3_Description}
1644
+ Score 4 Description: {Score_4_Description}
1645
+ Score 5 Description: {Score_5_Description}
1646
+ ---
1647
+ Return the score and reason without any other information.
1648
+
1649
+ The output should be in strict JSON format as below:
1650
+ **Output format:**
1651
+ {{
1652
+ "score": <score from 1 to 5>,
1653
+ "reason":"<your reasoning here>"
1654
+ }}
1655
+ """
1656
+
1657
+ JUDGE_WITH_CRITERIA_PROMPT_10_DIMENSIONS = """Here is an academic survey about the topic "{TOPIC}":
1658
+ {SURVEY}
1659
+ Please evaluate this survey about the topic "{TOPIC}" based on the criterion above provided below, and give a score from 1 to 10 according to the score description:
1660
+ ---
1661
+ Criterion Description: {Criterion_Description}
1662
+ ---
1663
+ Score 1 Description: {Score_1_Description}
1664
+ Score 2 Description: {Score_2_Description}
1665
+ Score 3 Description: {Score_3_Description}
1666
+ Score 4 Description: {Score_4_Description}
1667
+ Score 5 Description: {Score_5_Description}
1668
+ Score 6 Description: {Score_6_Description}
1669
+ Score 7 Description: {Score_7_Description}
1670
+ Score 8 Description: {Score_8_Description}
1671
+ Score 9 Description: {Score_9_Description}
1672
+ Score 10 Description: {Score_10_Description}
1673
+ ---
1674
+ Return the score and reason without any other information.
1675
+
1676
+ The output should be in strict JSON format as below:
1677
+ **Output format:**
1678
+ {{
1679
+ "score": <score from 1 to 10>,
1680
+ "reason":"<your reasoning here>"
1681
+ }}
1682
+ """
1683
+
1684
+ JUDGE_WITH_CRITERIA_PROMPT_NO_EXP = """Here is an academic survey about the topic "{TOPIC}":
1685
+ {SURVEY}
1686
+ Please evaluate this survey about the topic "{TOPIC}" based on the criterion above provided below, and give a score from 1 to 10 according to the score description:
1687
+ ---
1688
+ Criterion Description: {Criterion_Description}
1689
+ ---
1690
+ Score 1 Description: {Score_1_Description}
1691
+ Score 2 Description: {Score_2_Description}
1692
+ Score 3 Description: {Score_3_Description}
1693
+ Score 4 Description: {Score_4_Description}
1694
+ Score 5 Description: {Score_5_Description}
1695
+ ---
1696
+ Return the score without any other information.
1697
+ """
1698
+
1699
+ JUDGE_WITH_CRITERIA_PROMPT_10_DIMENSIONS_NO_EXP = """Here is an academic survey about the topic "{TOPIC}":
1700
+ {SURVEY}
1701
+ Please evaluate this survey about the topic "{TOPIC}" based on the criterion above provided below, and give a score from 1 to 10 according to the score description:
1702
+ ---
1703
+ Criterion Description: {Criterion_Description}
1704
+ ---
1705
+ Score 1 Description: {Score_1_Description}
1706
+ Score 2 Description: {Score_2_Description}
1707
+ Score 3 Description: {Score_3_Description}
1708
+ Score 4 Description: {Score_4_Description}
1709
+ Score 5 Description: {Score_5_Description}
1710
+ Score 6 Description: {Score_6_Description}
1711
+ Score 7 Description: {Score_7_Description}
1712
+ Score 8 Description: {Score_8_Description}
1713
+ Score 9 Description: {Score_9_Description}
1714
+ Score 10 Description: {Score_10_Description}
1715
+ ---
1716
+ Return the score without any other information.
1717
+ """
1718
+
1719
+ NLI_PROMPT = """---
1720
+ Claim:
1721
+ {CLAIM}
1722
+ ---
1723
+ Source: {SOURCE}
1724
+ Claim: {CLAIM}
1725
+ ---
1726
+ Is the Claim faithful to the Source?
1727
+ A Claim is faithful to the Source if the core part in the Claim can be supported by the Source.
1728
+ Only reply with 'Yes' or 'No':
1729
+ """