APEX——自主专利级工程交流
一位自我进化的多智能体人工智能研究科学家,发现假设,进行对抗性辩论,并起草专利权利要求书——由4个自定义MCP服务器在Neo4j知识图上编排。
演示
# One command: seed concept → hypothesis → debate → patent
python orchestrator.py "graph neural networks"结果: 生成一个新的研究假设,进行对抗性辩论,使用微调的BERT模型(98%F1)进行验证,并起草专利权利要求——所有这些都在大约55秒内完成。
建筑
┌─────────────────────────────────────────────────────────────┐
│ Next.js Dashboard │
│ (live stats, hypotheses, events) │
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────────────────────┴──────────────────────────────────┐
│ Kafka Event Bus │
│ papers.ingested → hypothesis.created → hypothesis.validated │
│ → patent.drafted │
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────────────────────┴──────────────────────────────────┐
│ 4 LangGraph Agents │
│ │
│ 🔬 Harvester — scrapes arXiv, builds knowledge graph │
│ 🧠 Reasoner — finds research gaps, generates hypotheses│
│ ⚔️ Skeptic — adversarial debate + BERT scoring │
│ 💡 Inventor — novelty check → simulation → patent draft│
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────────────────────┴──────────────────────────────────┐
│ 4 Custom MCP Servers │
│ │
│ paper-mcp — search, details, concepts, neighbors │
│ graph-mcp — research gaps, hypotheses, graph stats │
│ sim-mcp — hypothesis simulation, synthetic data │
│ patent-mcp — prior art, novelty score, patent drafting │
└──────────────────────────┬──────────────────────────────────┘
│
┌──────────────────────────┴──────────────────────────────────┐
│ Data Layer │
│ │
│ Neo4j + GDS — knowledge graph (papers, authors, │
│ concepts, hypotheses, patents) │
│ Weaviate — vector search (semantic similarity) │
│ PostgreSQL — pipeline run logs │
│ Redis — caching layer │
└─────────────────────────────────────────────────────────────┘技术栈
| 层 | 技术 |
|---|---|
| 代理框架 | LangGraph+Claude API |
| MCP服务器 | 4个自定义服务器(13个工具) |
| 知识图谱 | Neo4j+图形数据科学 |
| 矢量搜索 | 编织+全MiniLM-L6-v2 |
| ML模型 | 假设有效性BERT(98%F1)-- 拥抱脸 |
| 事件流 | Apache Kafka |
| 前端 | Next.js+顺风CSS |
| 数据库 | PostgreSQL+Redis |
| 基础设施 | Docker Compose(8项服务) |
| 机器学习操作 | 多语言+数字视频控制 |
知识图谱统计
- 100+纸张节点 跨20个arXiv类别
- 368作者节点 链接到论文
- 780个概念节点 提取和嵌入
- 6假设 生成和辩论
- 2项专利 自主起草
- 3984关系 连接图形
假设有效性BERT
微调BERT模型,用于评估科学假设的有效性。对20个研究领域的2600个合成示例(有效+6种缺陷类型)进行了培训。
| 度量 | 分数 |
|---|---|
| 准确度 | 98.08% |
| F1 | 0.9821 |
| 精度 | 0.9856 |
| 召回 | 0.9786 |
作为两级评分器集成到怀疑论者代理中:BERT立即(免费)处理高置信度案件,Claude对不确定的案件进行判断。将API成本降低约30%。
型号: huggingface.co/Dikshith4500/假设有效性BERT
快速开始
# Clone
git clone https://github.com/DikshithPulakanti/Apex.git
cd Apex
# Start all 8 services
docker-compose up -d
# Create virtual environment
python3.11 -m venv apex_env311
source apex_env311/bin/activate
pip install -r requirements.txt
# Run the full pipeline
python orchestrator.py "reinforcement learning"
# Start the dashboard
cd frontend && npm install && npm run dev
# Open http://localhost:3000项目结构
apex/
├── agents/
│ ├── harvester.py # arXiv scraper agent
│ ├── reasoner.py # hypothesis generation agent
│ ├── skeptic.py # adversarial debate agent (BERT + Claude)
│ └── inventor.py # patent drafting agent
├── database/
│ ├── neo4j_client.py # Neo4j graph database client
│ ├── postgres_client.py # PostgreSQL operational logger
│ ├── redis_client.py # Redis caching layer
│ ├── weaviate_client.py # Weaviate vector search client
│ ├── embedder.py # Sentence transformer embeddings
│ └── schema.py # Graph schema + agent node setup
├── events/
│ ├── kafka_manager.py # Kafka producer/consumer/topics
│ └── agent_events.py # Agent event emission helpers
├── mcp_servers/
│ ├── paper_mcp.py # Paper search + details (5 tools)
│ ├── graph_mcp.py # Research gaps + hypotheses (5 tools)
│ ├── sim_mcp.py # Simulation + synthetic data (3 tools)
│ └── patent_mcp.py # Prior art + patent drafting (3 tools)
├── training/
│ ├── generate_dataset.py # Synthetic hypothesis dataset generator
│ ├── train_bert.py # BERT fine-tuning with MLflow
│ ├── predictor.py # Inference wrapper
│ └── push_to_hub.py # HuggingFace upload
├── pipeline/
│ └── ingest.py # Full ingestion pipeline
├── scrapers/
│ ├── arxiv_scraper.py # Async arXiv paper scraper
│ └── queries.py # 20 APEX search queries
├── frontend/ # Next.js dashboard
│ ├── app/
│ │ ├── page.tsx # Main dashboard
│ │ └── api/ # Stats, hypotheses, events endpoints
│ └── lib/neo4j.ts # Neo4j driver for API routes
├── orchestrator.py # Full pipeline: seed → patent
├── docker-compose.yml # 8 services (Neo4j, Postgres, Redis,
│ # Weaviate, Kafka, Zookeeper, app)
└── README.md代理
🔬 收割机
使用async aiohttp在20个类别中删除arXiv。去重,批处理到Neo4j中,构建作者图。速率受指数回退限制。
🧠 推理者
查询Neo4j GDS以查找研究差距(具有高距离、低直接连接的概念对)。通过语义搜索从Weaviate收集上下文论文。向克劳德发送间隙+论文,以生成新颖、可测试的假设。
⚔️ 怀疑论者
三阶段对抗性辩论:克劳德提出反驳→ 克劳德提出反驳→ 两阶段得分(BERT第一,克劳德后退)。只有得分≥0.6的假设得到验证。
💡 发明者
对照现有图表检查新颖性。运行假设模拟。如果新颖性+模拟通过阈值,克劳德起草专利权利要求(标题、摘要、独立权利要求、从属权利要求)。在Neo4j中存储与源假设链接的专利节点。
许可证
麻省理工学院
