papi-ask

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Query Papers via RAG

通过RAG查询论文

Use
papi ask
for questions requiring synthesis across papers or cited answers.
对于需要跨论文综合分析或带引用的回答的问题,请使用
papi ask
命令。

Cost-Aware Retrieval

成本可控的检索

Before using RAG, consider cheaper alternatives:
  1. Exact match:
    papi search --rg "query"
    — fast, no LLM
  2. Ranked search:
    papi search "query"
    — BM25 ranking
  3. Direct read:
    papi show <paper> -l eq|tex|summary
    — if you know the paper
Use
papi ask
only when:
  • User explicitly requests RAG/synthesis
  • Question spans multiple papers
  • Search/show cannot answer
在使用RAG之前,请考虑更经济的替代方案:
  1. 精确匹配
    papi search --rg "query"
    — 速度快,无需LLM
  2. 排序搜索
    papi search "query"
    — 基于BM25排序
  3. 直接读取
    papi show <paper> -l eq|tex|summary
    — 当你明确目标论文时使用
仅在以下情况使用
papi ask
  • 用户明确要求使用RAG/综合分析
  • 问题涉及多篇论文
  • 搜索/直接读取无法回答问题

Commands

命令

bash
undefined
bash
undefined

PaperQA2 (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
undefined
papi ask "question" --format evidence-blocks
undefined

MCP Tools (if available)

MCP工具(若可用)

For quick retrieval without full RAG:
  • leann_search(index_name, query, top_k)
    — fast semantic search
  • retrieve_chunks(query, index_name, k)
    — PaperQA2 chunks with citations
Check available indexes:
leann_list()
or
list_pqa_indexes()
无需完整RAG的快速检索方式:
  • leann_search(index_name, query, top_k)
    — 快速语义搜索
  • retrieve_chunks(query, index_name, k)
    — 带引用的PaperQA2文本块
查看可用索引:
leann_list()
list_pqa_indexes()

Output

输出

RAG answers include:
  • Synthesized response
  • Citations with page/section references
  • Confidence indicators
For general CLI commands, see
/papi
.
RAG回答包含:
  • 综合分析后的回复
  • 带页码/章节引用的参考文献
  • 置信度标识
如需了解通用CLI命令,请查看
/papi