$npx -y skills add woodfishhhh/EZ_math_model --skill literature-review-agentStep 3 of the PaperOrchestra pipeline (arXiv:2604.05018). Execute the literature search strategy from outline.json — discover candidate papers via web search, verify them through Semantic Scholar (Levenshtein > 70 fuzzy title match, temporal cutoff, dedup by paperId), build a Bib
| 1 | # Literature Review Agent (Step 3) |
| 2 | |
| 3 | Faithful implementation of the Hybrid Literature Agent from PaperOrchestra |
| 4 | (Song et al., 2026, arXiv:2604.05018, §4 Step 3, App. D.3, App. F.1 p.46). |
| 5 | |
| 6 | **Cost: ~20–30 LLM calls.** This is one of the two longest steps (the other is |
| 7 | plotting). Wall-time floor is set by Semantic Scholar's 1 QPS verification |
| 8 | limit. |
| 9 | |
| 10 | ## Inputs |
| 11 | |
| 12 | - `workspace/outline.json` — specifically `intro_related_work_plan` with the |
| 13 | Introduction search directions and the 2-4 Related Work methodology |
| 14 | clusters |
| 15 | - `workspace/inputs/conference_guidelines.md` — used to derive `cutoff_date` |
| 16 | - `workspace/inputs/idea.md`, `workspace/inputs/experimental_log.md` — for |
| 17 | framing the Intro and grounding the Related Work positioning |
| 18 | |
| 19 | ## Outputs |
| 20 | |
| 21 | - `workspace/citation_pool.json` — verified Semantic Scholar metadata for |
| 22 | every paper that survived verification |
| 23 | - `workspace/refs.bib` — BibTeX file generated from the verified pool |
| 24 | - `workspace/drafts/intro_relwork.tex` — drafted Introduction and Related |
| 25 | Work sections, written into the template, with the rest of the template |
| 26 | preserved verbatim |
| 27 | |
| 28 | ## Two-phase pipeline (App. D.3) |
| 29 | |
| 30 | ``` |
| 31 | PHASE 1 — Parallel Candidate Discovery |
| 32 | For each search direction in introduction_strategy.search_directions: |
| 33 | For each limitation_search_query in each related_work cluster: |
| 34 | - Use the host's web search tool to discover up to ~10 candidate papers. |
| 35 | - Run up to 10 discovery queries in parallel (host-permitting). |
| 36 | - Collect (title, snippet, url) tuples — no verification yet. |
| 37 | → PRE-DEDUP before Phase 2 (see Step 1.5 below) |
| 38 | |
| 39 | PHASE 2 — Sequential Citation Verification (1 QPS, with cache) |
| 40 | For each candidate (after pre-dedup), sequentially: |
| 41 | 0. Check s2_cache.json first (scripts/s2_cache.py --check). |
| 42 | If HIT: use cached response, skip live S2 call. No throttle needed. |
| 43 | If MISS: proceed with live request below. |
| 44 | 1. Query Semantic Scholar by title: |
| 45 | GET https://api.semanticscholar.org/graph/v1/paper/search?query=<title> |
| 46 | &fields=title,abstract,year,authors,venue,externalIds&limit=5 |
| 47 | (Public endpoint, no key. Throttle to 1 QPS for live requests only.) |
| 48 | 2. Store the S2 response in cache: s2_cache.py --store. |
| 49 | 3. Pick the top hit. Check Levenshtein title ratio against the original |
| 50 | candidate title. If ratio < 70: discard. |
| 51 | 4. Bonus: if year and venue exactly align with hints, add a +5 point |
| 52 | match-quality bonus. |
| 53 | 5. Require: abstract is non-empty. |
| 54 | 6. Require: paper.year (or month if known) strictly predates cutoff_date. |
| 55 | Months default to day-1: e.g., "October 2024" → 2024-10-01. |
| 56 | 7. If all checks pass, add to verified pool. |
| 57 | After all candidates are verified, dedup by Semantic Scholar paperId. |
| 58 | ``` |
| 59 | |
| 60 | The host agent does the LLM/web work; the deterministic helpers in `scripts/` |
| 61 | do the math. |
| 62 | |
| 63 | ## Step-by-step |
| 64 | |
| 65 | ### 0. Derive `cutoff_date` |
| 66 | |
| 67 | Parse `conference_guidelines.md` for the submission deadline. The paper aligns |
| 68 | research cutoff with venue submission deadline (App. D.1): |
| 69 | |
| 70 | | Venue | Cutoff | |
| 71 | |---|---| |
| 72 | | CVPR 2025 | Nov 2024 | |
| 73 | | ICLR 2025 | Oct 2024 | |
| 74 | | Other | One month before the stated submission deadline | |
| 75 | |
| 76 | Encode as `YYYY-MM-DD`. Months default to day-1 (e.g., `2024-10-01`). |
| 77 | |
| 78 | ### 1. Phase 1: Parallel Candidate Discovery |
| 79 | |
| 80 | From `outline.json`: |
| 81 | |
| 82 | - All `introduction_strategy.search_directions` (3-5 queries) |
| 83 | - For each cluster in `related_work_strategy.subsections`: |
| 84 | - The cluster's `sota_investigation_mission` becomes a search query |
| 85 | - All `limitation_search_queries` (1-3 each) |
| 86 | |
| 87 | For each query, **use your host's web search tool** (e.g., `WebSearch` in |
| 88 | Claude Code, `@web` in Cursor, the search tool in Antigravity). Collect the |
| 89 | top ~10 candidates per query: title, abstract snippet, source URL. |
| 90 | |
| 91 | If your host supports parallel sub-tasks, fire up to 10 concurrent search |
| 92 | queries. If not, run sequentially — slower but functionally equivalent. |
| 93 | |
| 94 | #### Optional: Exa as a Phase 1 backend |
| 95 | |
| 96 | If your host has no native web search, OR you want a research-paper-focused |
| 97 | backend with better signal-to-noise, you can use [Exa](https://exa.ai) via |
| 98 | the bundled `scripts/exa_search.py` helper. It is **opt-in** and reads |
| 99 | `EXA_API_KEY` from the environment — the repo never commits a key. |
| 100 | |
| 101 | ```bash |
| 102 | export EXA_API_KEY="your-key-here" # get one at https://dashboard.exa.ai/ |
| 103 | python skills/literature-review-agent/s |