Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
Sign inSign up free
catalog / Language & NLP / spacy-llm — LLMs in spaCy NLP Pipelines
⊕PluginLanguage & NLPFree

spacy-llm — LLMs in spaCy NLP Pipelines

Integrates LLMs as spaCy pipeline components for NER, classification, lemmatisation, and relation extraction with zero/few-shot prompting.

@ai-supply
Installs14k
⟳ upstream release-v0.7.4 · updated 4mo ago
↗ Source repository
← More Language & NLPLanguage & NLP leaderboard →How we grade security →Source ↗
! Grade B · 88/100 · ReviewSecurity assessment
✓No compromise signals6capabilities surfaced1known CVE9of 20 OWASP controls clear
External endpoints declaredExternal endpoints declaredExternal endpoints declaredExternal endpoints declared
scanned 17d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

spacy-llm

spacy-llm brings large language models into spaCy's production NLP pipeline system. It provides drop-in components that use LLMs for tasks like NER, text classification, lemmatisation, and relation extraction — with support for zero-shot and few-shot prompting, Jinja2 templates, and custom task definitions.

Key Features

  • spaCy components: llm_ner, llm_textcat, llm_lemmatizer, llm_rel, llm_spancat
  • Backends: OpenAI, Anthropic, Cohere, HuggingFace, Ollama, llama.cpp, custom
  • Few-shot: add examples to your config YAML — no code changes
  • Structured output parsing: maps LLM JSON/text responses to spaCy spans
  • Prompt versioning: Jinja2 templates tracked in configs
  • Seamlessly composes with other spaCy components (tok2vec, transformers, …)

Quick Start

import spacy

# config.cfg defines the LLM-NER pipeline
nlp = spacy.load("config.cfg")

doc = nlp("Elon Musk founded SpaceX in Hawthorne, California.")
for ent in doc.ents:
    print(ent.text, ent.label_)  # "Elon Musk" PERSON, "SpaceX" ORG, …
# Create a starter config
python -m spacy init config --lang en --pipeline llm > config.cfg

Install via ai-supply

npx ai-supply add spacy-llm-nlp-pipeline-integration

Curated mirror of the open-source spacy-llm (MIT). Get it from the source.

Rating rank
#1
of 30 in Language & NLP
Install rank
#22
of 30 in Language & NLP
Security score
88/100 · B
review
Security rank
#18
of 30 in Language & NLP
Installs
14k
cat avg 145k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Language & NLP leaderboard →
! Security: Review · 8888/100 · grade Bscanned 17d ago
✓ no compromise signals7 risk-surface · 6/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

What this capability can do · med confidence (static)
⚑ filesystem⚑ network⚑ secrets
egress → explosion.ai, pypi.org, img.shields.io, spacy.io, platform.openai.com, docs.cohere.com, docs.anthropic.com, ai.google +15

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM03Supply Chainhigh
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 6 pip requirements declared · explosion-spacy-llm-99ac922/requirements.txtrisk surface
•Vulnerable dependencies — 63 known vulnerabilities in: black@22.3.0, torch@2.9.1, aiohttp@3.9.5, filelock@3.19.1, idna@3.9.0, pygments@2.9.0, setuptools@9.1.0 (CWE-1395)known CVE · -12 pts
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — dynamic code execution · explosion-spacy-llm-99ac922/spacy_llm/tests/tasks/test_rel.py (CWE-95)risk surface
⚠LLM06Excessive Agencymedium
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · explosion-spacy-llm-99ac922/.github/FUNDING.ymlrisk surface
•External endpoints declared — 11 distinct host(s) · explosion-spacy-llm-99ac922/README.mdrisk surface
•External endpoints declared — 3 distinct host(s) · explosion-spacy-llm-99ac922/migration_guide.mdrisk surface
•External endpoints declared — 2 distinct host(s) · explosion-spacy-llm-99ac922/spacy_llm/models/hf/base.pyrisk surface
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · explosion-spacy-llm-99ac922/spacy_llm/tasks/util/parsing.py (CWE-835)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM01Prompt InjectionPassed
✓LLM02Sensitive Information DisclosurePassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM07System Prompt LeakagePassed
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chainhigh
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 6 pip requirements declared · explosion-spacy-llm-99ac922/requirements.txtrisk surface
•Vulnerable dependencies — 63 known vulnerabilities in: black@22.3.0, torch@2.9.1, aiohttp@3.9.5, filelock@3.19.1, idna@3.9.0, pygments@2.9.0, setuptools@9.1.0 (CWE-1395)known CVE · -12 pts
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — dynamic code execution · explosion-spacy-llm-99ac922/spacy_llm/tests/tasks/test_rel.py (CWE-95)risk surface
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (7) · hygiene / uncategorized
•Unrecognized file type — '.gitignore' is not on the allowlist · explosion-spacy-llm-99ac922/.gitignorerisk surface
•Unrecognized file type — '.?' is not on the allowlist · explosion-spacy-llm-99ac922/LICENSErisk surface
•Unrecognized file type — '.in' is not on the allowlist · explosion-spacy-llm-99ac922/MANIFEST.inrisk surface
•Unrecognized file type — '.cfg' is not on the allowlist · explosion-spacy-llm-99ac922/setup.cfgrisk surface
•Unrecognized file type — '.jinja' is not on the allowlist · explosion-spacy-llm-99ac922/spacy_llm/tasks/templates/entity_linker.v1.jinjarisk surface
•Unrecognized file type — '.jsonl' is not on the allowlist · explosion-spacy-llm-99ac922/spacy_llm/tests/tasks/examples/entity_linker.jsonlrisk surface
•Unrecognized file type — '.jinja2' is not on the allowlist · explosion-spacy-llm-99ac922/spacy_llm/tests/tasks/legacy/templates/ner.jinja2risk surface
✔ verified source · pinned explosion-spacy-llm-99ac922
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/spacy-llm-nlp-pipeline-integration/check). Click a policy:

Consume spacy-llm — LLMs in spaCy NLP Pipelines programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/spacy-llm-nlp-pipeline-integration

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/spacy-llm-nlp-pipeline-integration/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add spacy-llm-nlp-pipeline-integration

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/spacy-llm-nlp-pipeline-integration/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "spacy-llm-nlp-pipeline-integration" })
OpenAPI spec →
vlatest
! Security: Review · 881mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

Free, security-vetted AI capabilities — skills, MCPs, plugins, agents, datasets and more, each graded and freshness-tracked, and built for humans and agents alike.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Catalog
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
  • Security
  • Scan a repo
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
Account
  • Create account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy