Files

95 lines
3.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 基于国产开源大模型的 AI Scientist 自进化科研发现引擎 (XH-202619)
> **系统名称**:基于国产开源大模型的 AI Scientist 自进化科研发现引擎
> **核心架构**:基于阿里通义千问 (Qwen) 大模型矩阵与多智能体分工协同架构,融合 1024 维 Dense Vector Hybrid RAG、Reviewer #2 对抗性审查闭环与知识图谱实体推理。
---
## 🌟 核心亮点
1. **100% 国产开源可控**:深度适配阿里云百炼平台 Qwen 大模型矩阵(`qwen3.7-max` / `qwen3.7-plus` / `qwen3.6-flash`),支持热切换。
2. **1024 维 Dense Vector Hybrid RAG**:接入通义 `text-embedding-v3` 模型,7:3 稠密-稀疏混合检索重排,严格溯源 arXiv 文献,根除幻觉。
3. **Reviewer #2 对抗审稿闭环**:5 大维度(50 分制)严苛对抗性审查,自动触发自进化纠偏循环(1-10 轮可调)。
4. **双模式交互**Streamlit 现代 Web 前端,支持"人在回路协同模式"(人机共创)与"全自动无人值守模式"。
5. **知识图谱实体与证据链路**:自动抽取文献三元组生成 NetworkX 有向图与 Mermaid 关系链路。
---
## 📁 目录结构
```text
├── .streamlit/ # Streamlit 前端配置
├── docs/ # 架构设计图与文档资产
├── frontend/
│ └── app.py # 现代化 Streamlit Web 交互界面
├── outputs/ # 生成的研究计划报告与产物
├── src/
│ ├── agent/
│ │ └── engine.py # AI Scientist 核心多智能体编排引擎
│ ├── llm/
│ │ └── client.py # 通义千问 LLM 与 Embeddings 统一适配器
│ ├── skills/
│ │ ├── literature_mining.py # 文献挖掘与实体提取
│ │ ├── hypothesis_generator.py # 科学假说自进化生成
│ │ ├── hypothesis_critic.py # Reviewer #2 对抗审查
│ │ └── plan_writer.py # 完整研究方案生成
│ ├── tools/
│ │ ├── arxiv_tool.py # arXiv 实时论文检索工具
│ │ ├── rag_tool.py # 1024维向量检索与重排工具
│ │ └── graph_tool.py # 科学知识图谱构建工具
│ └── config.py # 全局配置中心
├── requirements.txt # Python 依赖清单
├── run_paper_example.py # 命令行示例入口
├── XH-202619-AI_Scientist工程实践方案.md # 详细技术方案文档
└── README.md # 项目说明文件
```
---
## 🚀 快速开始
### 1. 环境准备与依赖安装
建议使用 Python 3.10+ 环境:
```bash
# 安装核心依赖
pip install -r requirements.txt
```
### 2. 配置环境变量
复制环境配置文件并填入 API Key:
```bash
cp .env.example .env
```
`.env` 中配置阿里云通义千问或兼容 OpenAI 规范的 API Key
```env
API_KEY=your_dashscope_or_openai_key
BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
DEFAULT_MODEL=qwen3.7-max
```
### 3. 启动应用
#### 方式一:启动 Web 交互界面(推荐)
```bash
streamlit run frontend/app.py
```
#### 方式二:运行命令行示例脚本
```bash
python run_paper_example.py
```
---
## 📄 文档与方案
详细的技术架构、多智能体协同机制及实现细节请参阅 [XH-202619-AI_Scientist工程实践方案.md](XH-202619-AI_Scientist工程实践方案.md)。