spaCy plugin for LLM-powered NLP pipelines
Top 31.6% on sourcepulse
This package integrates Large Language Models (LLMs) into spaCy's structured NLP pipelines, enabling rapid prototyping of NLP tasks without requiring training data. It targets developers and researchers seeking to leverage LLMs for tasks like NER, text classification, and summarization, offering a flexible way to combine LLM-powered components with traditional spaCy models.
How It Works
spacy-llm provides a modular system for defining LLM tasks, including prompting and response parsing. It offers interfaces to major LLM providers (OpenAI, Cohere, Anthropic, Google, Azure) and Hugging Face hosted open-source models. The package supports LangChain integration and includes a map-reduce approach for handling prompts exceeding context window limits, allowing for efficient processing of large documents.
Quick Start & Requirements
python -m pip install spacy-llm
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
This package is experimental, and minor version updates may introduce breaking changes to the interface. While LLMs are powerful for prototyping, the README notes that traditional supervised learning models often offer better efficiency, reliability, control, and accuracy for production use cases when sufficient training data is available.
6 months ago
1 day