papi-ask
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuery Papers via RAG
通过RAG查询论文
Use for questions requiring synthesis across papers or cited answers.
papi ask对于需要跨论文综合分析或带引用的回答的问题,请使用命令。
papi askCost-Aware Retrieval
成本可控的检索
Before using RAG, consider cheaper alternatives:
- Exact match: — fast, no LLM
papi search --rg "query" - Ranked search: — BM25 ranking
papi search "query" - Direct read: — if you know the paper
papi show <paper> -l eq|tex|summary
Use only when:
papi ask- User explicitly requests RAG/synthesis
- Question spans multiple papers
- Search/show cannot answer
在使用RAG之前,请考虑更经济的替代方案:
- 精确匹配:— 速度快,无需LLM
papi search --rg "query" - 排序搜索:— 基于BM25排序
papi search "query" - 直接读取:— 当你明确目标论文时使用
papi show <paper> -l eq|tex|summary
仅在以下情况使用:
papi ask- 用户明确要求使用RAG/综合分析
- 问题涉及多篇论文
- 搜索/直接读取无法回答问题
Commands
命令
bash
undefinedbash
undefinedPaperQA2 (default) — full RAG with citations
PaperQA2(默认)—— 带引用的完整RAG功能
papi ask "question"
papi ask "question"
LEANN — faster semantic search + LLM
LEANN — 更快的语义搜索+LLM
papi ask "question" --backend leann
papi ask "question" --backend leann
Structured output for programmatic use
供程序调用的结构化输出
papi ask "question" --format evidence-blocks
undefinedpapi ask "question" --format evidence-blocks
undefinedMCP Tools (if available)
MCP工具(若可用)
For quick retrieval without full RAG:
- — fast semantic search
leann_search(index_name, query, top_k) - — PaperQA2 chunks with citations
retrieve_chunks(query, index_name, k)
Check available indexes: or
leann_list()list_pqa_indexes()无需完整RAG的快速检索方式:
- — 快速语义搜索
leann_search(index_name, query, top_k) - — 带引用的PaperQA2文本块
retrieve_chunks(query, index_name, k)
查看可用索引: 或
leann_list()list_pqa_indexes()Output
输出
RAG answers include:
- Synthesized response
- Citations with page/section references
- Confidence indicators
For general CLI commands, see .
/papiRAG回答包含:
- 综合分析后的回复
- 带页码/章节引用的参考文献
- 置信度标识
如需了解通用CLI命令,请查看。
/papi