TopicPilot is an AI-powered research topic selection assistant that helps researchers discover promising research directions through systematic literature analysis.
- 6-Phase Research Workflow: Intent parsing → Literature landscape → Gap identification → Candidate generation → Convergence → Report
- Multi-Strategy Gap Discovery: 5 strategies including explicit, implicit, trend-based, discussion RAG, and citation graph structural holes
- Adversarial Validation: Agent loops that challenge and verify discovered gaps
- Evidence Self-Healing: Automatically finds replacement citations for invalid references
- Citation Graph Analysis: Betweenness centrality and co-citation gap detection (zero LLM calls)
- Multi-LLM Support: DeepSeek (default), OpenAI, Anthropic
- Export: PDF, PPTX, XLSX, Markdown report generation
- Demo & Live Modes: Try with built-in demo data or connect to real APIs
- Frontend: Next.js 16, React 19, Zustand, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM, PostgreSQL
- AI: DeepSeek / OpenAI / Anthropic APIs
- Data Sources: Semantic Scholar, arXiv, OpenAlex
- ML: SPECTER2 embeddings, k-Means clustering, UMAP projection
- Node.js 20+
- Docker Desktop (for PostgreSQL)
- An LLM API key (DeepSeek recommended)
git clone https://github.com/BuddhaYi/topic-pilot.git
cd topic-pilot
npm install
cp .env.example .env
# Edit .env and add your LLM_API_KEYmake startThis will:
- Start PostgreSQL in Docker
- Sync database schema (Prisma)
- Launch the dev server at http://localhost:3000
make db # Start PostgreSQL only
make db-stop # Stop PostgreSQL
make migrate # Sync Prisma schema
make stop # Kill dev server| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL |
Yes | (see .env.example) | PostgreSQL connection string |
LLM_PROVIDER |
No | deepseek |
LLM provider: deepseek, openai, anthropic |
LLM_API_KEY |
Yes | - | API key for the LLM provider |
LLM_BASE_URL |
No | auto | Override API base URL |
LLM_MODEL |
No | auto | Override model name |
SEMANTIC_SCHOLAR_API_KEY |
No | - | Increases S2 API rate limit |
LOG_LEVEL |
No | info |
Logging level |
src/
├── app/
│ ├── api/ # 27 API routes (analyze, papers, report, sessions, eval)
│ └── page.tsx # 3-column layout: KnowledgeBase | Session | Studio
├── components/
│ ├── phases/ # 12 phase components (Phase1 → Phase6)
│ ├── layout/ # ResearchSession, KnowledgeBase, Studio
│ ├── chat/ # Chat interface
│ └── shared/ # Reusable UI components
├── lib/ # 45 utility modules (LLM, prompts, citation graph, etc.)
├── store/ # Zustand state management
└── types/ # TypeScript type definitions