Files
PlantAI-rag/prompts/extraction_prompt_v2.md
2026-07-10 17:59:59 +08:00

18 KiB
Executable File
Raw Permalink Blame History

基因家族分析论文结构化提取提示词 v2.0

版本: v2.0 日期: 2026-03-18 用途: 参考 PlantConnectome 方法优化 70+ 维度结构化信息提取 改进: 添加实体类型标注、关系标准化、Few-shot 示例


系统提示

You are a specialized bioinformatics paper information extraction expert.
Your task is to extract complete structured information from gene family analysis papers.

## STRICT GUIDELINES (参考 PlantConnectome 提取规则):

1. **Entity Type Annotation**: ALWAYS annotate entity types using [type] format
   - Example: "FtSPL1 [gene]", "flower development [phenotype]"

2. **Relationship Directionality**: Use [source_type] relationship [target_type] format
   - Example: "[gene] represses [gene]", "[treatment] upregulates [gene]"

3. **Exact Phrase Matching**: Treat each entity as a complete phrase
   - Include all biological terms and qualifiers
   - Ignore minor differences (spacing, punctuation, case)

4. **Strict Separation**: Entities with different key terms MUST be separate
   - "drought stress" vs "salt stress" are different
   - "early stage" vs "late stage" are different

5. **Preserve Original Data**: Do not introduce new items or omit entities

6. **Output Format**: Return results in valid JSON format only

7. **Maintain 100% Precision**: When in doubt, use separate entries

8. **Choose Representatives**: For similar entities, select the most appropriate full term

用户提示

请从以下论文中提取完整的结构化信息。

## 论文内容(部分):
{chunk_text}

## 提取要求:

### 1. 元数据提取 (Metadata)
提取论文的基本信息:
- 物种名称(中文+英文)
- 基因家族名称(英文缩写+中文)
- 期刊、年份、影响因子
- PMID、DOI
- 使用的分析阶段列表

### 2. 分析方法提取 (Analysis Methods)
提取所有分析方法及其参数:
- 标准分析阶段(11个核心阶段)
- 扩展分析(PPI、亚细胞定位、蛋白结构等)
- 多组学分析(WGCNA、甲基化、CNV等)
- 实验验证方法

### 3. 实体提取 (Entities) - PlantConnectome 格式

**实体格式要求**: `名称 [类型]`

**支持的实体类型** (参考 PlantConnectome 80+ 类型):

| 类型 | 示例 | 说明 |
|------|------|------|
| [gene] | FtSPL1 [gene] | 基因名称 |
| [protein] | FtSPL1 protein [protein] | 蛋白质 |
| [phenotype] | flower development [phenotype] | 表型/性状 |
| [treatment] | drought stress [treatment] | 处理/胁迫 |
| [metabolite] | anthocyanin [metabolite] | 代谢物 |
| [tissue] | root [tissue] | 组织/器官 |
| [process] | photosynthesis [process] | 生物学过程 |
| [pathway] | flavonoid biosynthesis [pathway] | 代谢通路 |
| [hormone] | ABA [hormone] | 激素 |
| [mirna] | miR156 [mirna] | miRNA |
| [domain] | SBP domain [domain] | 蛋白质结构域 |
| [motif] | GTAC motif [motif] | DNA基序 |
| [database] | PlantCARE [database] | 数据库 |
| [tool] | HMMER [tool] | 分析工具 |
| [species] | Fagopyrum tataricum [species] | 物种 |
| [stage] | seedling stage [stage] | 发育阶段 |
| [condition] | low temperature [condition] | 环境条件 |
| [cellular_component] | nucleus [cellular_component] | 细胞组分 |
| [molecular_function] | DNA binding [molecular_function] | 分子功能 |

**提取示例** (Few-shot):

**Example 1** - 基因家族成员:

输入: "FtSPL1, FtSPL2, and FtSPL3 were identified in tartary buckwheat." 输出: [ {"name": "FtSPL1", "display_name": "FtSPL1 [gene]", "type": "gene", "species": "Fagopyrum tataricum"}, {"name": "FtSPL2", "display_name": "FtSPL2 [gene]", "type": "gene", "species": "Fagopyrum tataricum"}, {"name": "FtSPL3", "display_name": "FtSPL3 [gene]", "type": "gene", "species": "Fagopyrum tataricum"} ]


**Example 2** - 表型:

输入: "Overexpression of FtSPL1 resulted in early flowering and increased plant height." 输出: [ {"name": "early flowering", "display_name": "early flowering [phenotype]", "type": "phenotype", "description": "开花时间提前"}, {"name": "increased plant height", "display_name": "increased plant height [phenotype]", "type": "phenotype", "description": "植株高度增加"} ]


**Example 3** - 处理条件:

输入: "Plants were subjected to drought, salt, and cold stress treatments." 输出: [ {"name": "drought stress", "display_name": "drought stress [treatment]", "type": "treatment"}, {"name": "salt stress", "display_name": "salt stress [treatment]", "type": "treatment"}, {"name": "cold stress", "display_name": "cold stress [treatment]", "type": "treatment"} ]


**Example 4** - 代谢物:

输入: "The accumulation of flavonoids and anthocyanins was significantly increased." 输出: [ {"name": "flavonoids", "display_name": "flavonoids [metabolite]", "type": "metabolite"}, {"name": "anthocyanins", "display_name": "anthocyanins [metabolite]", "type": "metabolite"} ]


**Example 5** - 组织/器官:

输入: "Expression analysis was performed in roots, stems, leaves, and flowers." 输出: [ {"name": "root", "display_name": "root [tissue]", "type": "tissue"}, {"name": "stem", "display_name": "stem [tissue]", "type": "tissue"}, {"name": "leaf", "display_name": "leaf [tissue]", "type": "tissue"}, {"name": "flower", "display_name": "flower [tissue]", "type": "tissue"} ]


### 4. 关系提取 (Relations) - PlantConnectome 格式

**关系格式要求**: `[源类型] 关系动词 [目标类型]`

**支持的关系类型** (参考 PlantConnectome 关系定义):

| 关系类型 | 格式示例 | 说明 |
|----------|----------|------|
| **调控关系** | | |
| represses | [gene] represses [gene] | 抑制 |
| activates | [gene] activates [gene] | 激活 |
| upregulates | [treatment] upregulates [gene] | 上调表达 |
| downregulates | [treatment] downregulates [gene] | 下调表达 |
| induced_by | [gene] induced_by [treatment] | 被诱导 |
| repressed_by | [gene] repressed_by [treatment] | 被抑制 |
| **表达关系** | | |
| expressed_in | [gene] expressed_in [tissue] | 在组织中表达 |
| highly_expressed_in | [gene] highly_expressed_in [tissue] | 高表达 |
| low_expressed_in | [gene] low_expressed_in [tissue] | 低表达 |
| **参与关系** | | |
| involved_in | [gene] involved_in [process] | 参与过程 |
| participates_in | [gene] participates_in [pathway] | 参与通路 |
| controls | [gene] controls [phenotype] | 控制表型 |
| regulates | [gene] regulates [process] | 调控过程 |
| **互作关系** | | |
| interacts_with | [protein] interacts_with [protein] | 蛋白质互作 |
| binds_to | [protein] binds_to [dna] | 结合DNA |
| targets | [mirna] targets [gene] | miRNA靶向 |
| **结构关系** | | |
| contains | [protein] contains [domain] | 包含结构域 |
| has_motif | [promoter] has_motif [motif] | 含有基序 |
| located_in | [gene] located_in [chromosome] | 位于染色体 |
| **处理关系** | | |
| responds_to | [gene] responds_to [treatment] | 响应处理 |
| sensitive_to | [phenotype] sensitive_to [treatment] | 对处理敏感 |
| resistant_to | [phenotype] resistant_to [treatment] | 对处理抗性 |
| **代谢关系** | | |
| produces | [gene] produces [metabolite] | 产生代谢物 |
| accumulates | [metabolite] accumulates_in [tissue] | 在组织中积累 |
| **比较关系** | | |
| orthologous_to | [gene] orthologous_to [gene] | 直系同源 |
| paralogous_to | [gene] paralogous_to [gene] | 旁系同源 |
| conserved_in | [domain] conserved_in [species] | 在物种中保守 |
| **实验关系** | | |
| validated_by | [finding] validated_by [method] | 被方法验证 |
| supported_by | [conclusion] supported_by [data] | 被数据支持 |

**提取示例** (Few-shot):

**Example 1** - 基因调控:

输入: "FtSPL1 negatively regulates FtSOC1 expression." 输出: [ {"source": "FtSPL1", "source_type": "gene", "relationship": "represses", "target": "FtSOC1", "target_type": "gene", "basis": "负调控表达"} ]


**Example 2** - 表达模式:

输入: "FtSPL genes were highly expressed in flowers and leaves but low in roots." 输出: [ {"source": "FtSPL genes", "source_type": "gene", "relationship": "highly_expressed_in", "target": "flower", "target_type": "tissue"}, {"source": "FtSPL genes", "source_type": "gene", "relationship": "highly_expressed_in", "target": "leaf", "target_type": "tissue"}, {"source": "FtSPL genes", "source_type": "gene", "relationship": "low_expressed_in", "target": "root", "target_type": "tissue"} ]


**Example 3** - 处理响应:

输入: "Drought stress significantly upregulated FtSPL1 and FtSPL2 expression." 输出: [ {"source": "drought stress", "source_type": "treatment", "relationship": "upregulates", "target": "FtSPL1", "target_type": "gene", "basis": "干旱胁迫上调表达"}, {"source": "drought stress", "source_type": "treatment", "relationship": "upregulates", "target": "FtSPL2", "target_type": "gene", "basis": "干旱胁迫上调表达"} ]


**Example 4** - 蛋白质互作:

输入: "FtSPL1 interacts with FtSPL2 and FtSPL3 in yeast two-hybrid assays." 输出: [ {"source": "FtSPL1", "source_type": "protein", "relationship": "interacts_with", "target": "FtSPL2", "target_type": "protein", "basis": "酵母双杂交验证"}, {"source": "FtSPL1", "source_type": "protein", "relationship": "interacts_with", "target": "FtSPL3", "target_type": "protein", "basis": "酵母双杂交验证"} ]


**Example 5** - 表型控制:

输入: "Overexpression of FtSPL1 resulted in early flowering phenotype." 输出: [ {"source": "FtSPL1", "source_type": "gene", "relationship": "controls", "target": "early flowering", "target_type": "phenotype", "basis": "过表达导致早花"} ]


**Example 6** - miRNA靶向:

输入: "miR156 targets FtSPL1 and FtSPL2 for cleavage." 输出: [ {"source": "miR156", "source_type": "mirna", "relationship": "targets", "target": "FtSPL1", "target_type": "gene", "basis": "miRNA切割靶基因"}, {"source": "miR156", "source_type": "mirna", "relationship": "targets", "target": "FtSPL2", "target_type": "gene", "basis": "miRNA切割靶基因"} ]


**Example 7** - 代谢通路:

输入: "FtSPL1 is involved in flavonoid biosynthesis pathway." 输出: [ {"source": "FtSPL1", "source_type": "gene", "relationship": "involved_in", "target": "flavonoid biosynthesis", "target_type": "pathway", "basis": "参与类黄酮合成通路"} ]


**Example 8** - 结构域:

输入: "All FtSPL proteins contain the conserved SBP domain." 输出: [ {"source": "FtSPL proteins", "source_type": "protein", "relationship": "contains", "target": "SBP domain", "target_type": "domain", "basis": "包含保守结构域"} ]


### 5. 完整 JSON 输出格式

```json
{
  "metadata": {
    "species": "物种名称(中文+英文)",
    "species_scientific": "拉丁学名",
    "family": "基因家族名称(如SPL)",
    "family_cn": "基因家族中文名称",
    "family_full_name": "基因家族全称(如SQUAMOSA PROMOTER BINDING PROTEIN-LIKE)",
    "journal": "期刊名",
    "year": 2024,
    "if": 5.8,
    "pmid": "12345678",
    "doi": "10.1234/example",
    "stages": ["gene_identification", "phylogeny", "expression", "functional_validation"]
  },
  
  "analysis_methods": { /* 分析方法详细参数 */ },
  
  "entities": [
    {
      "name": "FtSPL1",
      "display_name": "FtSPL1 [gene]",
      "type": "gene",
      "species": "Fagopyrum tataricum",
      "description": "苦荞SPL基因家族成员1",
      "attributes": {
        "chromosome": "Chr1",
        "location": "12345-12567",
        "strand": "+"
      }
    },
    {
      "name": "early flowering",
      "display_name": "early flowering [phenotype]",
      "type": "phenotype",
      "description": "开花时间提前的表型"
    },
    {
      "name": "drought stress",
      "display_name": "drought stress [treatment]",
      "type": "treatment",
      "description": "干旱胁迫处理"
    },
    {
      "name": "anthocyanin",
      "display_name": "anthocyanin [metabolite]",
      "type": "metabolite",
      "description": "花青素"
    },
    {
      "name": "flower",
      "display_name": "flower [tissue]",
      "type": "tissue",
      "description": "花组织"
    },
    {
      "name": "flavonoid biosynthesis",
      "display_name": "flavonoid biosynthesis [pathway]",
      "type": "pathway",
      "description": "类黄酮生物合成通路"
    },
    {
      "name": "miR156",
      "display_name": "miR156 [mirna]",
      "type": "mirna",
      "description": "microRNA156"
    },
    {
      "name": "SBP domain",
      "display_name": "SBP domain [domain]",
      "type": "domain",
      "description": "SQUAMOSA PROMOTER BINDING蛋白结构域"
    },
    {
      "name": "HMMER",
      "display_name": "HMMER [tool]",
      "type": "tool",
      "description": "隐马尔可夫模型搜索工具"
    },
    {
      "name": "PlantCARE",
      "display_name": "PlantCARE [database]",
      "type": "database",
      "description": "植物顺式作用元件数据库"
    }
  ],
  
  "relations": [
    {
      "source": "FtSPL1",
      "source_type": "gene",
      "relationship": "represses",
      "target": "FtSOC1",
      "target_type": "gene",
      "basis": "负调控表达",
      "evidence": "experimental",
      "confidence": "high"
    },
    {
      "source": "FtSPL1",
      "source_type": "gene",
      "relationship": "highly_expressed_in",
      "target": "flower",
      "target_type": "tissue",
      "basis": "RNA-seq数据",
      "evidence": "expression_data",
      "confidence": "high"
    },
    {
      "source": "drought stress",
      "source_type": "treatment",
      "relationship": "upregulates",
      "target": "FtSPL1",
      "target_type": "gene",
      "basis": "干旱胁迫上调表达",
      "evidence": "qRT-PCR",
      "confidence": "high"
    },
    {
      "source": "FtSPL1",
      "source_type": "protein",
      "relationship": "interacts_with",
      "target": "FtSPL2",
      "target_type": "protein",
      "basis": "酵母双杂交验证",
      "evidence": "Y2H",
      "confidence": "medium"
    },
    {
      "source": "FtSPL1",
      "source_type": "gene",
      "relationship": "controls",
      "target": "early flowering",
      "target_type": "phenotype",
      "basis": "过表达导致早花",
      "evidence": "transgenic",
      "confidence": "high"
    },
    {
      "source": "miR156",
      "source_type": "mirna",
      "relationship": "targets",
      "target": "FtSPL1",
      "target_type": "gene",
      "basis": "miRNA切割靶基因",
      "evidence": "5'RACE",
      "confidence": "high"
    },
    {
      "source": "FtSPL1",
      "source_type": "gene",
      "relationship": "involved_in",
      "target": "flavonoid biosynthesis",
      "target_type": "pathway",
      "basis": "参与类黄酮合成通路",
      "evidence": "metabolomics",
      "confidence": "medium"
    },
    {
      "source": "FtSPL1 protein",
      "source_type": "protein",
      "relationship": "contains",
      "target": "SBP domain",
      "target_type": "domain",
      "basis": "结构域预测",
      "evidence": "Pfam",
      "confidence": "high"
    }
  ],
  
  "key_findings": {
    "main_conclusions": ["主要结论1", "主要结论2"],
    "innovations": ["创新点1", "创新点2"],
    "mechanisms": ["调控机制1", "调控机制2"]
  }
}

重要说明

1. 实体类型标注规则

必须标注的实体类型:

  • 基因/蛋白 → [gene], [protein]
  • 表型/性状 → [phenotype]
  • 处理/胁迫 → [treatment]
  • 代谢物 → [metabolite]
  • 组织/器官 → [tissue]
  • 生物学过程 → [process], [pathway]
  • 激素 → [hormone]
  • miRNA → [mirna]
  • 结构域/基序 → [domain], [motif]
  • 数据库/工具 → [database], [tool]
  • 物种 → [species]
  • 发育阶段 → [stage]
  • 环境条件 → [condition]

2. 关系标准化规则

必须使用的关系动词:

  • 调控: represses, activates, upregulates, downregulates
  • 表达: expressed_in, highly_expressed_in, low_expressed_in
  • 参与: involved_in, participates_in, controls, regulates
  • 互作: interacts_with, binds_to, targets
  • 结构: contains, has_motif, located_in
  • 处理: responds_to, sensitive_to, resistant_to
  • 代谢: produces, accumulates_in
  • 比较: orthologous_to, paralogous_to, conserved_in
  • 实验: validated_by, supported_by

3. 质量控制规则

参考 PlantConnectome 的严格标准:

  1. 100% 精确性: 当不确定时,使用单独的条目
  2. 保持原始数据: 不添加、不删除、不修改
  3. 完整短语: 提取完整的实体名称,不要截断
  4. 类型一致性: 相同实体在不同地方使用相同类型
  5. 关系方向: 明确源和目标,不要混淆方向

4. 输出要求

  • 只输出 JSON,不要输出任何解释性文字
  • 确保 JSON 格式有效,使用双引号
  • 所有字段都必须存在,未使用的设为 null
  • 实体必须标注类型,使用 [type] 格式
  • 关系必须标准化,使用 [type] verb [type] 格式

版本对比

特性 v1.0 (原版) v2.0 (PlantConnectome优化版)
实体格式 简单名称 名称 [类型] 格式
关系格式 简单描述 [类型] 关系 [类型] 格式
实体类型 未明确 19种标准类型
关系类型 未明确 30+种标准化关系
Few-shot示例 无 13个详细示例
系统提示 简单 8条严格规则
质量控制 基础 参考 PlantConnectome 100%精确性
方向性 不明确 明确源类型和目标类型

参考来源

  • PlantConnectome: /home/xia-lab/wutx/01model/PlantConnectome_2025version
  • 提取案例: /home/xia-lab/gene-family-mas/paper/ceshi/1pian/plantconnectome_extraction_examples.md
  • 提取方法: /home/xia-lab/gene-family-mas/paper/ceshi/1pian/plantconnectome_extraction_methods.md

版本: v2.0
更新日期: 2026-03-18
优化依据: PlantConnectome 提取方法