papi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePaper Reference Assistant (CLI)
论文参考助手(CLI)
Entry point skill. Use CLI first; MCP RAG tools only when CLI is insufficient.
papiFor specialized workflows, invoke dedicated skills:
- — RAG queries requiring synthesis
/papi-ask - — verify code against paper
/papi-verify - — compare papers for decision
/papi-compare - — ground responses with citations
/papi-ground - — create project notes
/papi-curate
入口Skill。优先使用 CLI;仅当CLI功能不足时才使用MCP RAG工具。
papi针对特定工作流,调用专用Skill:
- —— 需要综合分析的RAG查询
/papi-ask - —— 验证代码与论文的一致性
/papi-verify - —— 对比论文以辅助决策
/papi-compare - —— 基于引用生成可靠回复
/papi-ground - —— 创建项目笔记
/papi-curate
Setup
设置
bash
papi path # DB location (default ~/.paperpipe/; override via PAPER_DB_PATH)
papi list # available papers
papi list | grep -i "keyword" # check if paper exists before searchingbash
papi path # 数据库位置(默认~/.paperpipe/;可通过PAPER_DB_PATH环境变量覆盖)
papi list # 查看可用论文
papi list | grep -i "keyword" # 搜索前先检查论文是否存在When NOT to Use MCP RAG
何时不使用MCP RAG
- Paper name known →
papi show <paper> -l summary - Exact term search →
papi search --rg "term" - Checking equations →
papi show <paper> -l eq - Only use RAG when above methods fail or semantic matching required
- 已知论文名称 →
papi show <paper> -l summary - 精确术语搜索 →
papi search --rg "term" - 查看公式 →
papi show <paper> -l eq - 仅当上述方法失效或需要语义匹配时才使用RAG
Decision Tree
决策树
| Question | Tool |
|---|---|
| "What does paper X say about Y?" | |
| "Does my code match the paper?" | |
| "Which paper mentions X?" | |
| "Compare approaches across papers" | |
| "Need citable quote with page number" | |
| "Cross-paper synthesis" | |
| 问题 | 工具 |
|---|---|
| “论文X关于Y说了什么?” | |
| “我的代码是否与论文匹配?” | |
| “哪篇论文提到了X?” | 先使用 |
| “对比多篇论文的方法” | |
| “需要带页码的可引用引文” | |
| “跨论文综合分析” | |
Search Commands
搜索命令
bash
papi search --rg "query" # literal text match (fast, no LLM) — NOT regex by default!
papi search --rg --regex "pattern" # regex patterns (add --regex explicitly)
papi search "query" # ranked BM25
papi search --hybrid "query" # ranked + exact boost
papi search "query" -p paper1,paper2 # limit search to specific papers
papi ask "question" # PaperQA2 RAG
papi ask "question" --backend leann # LEANN RAG
papi notes {name} # open/print implementation notesbash
papi search --rg "query" # 字面文本匹配(快速,无需LLM)—— 默认不是正则表达式!
papi search --rg --regex "pattern" # 正则表达式匹配(需显式添加--regex参数)
papi search "query" # BM25排序搜索
papi search --hybrid "query" # 排序+精确匹配增强
papi search "query" -p paper1,paper2 # 限制搜索特定论文
papi ask "question" # PaperQA2 RAG
papi ask "question" --backend leann # LEANN RAG
papi notes {name} # 打开/打印实现笔记Search Escalation (cheapest first)
搜索升级策略(成本从低到高)
- — exact text, fast, no LLM
papi search --rg "X" - — ranked BM25 (requires
papi search "X"first)papi index --backend search - — ranked + exact boost
papi search --hybrid "X" - — semantic search, returns file paths for follow-up
leann_search() - — formal citations (DOI, page numbers)
retrieve_chunks() - — full RAG synthesis
papi ask "..."
- —— 精确文本匹配,快速,无需LLM
papi search --rg "X" - —— BM25排序搜索(需先执行
papi search "X")papi index --backend search - —— 排序+精确匹配增强
papi search --hybrid "X" - —— 语义搜索,返回文件路径以便后续操作
leann_search() - —— 规范引文(DOI、页码)
retrieve_chunks() - —— 完整RAG综合分析
papi ask "..."
MCP Tool Selection (when papi CLI insufficient)
MCP工具选择(当papi CLI功能不足时)
| Tool | Speed | Output | Best For |
|---|---|---|---|
| Fast | Snippets + file paths | Exploration, finding which paper to dig into |
| Slower | Chunks + formal citations | Verification, citing specific claims |
| Slowest | Synthesized answer | Cross-paper questions, "what does literature say" |
- Check available indexes: or
leann_list()list_pqa_indexes() - Embedding priority: Voyage AI → Google/Gemini → OpenAI → Ollama
| 工具 | 速度 | 输出 | 最佳适用场景 |
|---|---|---|---|
| 快 | 片段+文件路径 | 探索研究,确定需深入研究的论文 |
| 较慢 | 文本块+规范引文 | 验证内容,引用特定论点 |
| 最慢 | 综合分析结果 | 跨论文问题,“文献对此有何论述” |
- 查看可用索引:或
leann_list()list_pqa_indexes() - 嵌入模型优先级:Voyage AI → Google/Gemini → OpenAI → Ollama
Adding Papers
添加论文
bash
papi add 2303.13476 # arXiv ID
papi add https://arxiv.org/abs/... # URL
papi add 2303.13476 1706.03762 "Attention Is All You Need" # multiple at once (mixed sources OK)
papi add --pdf /path/to.pdf # local PDF
papi add --pdf "https://..." # PDF from URL
papi add --from-file papers.bib # bulk importbash
papi add 2303.13476 # arXiv ID
papi add https://arxiv.org/abs/... # URL
papi add 2303.13476 1706.03762 "Attention Is All You Need" # 批量添加(支持混合来源)
papi add --pdf /path/to.pdf # 本地PDF文件
papi add --pdf "https://..." # 在线PDF文件
papi add --from-file papers.bib # 从文件批量导入Per-Paper Files
单论文文件
Located at : , , , , , .
{db}/papers/{name}/equations.mdsummary.mdsource.texnotes.mdpaper.pdffigures/If agent can't read , export to repo:
Use to include extracted figures in export.
~/.paperpipe/papi export <papers...> --level equations --to ./paper-context/--figuresSee for full command reference and per-file details.
references/commands.md存储位置为:包含、、、、、。
{db}/papers/{name}/equations.mdsummary.mdsource.texnotes.mdpaper.pdffigures/若Agent无法读取,可导出至仓库:
使用参数可在导出时包含提取的图表。
~/.paperpipe/papi export <papers...> --level equations --to ./paper-context/--figures完整命令参考及文件详情请查看。
references/commands.md