Skip to content

Conversation

@jhamon
Copy link
Collaborator

@jhamon jhamon commented Feb 1, 2026

Summary

Modernizes learn/search/semantic-search/sparse/splade/splade-quora.ipynb to use Pinecone SDK v8, bringing it in line with current SDK patterns and content style guidelines.

Problem

The SPLADE Quora notebook used the legacy pinecone-client package and contained time-sensitive language that would become outdated. Import statements were scattered across multiple cells rather than consolidated in a single location.

Solution

  • Package modernization: Replaced pinecone-client==3.1.0 with pinecone==8.0.0
  • API key handling: Added getpass fallback per standard pattern in NOTEBOOK_REVIEW_TEMPLATE.md
  • Import consolidation: Grouped all imports into a single cell with try-except block for better error handling
  • Timeless content: Removed time-sensitive phrases like "have been shown to" and updated to factual, present-tense language
  • Professional tone: Maintained collegial, factual tone without marketing language

Key Changes

  • Updated pip install command from pinecone-client[grpc]==3.1.0 to pinecone[grpc]==8.0.0
  • Consolidated imports (os, time, deepcopy, getpass, numpy, pandas, Pinecone, ServerlessSpec, load_dataset) into single cell after dependencies
  • Changed "SPLADE models have been shown to consistently outperform" to "SPLADE models consistently outperform"
  • Changed "The following guide will show you" to "This guide demonstrates"
  • Added getpass import and fallback: os.environ.get("PINECONE_API_KEY") or getpass("Enter your Pinecone API key: ")
  • Fixed typo: "a efficient" → "efficient"

Breaking Changes

None - all functionality remains the same, only package name and import organization changed.

Examples

The notebook demonstrates hybrid search with SPLADE sparse vectors using the Quora dataset. Example queries show how to adjust alpha values to weight sparse vs dense search:

  • alpha=0.0 for pure sparse search
  • alpha=0.25 or alpha=0.6 for hybrid search
  • alpha=1.0 for pure dense search

Testing

  • All linting checks pass (structure, timeless content, dependency pinning, secrets)
  • Notebook follows NOTEBOOK_REVIEW_TEMPLATE.md requirements

Audience

Developers implementing semantic search with sparse embeddings, particularly those working with SPLADE models and hybrid search approaches.


Note

Low Risk
Low risk because changes are limited to an example notebook, but the SDK upgrade could break runtime behavior if any v8 API expectations differ from the prior client.

Overview
Modernizes learn/search/semantic-search/sparse/splade/splade-quora.ipynb by switching dependencies from pinecone-client to pinecone[grpc]==8.0.0 and updating initialization to the v8 Pinecone client.

Improves notebook robustness and consistency by consolidating imports into a single guarded cell (with clearer missing-dependency errors), adding a getpass fallback for PINECONE_API_KEY, and making small copy edits (timeless wording, typo fixes, and minor phrasing around performance guidance).

Written by Cursor Bugbot for commit 737cc2e. This will update automatically on new commits. Configure here.

- Replace 'pinecone-client' package with 'pinecone==8.0.0'
- Add getpass fallback for API key per standard pattern
- Update markdown content to use timeless, factual language
- Consolidate imports into single cell with try-except block
- Remove time-sensitive phrases and marketing language
- Maintain professional, collegial tone throughout

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jhamon jhamon added the agent-pr label Feb 1, 2026
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants