🦀 CrabScholar
Research paper analysis pipeline with citation crawling, pluggable LLM prompts, and knowledge graph building.
Features
- Multi-input: Analyze papers by title, DOI, keywords, URL, local PDF, or raw text
- Citation Crawling: BFS traversal of references/citations via Semantic Scholar API (configurable depth, default 3)
- 5 Default Analysis Dimensions (LLM Evaluation focus):
- Paper Analysis — overview, contributions, methodology
- Dataset Crafting — data creation, annotation, preprocessing
- Evaluation Method — benchmarks, baselines, evaluation setup
- Metrics — specific metrics, reported results
- Statistical Tests — significance tests, confidence intervals, rigor
- Pluggable Prompts: Add YAML files for custom dimensions, override defaults
- Knowledge Graph: NetworkX-based graph with paper/author/method/dataset/metric entities
- Multi-Provider LLM: Via LiteLLM — OpenAI, Anthropic, Ollama, vLLM, etc. with fallback chain
- Export: JSON, GraphML, GEXF, CSV
Installation
uv sync
Quick Start
# Initialize project config
uv run crab init
# Edit .env with your API key
nano .env
# Analyze a paper by title
uv run crab analyze "attention is all you need"
# Search by keywords
uv run crab analyze --keywords "LLM evaluation, benchmark contamination"
# Analyze a local PDF
uv run crab analyze --pdf paper.pdf
# Control crawl depth
uv run crab analyze "GPT-4 Technical Report" --depth 5
# Search without analyzing
uv run crab search "transformer evaluation"
# Build knowledge graph from results
uv run crab build
# Export graph
uv run crab export json
uv run crab export graphml
uv run crab export csv
# List analysis dimensions
uv run crab dimensions
# Show config
uv run crab info
Configuration
Settings load from: CLI flags > env vars (CRAB_ prefix) > .env > crab.yaml > defaults.
# crab.yaml
default_model: openai/gpt-4o-mini
fallback_models:
- openai/gpt-3.5-turbo
- anthropic/claude-3-haiku-20240307
citation_depth: 3
max_papers: 50
output: output
concurrency: 4
Custom Prompts
Create YAML files in a custom directory:
# my_prompts/bias_analysis.yaml
name: bias_analysis
display_name: "Bias Analysis"
description: "Analyze papers for bias in LLM evaluation"
system_message: "You are a bias analysis expert..."
extraction_prompt: |
Analyze the paper for potential biases...
Paper: {title}
Text: {paper_text}
...
Then use: uv run crab analyze "paper" --prompts-dir my_prompts/
Python API
from crab_scholar.pipeline import run_pipeline
from crab_scholar.config import CrabConfig
config = CrabConfig(
default_model="openai/gpt-4o-mini",
citation_depth=3,
)
kg = run_pipeline(input_query="attention is all you need", config=config)
print(f"Entities: {kg.entity_count}, Relations: {kg.relation_count}")
Architecture
Input (query/DOI/PDF/text)
↓
Scholar API → Resolve paper
↓
BFS Crawler → Expand citations/references (depth=N)
↓
Fetcher → Download PDFs, extract text
↓
Analyzer → Run pluggable dimensions (5 defaults)
↓
Graph Builder → Entities + Relations → NetworkX
↓
Export → JSON / GraphML / GEXF / CSV
License
MIT
Metadata
Release files for crab-scholar 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crab_scholar-0.2.0.tar.gz | 178.5 kB | Without provenance | Details for crab_scholar-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crab_scholar-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for crab_scholar-0.2.0-py3-none-any.whl |
Total release size: 227.6 kB
Release files / crab_scholar-0.2.0.tar.gz
| Download URL | crab_scholar-0.2.0.tar.gz |
|---|---|
| Size | 178.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78731181d0fc3dc40c4011973708354f67f22e79410c871daef8f7de9bea09c0
|
|
BLAKE2b-256 checksum How to use checksums |
4d0e92295e8c4116fdad68e63c40275ffbb8b77e9abcf8c14ef5171008ea69c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / crab_scholar-0.2.0-py3-none-any.whl
| Download URL | crab_scholar-0.2.0-py3-none-any.whl |
|---|---|
| Size | 49.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9919efd3084b24ecdae750307d97b43f59cd24d6b9fa45cbfa7a1be952759243
|
|
BLAKE2b-256 checksum How to use checksums |
b8766ff71eb39725d8427a84d01c040c050e76206c5c577e8d005ca100cd1728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for crab-scholar 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.