Bug
skills/sn-search-academic/scripts/arxiv_search.py build_search_query() builds arXiv queries like all:{query} without quoting multi-word strings, so spaces get treated as separate terms.
parts = [f"{field}:{query}"] # query not quoted
Why this breaks
For a phrase like:
python arxiv_search.py "attention is all you need"
it currently generates:
all:attention is all you need
arXiv parses that as multiple terms, not a single phrase. The expected query is:
all:"attention is all you need"
Author field has the same problem: au:ho jonathan should be au:"ho jonathan".
Repro
>>> build_search_query("attention is all you need")
'all:attention is all you need'
# should be:
'all:"attention is all you need"'
Maybe Fix?
def _quote_if_multiword(term: str) -> str:
return f'"{term}"' if " " in term else term
parts = [f"{field}:{_quote_if_multiword(query)}"]
author_terms = [
f"au:{_quote_if_multiword(a.strip())}"
for a in author.split(",") if a.strip()
]
Bug
skills/sn-search-academic/scripts/arxiv_search.pybuild_search_query()builds arXiv queries likeall:{query}without quoting multi-word strings, so spaces get treated as separate terms.Why this breaks
For a phrase like:
it currently generates:
all:attention is all you needarXiv parses that as multiple terms, not a single phrase. The expected query is:
all:"attention is all you need"Author field has the same problem:
au:ho jonathanshould beau:"ho jonathan".Repro
Maybe Fix?