Skip to content

Commit 0bf3870

Browse files
committed
Merge dev: fix review issues (stale weights, docs, config)
2 parents 09dfaf1 + 0ffec0b commit 0bf3870

4 files changed

Lines changed: 19 additions & 23 deletions

File tree

QUICKSTART.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ uv run axp prefs add-category hep-ph --priority 2
1818
uv run axp prefs add-category cs.AI --priority 1
1919
uv run axp prefs add-category quant-ph
2020

21-
# Add keywords you're interested in
22-
uv run axp prefs add-keyword "quantum" --weight 1.5
23-
uv run axp prefs add-keyword "machine learning" --weight 2.0
21+
# Add keywords you're interested in (1-5 stars)
22+
uv run axp prefs add-keyword "quantum" --weight 4
23+
uv run axp prefs add-keyword "machine learning" --weight 5
2424

2525
# View your settings
2626
uv run axp prefs
2727
```
2828

2929
> **How priority and weight affect recommendations**
3030
>
31-
> - **Category priority** (default: 1) — Priorities are normalized relative to each other. If you set hep-ph=2 and cs.AI=1, hep-ph papers receive twice the category matching bonus. The category score contributes 20% of the total recommendation score.
32-
> - **Keyword weight** (default: 1.0) — Weights are applied directly as a multiplier. A keyword with weight 2.0 contributes twice as much as one with weight 1.0 when found in a paper. The keyword score contributes 10% of the total recommendation score.
33-
> - Categories with no explicit `--priority` default to 1; keywords with no `--weight` default to 1.0.
31+
> - **Category priority** (default: 1) — Priorities are normalized relative to each other. If you set hep-ph=2 and cs.AI=1, hep-ph papers receive twice the category matching bonus.
32+
> - **Keyword weight** (default: 3, range: 1-5 stars) — Higher stars mean stronger influence. A 5-star keyword contributes more than a 1-star keyword when found in a paper.
33+
> - **Recommendation weights** — Configurable in the TUI Prefs tab. Defaults: Content 60%, Category 20%, Keyword 15%, Recency 5%.
34+
> - Categories with no explicit `--priority` default to 1; keywords with no `--weight` default to 3.
3435
3536
### Configure AI Provider (Optional)
3637

@@ -184,18 +185,19 @@ Launch the interactive terminal UI with `uv run axp tui`.
184185
2. **Search** — Search arXiv
185186
3. **Lists** — Manage reading lists
186187
4. **Notes** — Browse paper notes
187-
5. **Prefs** — Manage categories, keywords, and AI settings
188+
5. **Prefs** — Manage categories, keywords, authors, weights, and AI settings
188189

189190
**Keyboard Shortcuts**:
190-
- `Enter` — Open paper detail modal
191+
- `Enter` — Open paper detail overlay
191192
- `l` — Like paper
192193
- `d` — Dislike paper
193194
- `s` — Generate AI summary
194195
- `t` — Translate paper
195-
- `n` — Add note
196-
- `a` — Add to reading list
197-
- `r` — Refresh current tab
198-
- `?` — Show all shortcuts
196+
- `r` — Generate AI review
197+
- `b` — Bookmark paper
198+
- `f` — Fetch papers (Daily tab)
199+
- `j` — Toggle jobs panel
200+
- `a` — Add item (Prefs tab: category/keyword/author)
199201
- `q` — Quit
200202

201203
## Helpful Defaults
@@ -217,10 +219,10 @@ uv run axp show # → shows recently liked papers
217219

218220
## Recommendation Algorithm
219221

220-
Papers are scored using a weighted combination:
221-
- **Content similarity** (50%): TF-IDF cosine similarity to your liked papers
222+
Papers are scored using a weighted combination (defaults, configurable in Prefs tab):
223+
- **Content similarity** (60%): TF-IDF cosine similarity to your liked papers
222224
- **Category matching** (20%): Priority of matched categories
223-
- **Keyword matching** (10%): Weighted keyword presence
225+
- **Keyword matching** (15%): Weighted keyword presence (1-5 stars)
224226
- **Recency** (5%): Bonus for papers published in the last 30 days
225227

226228
The more papers you `like`, the better the recommendations become.

src/arxiv_explorer/cli/preferences.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def remove_category(
4646
@app.command("add-keyword")
4747
def add_keyword(
4848
keyword: str = typer.Argument(..., help="Keyword"),
49-
weight: float = typer.Option(1.0, "--weight", "-w", help="Weight"),
49+
weight: int = typer.Option(3, "--weight", "-w", help="Importance (1-5 stars)"),
5050
):
5151
"""Add a keyword interest."""
5252
service = PreferenceService()

src/arxiv_explorer/core/config.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ class Config:
1919
default_fetch_days: int = 1
2020
default_result_limit: int = 20
2121

22-
# Recommendation weights
23-
content_weight: float = 0.5
24-
category_weight: float = 0.2
25-
keyword_weight: float = 0.1
26-
recency_weight: float = 0.05
27-
2822
@classmethod
2923
def default(cls) -> "Config":
3024
"""Load default configuration."""

tests/test_recommendation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_no_category_match_gives_zero_category_score(
3737
)
3838
results = engine.score_papers([paper], None, sample_categories, [])
3939
# Score should be very small (only recency if applicable, no category)
40-
assert results[0].score < tmp_config.category_weight
40+
assert results[0].score < 0.20 # default category weight (20%)
4141

4242

4343
class TestKeywordScoring:

0 commit comments

Comments
 (0)