Pinecone Examples

repository·main·Indexed 25 days ago

https://github.com/pinecone-io/examples

A collection of sample applications and Jupyter Notebooks for working with Pinecone vector databases. It includes production-ready examples and learning resources for implementing AI patterns such as Generative Pseudo-Labeling (GPL), BERTopic, semantic search (GIF and YouTube search), and Pinecone Assistant. The repository also provides guides for monitoring Pinecone projects using Prometheus and Grafana, as well as integrations with Ollama and LangGraph.

Tokens
30.6K
Snippets
103
Records
141
Agent score
84%

What's inside pinecone-io-examples

  1. Overview of Pinecone Examples

    main

    This repository provides a collection of sample applications and Jupyter Notebooks designed for hands-on experience with Pinecone vector databases and common AI patterns, tools, and algorithms. It is divided into two main categories:

    1. Production-ready examples: Located in ./docs, these are regularly reviewed and supported by the Pinecone engineering team.
    2. Learning and exploration examples: Located in ./learn, these are maintained by the Pinecone Developer Advocacy team and are optimized for exploring AI techniques and application patterns.
  2. Explore the GIF Search App demo

    main

    This directory contains notebooks and scripts demonstrating how to build a GIF Search application using semantic search. The demo covers data preparation, indexing, and querying workflows.

    Key components include:

    • gif-search.ipynb: A notebook demonstrating the end-to-end pipeline: data preparation, indexing vectors into Pinecone, and querying the index.
    • app.py: A Streamlit script that powers the interactive user interface for the GIF Search App.
  3. Build the YouTube Search dataset

    main

    Use the 00-data-build.ipynb notebook to replicate the data preparation process for the YouTube Search App. This notebook demonstrates how to use the Kaggle YTTTS dataset along with Beautiful Soup and other libraries to scrape and structure the data used in the application.

    https://colab.research.google.com/github/pinecone-io/examples/blob/master/search/semantic-search/yt-search/00-data-build.ipynb
  4. Implement Generative Pseudo-Labeling (GPL) workflow

    main

    The Generative Pseudo-Labeling (GPL) implementation is provided as a series of Jupyter notebooks that follow the workflow described in the Generative Pseudo-Labeling (GPL) article. The workflow consists of five distinct stages: downloading the dataset, synthetic query generation, negative mining, pseudo-labeling scoring, and bi-encoder fine-tuning.

    Each notebook can be run locally or via Google Colab.

  5. Run the Pinecone monitoring stack with Docker Compose

    main

    You can deploy the Prometheus and Grafana monitoring stack using Docker Compose.

    1. Start the services:
    docker-compose up
    1. Verify the running services and check the assigned ports for Grafana and Prometheus:
    docker-compose ps
    1. Access Grafana in your browser and navigate to the Dashboards section. The preloaded dashboard is located in a folder titled Pinecone.
  6. Run the Shields Checker script

    main

    The Shields Checker script validates Colab and nbviewer shields at the beginning of notebooks in the examples repository. It ensures links are valid and can optionally update them or raise errors if shields are missing.

    To run the script, navigate to the root directory of the examples repository and execute the command below. By default, this command runs the check across all directories, does not update links, and does not raise an error if shields are missing.

    python scripts/shields-checker.py run --path . --shield-error False --update False
  7. Explore BERTopic notebooks and walkthroughs

    main

    This directory contains Jupyter notebooks related to the BERTopic article. Specifically, Script 06 provides a complete walkthrough demonstrating how to implement BERTopic using custom components, including:

    • Custom transformers
    • UMAP (Uniform Manifold Approximation and Projection)
    • HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise)
    • Count Vectorizer