docs(SDK-141): modernize table-qa.ipynb to Pinecone SDK v8 #537
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.
Summary
Modernize
learn/search/question-answering/table-qa.ipynbto use Pinecone SDK v8 and align with style guidelines.Changes
pinecone-client→pineconePinecone(api_key=...)andServerlessSpec(cloud="aws", region="us-east-1")pc.has_index(name=...),pc.create_index(..., spec=ServerlessSpec(...)),pc.Index(name=...)PINECONE_API_KEYor getpass fallbackresult.matches[0].idfor v8 response shapeLinear
Checklist
Note
Low Risk
Low risk: documentation-only notebook updates, mainly swapping Pinecone client/index initialization and response handling to match SDK v8 and improving key handling/cleanup.
Overview
Updates
learn/search/question-answering/table-qa.ipynbto use the Pinecone SDK v8 API: installspinecone, initializes aPineconeclient, creates a serverless index viaServerlessSpec, and uses the newpc.has_index/pc.Indexflow.Improves notebook safety and maintainability by sourcing the API key from
PINECONE_API_KEY(withgetpassfallback), updating query result access toresult.matches[0].id, refreshing explanatory prose, and adding a Cleanup cell to delete the index when finished.Written by Cursor Bugbot for commit a62ca7e. This will update automatically on new commits. Configure here.