Skip to main content

Crawl OpenReview submissions and run embedding-based semantic search.

Project description

embed-papers

embed-papers crawls OpenReview submissions and runs semantic search with OpenAI embeddings.

This is a helper package for my agentic research workflow. Originally forked from gyj155/SearchPaperByEmbedding.

For Agents

CLI contract

  • stdout always prints one JSON object
  • stderr is reserved for logs/progress
  • non-zero exit codes still emit JSON on stdout

Success envelope:

{
  "ok": true,
  "schema_version": "1",
  "command": "search",
  "data": {}
}

Error envelope:

{
  "ok": false,
  "schema_version": "1",
  "command": "search",
  "error": {
    "type": "InvalidPapersFileError",
    "message": "..."
  }
}

CLI usage

Crawl

embed-papers crawl --venue-id "ICLR.cc/2026/Conference"

By default, crawl fails when zero papers are found (to catch wrong venue ids early).

If --output-file is omitted, crawl defaults to:

  • ~/.cache/embed-papers/papers/<venue-id-slug>.json

Warm cache

export OPENAI_API_KEY="<your-key>"
embed-papers warm-cache \
  --papers-file iclr2026_papers.json \
  --venue-id "ICLR.cc/2026/Conference"

--papers-file is optional if --venue-id is provided. In that case, it defaults to ~/.cache/embed-papers/papers/<venue-id-slug>.json.

If --cache-dir is omitted, embeddings default to:

  • ~/.cache/embed-papers/embeddings

Search

embed-papers search \
  --papers-file iclr2026_papers.json \
  --venue-id "ICLR.cc/2026/Conference" \
  --query "foundation models for planning" \
  --top-k 20

--papers-file is optional if --venue-id is provided. In that case, it defaults to ~/.cache/embed-papers/papers/<venue-id-slug>.json.

search uses the same default embeddings cache dir (~/.cache/embed-papers/embeddings) unless --cache-dir is provided.

For Human

Make sure you have set an OPENAI_API_KEY in your shell. In the command line, run:

embed-papers host

This launches a local Streamlit UI in your browser for interactive use.

Viewer flow:

  • enter conference abbreviation + year (auto-builds venue id)
  • choose direct query or examples upload
  • set top-k and run search
  • auto-crawl papers if missing
  • auto-build embeddings cache if missing

Cache directories used by viewer:

  • ~/.cache/embed-papers/papers
  • ~/.cache/embed-papers/embeddings

Python API

1) Crawl conference papers

from embed_papers import crawl_papers

_ = crawl_papers(
    venue_id="ICLR.cc/2026/Conference",
    output_file="iclr2026_papers.json",
)

2) Warm cache / search

from embed_papers import PaperSearcher

searcher = PaperSearcher(
    papers_file="iclr2026_papers.json",
    venue_id="ICLR.cc/2026/Conference",
    model_name="text-embedding-3-large",
)

searcher.ensure_embeddings()
results = searcher.search(query="robotics planning language model", top_k=100)
searcher.display(results, n=10, show_abstract=True, abstract_max_chars=500)
searcher.save(results, "results.json")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

embed_papers-0.4.1.tar.gz (166.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embed_papers-0.4.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file embed_papers-0.4.1.tar.gz.

File metadata

  • Download URL: embed_papers-0.4.1.tar.gz
  • Upload date:
  • Size: 166.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for embed_papers-0.4.1.tar.gz
Algorithm Hash digest
SHA256 70655ab131bebb271c925cfa915c6f79f9c3cfcc15f34afd2ac0bb3fd41c9009
MD5 3316545aef89a6cb688c4d860608d1f7
BLAKE2b-256 5d40fb8606360a188b4451f25e51f46684b28e165c315699d223174ac71a591b

See more details on using hashes here.

File details

Details for the file embed_papers-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: embed_papers-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for embed_papers-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d43b1c57a8030e7579d37569a8a64d31391ddeb0167994202aba947ad0ed57b7
MD5 d8ef1d4f75c01c0fd9c412f60c6342bf
BLAKE2b-256 a0b6442aa2543e95dd84c102e119983d45f52259b2143e2b98ac65bbf2c4d4f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page