pinecone-text
Text utilities library by Pinecone.io
What it is and what it does
Pinecone Text is a utility library that bridges text data and Pinecone's vector search engine by providing encoders that convert documents and queries into sparse or dense vectors. It wraps multiple encoding strategies—BM25 for traditional sparse vectors, SPLADE for learned sparse representations, and integrations with Sentence Transformers and OpenAI's embedding models for dense vectors—allowing developers to prepare text for hybrid search without writing encoding logic themselves.
The package is designed for use with Pinecone's hybrid search, which combines sparse and dense vectors for improved retrieval. It handles tokenization, model loading, and vector formatting, but requires explicit installation of optional dependencies for SPLADE, Sentence Transformers, or OpenAI support. BM25 is available by default and can be initialized with precomputed parameters or fitted to a custom corpus; SPLADE uses a fixed HuggingFace model; dense encoders delegate to external services or local models.
Use it for:
- Prepare a corpus of documents for BM25-based sparse vector indexing in Pinecone without implementing tokenization and IDF calculation yourself.
- Encode queries and documents using SPLADE for learned sparse retrieval when BM25 alone is insufficient.
- Generate dense embeddings via OpenAI's API and store them in Pinecone for semantic search without managing API calls directly.
- Combine BM25 sparse vectors with Sentence Transformer dense vectors for hybrid search in a single pipeline.
- Load and reuse precomputed BM25 parameters (fitted on MS MARCO) to encode new documents without retraining.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides sparse and dense text encoders for converting documents and queries into vectors compatible with Pinecone's hybrid search, supporting BM25, SPLADE, Sentence Transformers, and OpenAI embeddings.
Yes, with conditions. The package is useful for developers building hybrid search on Pinecone and want to avoid writing encoding logic, but maintenance is aging (368 days since last release) and license terms are unclear. Install if you are committed to Pinecone's platform and can work within Python 3.9–3.11 (avoid 3.12 for SPLADE and Sentence Transformers). Verify the license before use in proprietary contexts. No known security vulnerabilities.
Install
pinecone-text on PyPI
pip
pip install pinecone-textuv
uv add pinecone-textpoetry
poetry add pinecone-textInstalling pinecone-text
Before you install
Low install friction with six runtime dependencies. Maintenance status is aging—last release was 368 days ago—but the package remains functional for current Python versions (3.9–3.11); note that SPLADE and Sentence Transformers encoders have known incompatibilities with Python 3.12 due to PyTorch constraints.
License in practice
License treatment is unclear; no SPDX or raw license metadata is available in the package metadata. Verify the actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install pinecone-text
from pinecone_text.sparse import BM25Encoder
corpus = ["The quick brown fox", "The lazy dog"]
bm25 = BM25Encoder()
bm25.fit(corpus)
vector = bm25.encode_documents("brown fox")
SPLADE and SentenceTransformerEncoder are incompatible with Python 3.12 due to PyTorch compatibility issues; optional extras (splade, dense, openai) require separate installation and their own dependencies.
Verify before relying
- Whether the package is still actively maintained or in maintenance-only mode given the 368-day gap since last release.
- Specific performance characteristics or throughput limits for encoding large document batches.
- Whether BM25's static document frequency model is suitable for your use case or if dynamic retraining is needed.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — mmh3, nltk, numpy, requests, types-requests, python-dotenv |
| Maintenance | aging — 368 days since the last release |
| First released | |
| Downloads | 514,004/month — #6,242 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pinecone_text-0.11.0-py3-none-any.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
langchain-pineconeConnects LangChain applications to Pinecone…
permissive · top 5,000 on PyPI
sentence-transformersComputes embeddings and reranking scores for…
permissive · top 1,000 on PyPI
model2vecModel2Vec converts sentence transformers into…
permissive · top 5,000 on PyPI
pinecone-plugin-interfaceProvides classes and utilities for building and…
permissive · top 5,000 on PyPI
llama-index-vector-stores-pineconeIntegrates Pinecone vector database with…
permissive · top 15,000 on PyPI
pinecone-plugin-inferenceProvides embedding generation through…
permissive · top 15,000 on PyPI
bm25sBM25S implements the BM25 ranking algorithm in…
permissive · top 5,000 on PyPI
floretfloret trains compact word embeddings using…
permissive · top 15,000 on PyPI
voyageaiProvides Python access to Voyage AI's embedding…
permissive · top 5,000 on PyPI
meilisearchPython client library for the Meilisearch API,…
permissive · top 5,000 on PyPI