Problem or Motivation
LEANN supports use_grep=True in its Python API for exact text matching, but this isn't exposed in papi. For technical papers, exact string hits matter: hyperparameters ("λ=0.1"), equation references ("Eq. 7"), dataset names, specific values.
Pure vector search can miss these precise matches, reducing recall on technical queries.
Proposed Solution
Expose LEANN's grep search capability for hybrid vector + exact-match retrieval:
papi ask --backend leann --leann-grep "query"
This would fuse grep + vector results for better recall on technical queries.
Alternatives Considered
- Manual grep before querying — cumbersome, doesn't fuse with vector results
- Use higher
top_k — increases noise without targeting exact matches
Area
RAG backends (PaperQA2/LEANN)
Blockers
Blocked on upstream: LEANN's leann ask CLI does not expose --use-grep yet. Needs PR to LEANN first.
Problem or Motivation
LEANN supports
use_grep=Truein its Python API for exact text matching, but this isn't exposed in papi. For technical papers, exact string hits matter: hyperparameters ("λ=0.1"), equation references ("Eq. 7"), dataset names, specific values.Pure vector search can miss these precise matches, reducing recall on technical queries.
Proposed Solution
Expose LEANN's grep search capability for hybrid vector + exact-match retrieval:
papi ask --backend leann --leann-grep "query"This would fuse grep + vector results for better recall on technical queries.
Alternatives Considered
top_k— increases noise without targeting exact matchesArea
RAG backends (PaperQA2/LEANN)
Blockers
Blocked on upstream: LEANN's
leann askCLI does not expose--use-grepyet. Needs PR to LEANN first.