feat: Pinecone knowledge backend (revives #238 as contract-compliant built-in) - #438
Closed
esafwan wants to merge 4 commits into
Closed
feat: Pinecone knowledge backend (revives #238 as contract-compliant built-in)#438esafwan wants to merge 4 commits into
esafwan wants to merge 4 commits into
Conversation
Built-in pinecone backend on LlamaIndexBackend via llama-index-vector-stores-pinecone (0.8.0, pinecone <8,>=7): - pinecone_backend.py: config validation (API key from advanced_config or PINECONE_API_KEY env, index-name rules, dimension, cloud/region), serverless index auto-creation with cosine metric, per-site/per-source namespace isolation plus site_name/knowledge_source metadata filters, delete_chunks via count-then-delete_nodes, clear via namespace purge, get_stats via describe_index_stats, advanced-config schema with plaintext-warning on the API key. - Registered as built-in: backend registry, Knowledge Source options and vector depends_on lists, VECTOR_KNOWLEDGE_TYPES, knowledge_source.js, indexer vector tuple, hooks.py comment, BACKEND_CONTRACT.md. - pyproject: llama-index-vector-stores-pinecone dependency. - 32 mocked unit tests (backend + registry), zvec-test style.
…dge-backend # Conflicts: # huf/ai/knowledge/backends/BACKEND_CONTRACT.md # huf/ai/knowledge/backends/__init__.py # huf/ai/knowledge/indexer.py # huf/hooks.py # huf/huf/doctype/knowledge_source/knowledge_source.js # huf/huf/doctype/knowledge_source/knowledge_source.json # huf/huf/doctype/knowledge_source/knowledge_source.py # pyproject.toml
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Pinecone knowledge backend
Adds Pinecone (serverless cloud vector DB) as a built-in knowledge backend via
llama-index-vector-stores-pinecone0.8.0 (pinecone7.x client; compatible with llama-index-core 0.14.23 + Python 3.14). Revives the closed #238 on the current contract architecture.Design
PineconeBackend(LlamaIndexBackend, KnowledgeBackend), mirroringpgvector_backend.py: HUF-side embeddings,site_name+knowledge_sourcemetadata, MetadataFilters on search and deletes.scrub(site)_scrub(source), overridable) — plus mandatory site/source metadata filters on every query/delete (same pattern as pgvector's table+filters).pinecone_api_key(plaintext warning;PINECONE_API_KEYenv fallback),pinecone_index_name(validated),pinecone_namespace,pinecone_cloud(aws/gcp/azure),pinecone_region. Index auto-created with the source's dimension + cosine metric viaServerlessSpec; dimension of existing indexes validated.delete_chunks: count via filtered fetch thendelete_nodes(filters=...);clear: namespace-scopeddelete_all;get_stats:describe_index_stats.Testing (bench
16_kbreg, Frappe 16.27, Python 3.14)ruff check/ruff formatPINECONE_API_KEY; run it with a key set to complete the live-test bar before merge.Dependencies
pyproject.toml:llama-index-vector-stores-pinecone.