{% extends "base.html" %} {% block title %}审核智能体{% endblock %} {% block page_class %}chat-page{% endblock %} {% block content %}

对话区与节点导航

像聊天一样提问,Agent 会结合知识库和所选文档回答。

{% if node_results %}
{% for node in node_results %} {{ node.label }} / {{ node.status }} {% endfor %}
{% endif %}
{% if conversation %}
RA
审核智能体 当前会话已就绪。可以询问资料目录、法规依据、字段抽取、一致性问题或风险整改建议。
{% else %}
RA
审核智能体 可以先不上传资料,直接询问注册法规、资料清单、模板字段或历史知识库内容。
{% endif %} {% if form.message.value %}
用户问题 {{ form.message.value|linebreaksbr }}
{% endif %} {% if result %}
RA
Agent 回答 {{ result.answer|linebreaksbr }}
{% else %}
{% for item in prompt_templates %} {{ item }} {% endfor %}
{% endif %}
{% csrf_token %}
{{ form.message.label_tag }} {{ form.message }} {% if form.message.errors %}

{{ form.message.errors|join:" " }}

{% endif %}
{{ form.document_ids.label_tag }}
{% for checkbox in form.document_ids %} {% empty %}
未选择文档时,Agent 会按问题检索当前知识库。
{% endfor %}
默认检索知识库;聚焦输入框可选择文档范围。

节点式结果

{% if analysis_card or export_card or risk_card or notify_card %}
{% if analysis_card %}
{{ analysis_card.title }} {% if analysis_card.summary %}
{{ analysis_card.summary }}
{% endif %}

摘要指标

{% for item in analysis_card.stats %} {{ item.label }}:{{ item.value }} {% endfor %}

节点结果明细

    {% if analysis_card.kind == "overview" %} {% for item in analysis_card.items %}
  • {{ item.chapter_code }} / {{ item.document_count }} 份
  • {% empty %}
  • 当前无目录汇总结果。
  • {% endfor %} {% elif analysis_card.kind == "completeness" %} {% for item in analysis_card.items %}
  • {{ item.document_name|default:"必交项" }}
    章节点:{{ item.chapter_code|default:"-" }}
    {{ item.reason|default:"当前资料包未提供该资料。" }}
  • {% empty %}
  • 当前无缺失项。
  • {% endfor %} {% elif analysis_card.kind == "consistency" %} {% for item in analysis_card.items %}
  • {{ item.field_name|default:"冲突字段" }}
    {{ item.issue|default:item }}
  • {% empty %}
  • 当前无一致性冲突。
  • {% endfor %} {% elif analysis_card.kind == "field_extraction" %} {% for item in analysis_card.items %}
  • {{ item.field_name|default:"抽取字段" }}
    {{ item.field_value|default:"-" }}
    {% if item.source_document %}
    来源:{{ item.source_document }}
    {% endif %}
  • {% empty %}
  • 当前无抽取字段。
  • {% endfor %} {% else %} {% for item in analysis_card.items %}
  • {{ item }}
  • {% empty %}
  • 当前无明细结果。
  • {% endfor %} {% endif %}

提示与异常

    {% for item in analysis_card.warnings %}
  • {% if analysis_card.kind == "field_extraction" %} {{ item.field_name|default:"低置信度字段" }}
    {{ item.field_value|default:"-" }}
    {% if item.source_document %}
    来源:{{ item.source_document }}
    {% endif %} {% elif analysis_card.kind == "completeness" %} {{ item.document_name|default:"错放项" }}
    目标章节点:{{ item.chapter_code|default:"-" }}
    当前归类:{{ item.current_location|default:"未识别" }}
    {% else %} {{ item }} {% endif %}
  • {% empty %}
  • 当前无额外提示。
  • {% endfor %}
{% endif %} {% if risk_card %}
风险预警能力卡
总风险等级:{{ risk_card.highest_risk_level|default:"-" }}
是否通过:{{ risk_card.pass_status|default:"-" }}
{% if risk_card.summary %}
{{ risk_card.summary }}
{% endif %}

待复核与风险项

    {% for item in risk_card.manual_review_items %}
  • {{ item }}
  • {% empty %} {% for item in risk_card.risk_items %}
  • {{ item.title|default:item.issue }}
    {{ item.risk_level|default:"-" }}
  • {% empty %}
  • 当前无待复核项。
  • {% endfor %} {% endfor %}

责任角色

{% for item in risk_card.owner_roles %} {% empty %} {% endfor %}
owner_role owner_name department chapter_scope risk_scope feishu_user_id feishu_open_id feishu_name notify_enabled
{{ item.owner_role }} {{ item.owner_name }} {{ item.department }} {{ item.chapter_scope }} {{ item.risk_scope }} {{ item.feishu_user_id }} {{ item.feishu_open_id }} {{ item.feishu_name }} {{ item.notify_enabled|yesno:"True,False" }}
当前无责任角色。
{% endif %}
{% if export_card %} Word 导出能力卡
模板:{{ export_card.template_name }} / {{ export_card.template_version|default:"-" }}
当前导出状态:{{ export_card.export_status|default:"-" }}
{% elif notify_card %} 飞书通知能力卡
通知原因:{{ notify_card.notify_reason|default:"-" }}
消息状态:{{ notify_card.message_status|default:"-" }}
{% endif %}
{% if export_card %}

回填字段表

{% for item in export_card.filled_fields %} {% empty %} {% endfor %}
占位符 字段名 字段值 来源 回填状态 是否必填
{{ item.placeholder }} {{ item.field_name }} {{ item.field_value }} {{ item.source }} {{ item.fill_status }} {{ item.required|yesno:"是,否" }}
当前暂无回填字段。
{% endif %} {% if export_card %}

拦截项区

    {% for item in export_card.blocked_fields %}
  • {{ item.field_name }}
    拦截原因:{{ item.block_reason }}
    来源:{{ item.risk_source }}
  • {% empty %}
  • 当前无拦截项。
  • {% endfor %}
{% endif %} {% if notify_card %}

飞书通知能力卡

  • 通知原因
    {{ notify_card.notify_reason|default:"-" }}
  • 消息状态
    {{ notify_card.message_status|default:"-" }}
  • 被 @ 处理人
    {{ notify_card.mentioned_users|join:" / "|default:"-" }}
  • Web 详情链接
    {{ notify_card.web_detail_url|default:"-" }}
{% endif %}
{% if export_card %} 维护 Word 模板 维护字段映射 查看导出记录 {% endif %} {% if risk_card %} 查看责任人映射 {% endif %} {% if notify_card %} 查看飞书配置 {% endif %}
{% elif result and result.structured_output %} {% for key, value in result.structured_output.items %} {% endfor %}
{{ key }}
{{ value }}
{% else %}
执行任务后,这里会展示结构化节点结果。
{% endif %}
{% endblock %}