Personalized Book Recommendation
Generate curated book lists based on user-described reading preferences, enriched with real-time Douban/Goodreads ratings and one-line summaries.
Workflow
1. Collect Preferences
Parse user input to extract:
- Genres / Topics: e.g. 科幻, 哲学, behavioral psychology, 人工智能
- Reading context: casual reading, professional deep-dive, exam prep, etc.
- Constraints: language (中文/English/both), page count preference, publication year range, author preferences
- Already read (if mentioned): exclude these from results
If the request is vague (e.g. "推荐几本好书"), ask 1-2 follow-up questions to narrow scope. Do NOT over-ask — aim for ≤2 clarifying questions max.
2. Generate Candidate List
Based on extracted preferences, produce 8–12 candidate books covering:
- Core matches (5–7 books): directly aligned with stated genre/topic
- Adjacent exploration (2–3 books): tangentially related, broadening the reader's horizon
- Classic benchmark (1–2 books): widely recognized must-reads in the domain
For each book, prepare: title, author, publication year, one-line summary (≤30 chars Chinese / ≤15 words English).
3. Search Real-Time Ratings
For each candidate book, use online_search to fetch current ratings:
- Chinese books / Chinese readers: search
"{书名} {作者} 豆瓣评分"→ extract Douban rating (0-10 scale) - English books / international readers: search
"{title} {author} Goodreads rating"→ extract Goodreads rating (0-5 scale) - Cross-check: for popular books, try both sources if time allows
Search optimization:
- Batch 3–4 books per search query when possible: "{书A} {书B} {书C} 豆瓣评分"
- If a rating is not found after 2 attempts, mark as "暂无评分" and proceed
- Normalize display: show Douban as "豆瓣 X.X" and Goodreads as "GR X.XX"
4. Compose Book List
Output in conversation as a structured Markdown table:
| # | 书名 | 作者 | 豆瓣 | GR | 一句话简介 |
|---|------|------|------|----|-----------|
| 1 | 三体 | 刘慈欣 | 8.8 | 4.19 | 人类文明与三体文明的生死博弈 |
After the table, add a brief 推荐理由 paragraph (3–5 sentences) explaining why this combination suits the user's preferences.
5. Optional Export
If user requests export (e.g. "导出", "保存", "生成文档"), run scripts/export_booklist.py to generate a .docx file with formatted book list content.
Rules
- Always include one-line summaries — this is the signature feature, not optional
- Max 12 books per list; min 5 unless user explicitly asks for fewer
- Respect language preference: default to Chinese books if user writes in Chinese, English if in English, unless specified otherwise
- Never fabricate ratings. If search fails, show "暂无评分" instead of guessing
- Avoid recommending the same author more than twice in a single list unless user specifically requests
- For series (e.g. 三体三部曲), recommend the first volume with a note about the series
Resources
- references/recommendation-framework.md: Genre mapping, adjacent-exploration strategies, and classic benchmark references per domain
- scripts/export_booklist.py: Generate formatted
.docxfrom book list data