No way to triage candidates before downloading: a cap keeps whatever the source lists first
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- data-engineering
Research direction
Start by reading preview.py and expand_papers() in europepmc.py, then trace how each source gathers candidates and how europepmc --pmcid accepts IDs. The acceptance criteria call for writing capped candidate JSONL without downloading full text, offline ranking with recorded scores and model names, and fetching exactly the selected papers while recording their source workspace. This spans search, ranking, and download flows, so first map those entry points and their existing tests.
Written by the indexing model from the issue text.
Description
Part of lanl/chatty#65.
Keywords become a Boolean title-and-abstract query: keywords are combined with OR, and keyword_groups with OR within a group and AND across groups ("term"[tiab] for PubMed Central). Everything that matches is a candidate, and nothing ranks the candidates:
- A cap keeps the source's first papers. With
--max-papersormax_results, the papers kept are the first ones in the source's default order. text-fetch sets no sort order for PubMed Central or Europe PMC, and sorts arXiv by submission date and ChemRxiv by creation date. A cap of 200 can keep the 200 newest matches rather than the 200 most relevant. - Expansion stops in the order it walks. Citation expansion stops at
max_expansionin the order it walks the network (expand_papers()ineuropepmc.py), not by how strongly a paper is linked to the seeds. - The dry run shows only a sample.
--dry-run --jsonreports counts and up to 10 sample papers (preview.py), so an agent can't see the candidates to choose among them.
So relevance is judged only after download and indexing, when chatty or LitKit searches the corpus.
Proposal: a candidate list between the search and the download.
- List every candidate:
--dry-run --candidates candidates.jsonlwrites every candidate, up to a stated cap such as 5,000. Each entry has its IDs (PMCID, PMID, DOI), title, abstract, year, journal, publication types and open-access status. Expansion candidates also say how many seeds cite them or are cited by them. - Rank them:
--rank-by "a paragraph describing the topic"orders candidates by how similar their title and abstract are to the description. SPECTER2, which LitKit already uses to embed papers, is built for comparing papers. Expansion candidates can also be ranked by how many seeds link to them. - Fetch the chosen ones:
--from-candidates chosen.jsonl, or--ids FILE, downloads exactly the chosen papers.europepmc --pmcidalready takes IDs given one at a time. This takes a file and works for every source.
An agent can then do what a careful person does: search broadly, read the ranked titles and abstracts, keep what is relevant, and download only that. On a large topic this also saves most of the download and conversion time. The one-command corpus builder proposed in lanl/chatty#80 would use it.
Acceptance criteria:
- A dry run can write the full candidate list, up to a stated cap, with abstracts and without downloading full text.
- Ranking works offline once the model is cached. Each candidate's score and the model that produced it are recorded.
- A fetch from a candidate file downloads exactly those papers and records in the workspace where the selection came from.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 1m
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lanl/text-fetch
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lanl/text-fetch#92 ·
Maintainers usually reply within 1 day
-
area:cli area:pdf enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lanl/text-fetch#84 ·
Maintainers usually reply within 1 day
-
area:config area:output area:sources enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
lanl/text-fetch#88 ·
Maintainers usually reply within 1 day
-
area:config area:sources enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
lanl/text-fetch#86 ·
Maintainers usually reply within 1 day
-
A date range is ignored by arXiv and by citation expansion, and text-fetch pmc has no date optionsOpenarea:expansion area:sources bug impact:wrong-output
Difficulty 4/5 3-5 days Newbie friendliness 54/100
lanl/text-fetch#85 ·
Maintainers usually reply within 1 day
Similar issues
-
[Bug]: streaming_end_of_stream_only guardrails rescan the whole stream on every chunk - blocks event loopPossibly taken A pull request linked to this issue is open or already merged. Openbug llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
arith ascend bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
tile-ai/tilelang#5173 · 2 comments · 1 reaction ·
Maintainers usually reply within 3 days
-
kind: for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
monumental-archive/.github#2284 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
TanbirRamim/open-source-radar#761 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ktwu01/benchmark-radar#1450 ·
Maintainers usually reply within 1 day