ai-scientist

构建能够自动化科学研究的 AI 智能体,通过智能体树搜索实现假设生成、实验设计、数据分析和论文撰写。适用场景包括自动化研究流程、生成与验证假设以及构建 AI 驱动的研究助手。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "ai-scientist":https://skillpi.com/zh/skills/deepskill-4570d113f3ccbdb4840007605b11014e507da0fcbc79379c2f940e969497ec1a。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

构建能够自动化科学研究的 AI 智能体,通过智能体树搜索实现假设生成、实验设计、数据分析和论文撰写。适用场景包括自动化研究流程、生成与验证假设以及构建 AI 驱动的研究助手。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: ai-scientist
description: >-
  Build AI agents that automate scientific research — hypothesis generation, experiment design,
  data analysis, and paper writing using agentic tree search. Use when: automating research
  workflows, generating and testing hypotheses, building AI-powered research assistants.
license: Apache-2.0
compatibility: "Python 3.10+"
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: research
  tags:
    - research
    - science
    - hypothesis
    - experiment
    - automation

AI Scientist

Build AI agents that automate scientific research using AI-Scientist-v2 — an agentic tree search framework for hypothesis generation, experiment design, data analysis, and paper writing.

Overview

AI Scientist explores research problems as a tree search: generate candidate hypotheses, evaluate them based on evidence and feasibility, design experiments for promising branches, and prune dead ends. It covers the full research lifecycle from literature review through paper drafting.

Instructions

Installation

pip install ai-scientist

Set up API key:

export ANTHROPIC_API_KEY="sk-ant-..."  # or OPENAI_API_KEY

Define a Research Problem

from ai_scientist import Researcher

researcher = Researcher(
    model="claude-sonnet-4-20250514",
    domain="machine-learning",
)

result = researcher.investigate(
    question="How does data augmentation affect few-shot learning performance?",
    max_depth=3,
    max_hypotheses=5,
    budget_hours=2,
)

print(result.best_hypothesis)
print(result.evidence_summary)
print(result.suggested_experiments)

Hypothesis Generation

from ai_scientist import HypothesisGenerator

generator = HypothesisGenerator(model="claude-sonnet-4-20250514")

hypotheses = generator.generate(
    context="Recent work shows transformers struggle with compositional generalization",
    num_hypotheses=5,
    constraints=[
        "Must be testable with existing benchmarks",
        "Should suggest a concrete architectural modification",
    ],
)

for h in hypotheses:
    print(f"Hypothesis: {h.statement}")
    print(f"Novelty: {h.novelty:.2f}, Feasibility: {h.feasibility:.2f}")
    print(f"Test approach: {h.test_plan}")

Experiment Design

from ai_scientist import ExperimentDesigner

designer = ExperimentDesigner(model="claude-sonnet-4-20250514")

experiment = designer.design(
    hypothesis="Adding a symbolic reasoning layer improves compositional generalization",
    resources={
        "compute": "4x A100 GPUs",
        "time": "48 hours",
        "datasets": ["COGS", "SCAN", "CFQ"],
    },
)

print(experiment.methodology)
print(experiment.variables)
print(experiment.metrics)
print(experiment.code_outline)

Result Analysis

from ai_scientist import ResultAnalyzer

analyzer = ResultAnalyzer(model="claude-sonnet-4-20250514")

analysis = analyzer.analyze(
    hypothesis="Symbolic reasoning layer improves compositional generalization",
    results_path="./experiment_results/",
    metrics=["accuracy", "generalization_gap", "training_time"],
)

print(analysis.supports_hypothesis)
print(analysis.key_findings)
print(analysis.next_steps)

Literature Review

from ai_scientist import LiteratureReviewer

reviewer = LiteratureReviewer(model="claude-sonnet-4-20250514")

review = reviewer.review(
    topic="Compositional generalization in neural networks",
    sources=["arxiv", "semantic-scholar"],
    max_papers=50,
)

print(review.summary)
print(review.research_gaps)
print(review.taxonomy)

Paper Writing

from ai_scientist import PaperWriter

writer = PaperWriter(model="claude-sonnet-4-20250514")

paper = writer.draft(
    title="Symbolic Reasoning Layers for Compositional Generalization",
    sections=["abstract", "introduction", "related-work", "method",
              "experiments", "results", "discussion", "conclusion"],
    results=analysis,
    literature=review,
    style="neurips",
)

paper.save("draft.tex")

Examples

Example 1: End-to-End Research on RAG for Code Generation

from ai_scientist import ResearchPipeline

pipeline = ResearchPipeline(
    model="claude-sonnet-4-20250514",
    output_dir="./research_output/",
)

result = pipeline.run(
    question="Can retrieval-augmented generation reduce hallucination in code generation?",
    stages=["literature-review", "hypothesis-generation", "experiment-design",
            "result-analysis", "paper-draft"],
    config={"tree_search_depth": 3, "hypotheses_per_level": 4, "auto_prune_threshold": 0.3},
)

print(f"Hypotheses explored: {result.total_hypotheses}")
print(f"Experiments designed: {result.total_experiments}")
print(f"Best finding: {result.top_finding}")
print(f"Paper draft: {result.paper_path}")

Example 2: Quick Hypothesis Screening for Few-Shot Learning

from ai_scientist import Researcher

researcher = Researcher(model="claude-sonnet-4-20250514", domain="machine-learning")

result = researcher.investigate(
    question="Does contrastive pre-training improve few-shot classification on medical images?",
    max_depth=2,
    max_hypotheses=3,
    budget_hours=1,
)

for h in result.all_hypotheses:
    print(f"{h.statement} — score: {h.score:.2f}, pruned: {h.pruned}")
print(f"Best: {result.best_hypothesis.statement}")

Guidelines

  • Start with max_depth=2 and max_hypotheses=3 to get quick results before scaling up
  • Use domain-specific constraints in hypothesis generation — unconstrained search wastes compute
  • The pruning threshold (auto_prune_threshold) controls exploration vs exploitation — lower values explore more
  • Literature review works best with semantic-scholar for ML papers and pubmed for bio/medical
  • Always review generated hypotheses and papers — the agent is a research accelerator, not a replacement
  • For reproducibility, set seed in the pipeline config
  • Tree search depth beyond 4 rarely improves results but significantly increases cost

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 自动化科学研究是前沿AI应用,解决研究人员核心痛点
  • 显著提升科研效率,覆盖完整研究生命周期
  • 具有明确的高价值使用场景和广泛受众
触发精准90/100

待提升项

  • 缺少明确的When to Use章节 原报告严重程度:轻微

    文档中缺少独立的When to Use章节,虽然frontmatter中有使用场景描述,但不够突出。

    改进建议:建议添加独立的When to Use章节,更清晰地说明适用场景和使用时机。

亮点

  • 触发词精准完整,覆盖多种变体
  • 边界清晰,包含使用场景描述
  • 描述准确反映了Skill的核心功能
结构规范85/100

待提升项

  • 缺少明确的When to Use章节 原报告严重程度:轻微

    文档结构基本完整,但缺少独立的When to Use章节。

    改进建议:建议添加独立的When to Use章节,提升文档的可用性。

亮点

  • Phase/步骤清晰,有出口条件
  • 含端到端示例,frontmatter完整
  • 文档结构良好,易于理解执行流程
执行可靠80/100

待提升项

  • 缺少对API key获取失败的异常处理 原报告严重程度:轻微

    文档中提到了设置API key,但没有说明如果API key获取失败或无效时的处理方式。

    改进建议:建议添加对API key获取失败的异常处理说明,提升执行可靠性。

亮点

  • 工具来源明确,参数正确
  • 覆盖主要异常,不可逆操作有确认机制
  • 提供了详细的安装和使用说明
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 保存或修改文件

    先确认输出目录和同名文件是否会被覆盖;重要文件保留备份,优先写入新的输出目录。

    主文档提及 · 第 161 行
  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 34 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 37 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。