$npx -y skills add pinecone-io/gemini-cli-extension --skill quickstartInteractive Pinecone quickstart for new developers. Choose between two paths - Database (create an integrated index, upsert data, and query using Pinecone MCP + Python) or Assistant (create a Pinecone Assistant for document Q&A). Use when a user wants to get started with Pinecone
| 1 | # Pinecone Quickstart |
| 2 | |
| 3 | Welcome! This skill walks you through your first Pinecone experience using the tools available to you. In this quickstart, |
| 4 | you will learn how to do a simple form of semantic search over some example data. |
| 5 | |
| 6 | ## Prerequisites |
| 7 | |
| 8 | Before starting either path, verify the API key works by calling `list-indexes` via the Pinecone MCP. If it succeeds, proceed. If it fails, ask the user to set their key: |
| 9 | |
| 10 | - Terminal: `export PINECONE_API_KEY="your-key"` |
| 11 | - Or create a `.env` file in the project root: `PINECONE_API_KEY=your-key` |
| 12 | |
| 13 | Then retry `list-indexes` to confirm. |
| 14 | |
| 15 | ## Step 0: Choose Your Path |
| 16 | |
| 17 | Ask the user which path they want: |
| 18 | |
| 19 | - **Database** – Build a vector search index. Best for developers who want to store and search embeddings. Uses the Pinecone MCP + a Python upsert script. |
| 20 | - **Assistant** – Build a document Q&A assistant. Best for users who want to upload files and ask questions with cited answers. No code required. |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | ## Path A: Database Quickstart |
| 25 | |
| 26 | For each step, explain to the user what will happen. An overview is here: |
| 27 | |
| 28 | 1. Check if MCP is set |
| 29 | 2. Create an integrated index with MCP |
| 30 | 3. Upsert sample data using the bundled script (9 sentences across productivity, health, and nature themes) |
| 31 | 4. Run a semantic search query and explore further queries |
| 32 | 5. Optionally try reranking |
| 33 | 6. Offer the complete standalone script |
| 34 | |
| 35 | ### Step 1 – Verify MCP is Available |
| 36 | |
| 37 | The prerequisite check already called `list-indexes`. If it succeeded, the MCP is working — proceed to Step 2. |
| 38 | |
| 39 | If it failed because MCP tools were unavailable (not an auth error): |
| 40 | - Tell the user the MCP server needs to be configured |
| 41 | - Point them to: https://docs.pinecone.io/reference/tools/mcp |
| 42 | |
| 43 | ### Step 2 – Create an Integrated Index |
| 44 | |
| 45 | Use the MCP `create-index-for-model` tool to create a serverless index with integrated embeddings: |
| 46 | |
| 47 | ``` |
| 48 | name: quickstart-skills |
| 49 | cloud: aws |
| 50 | region: us-east-1 |
| 51 | embed: |
| 52 | model: llama-text-embed-v2 |
| 53 | fieldMap: |
| 54 | text: chunk_text |
| 55 | ``` |
| 56 | |
| 57 | **Explain to the user what's happening:** |
| 58 | - An *integrated index* uses a built-in Pinecone embedding model (`llama-text-embed-v2`) |
| 59 | - This means you send plain text and Pinecone handles the embedding automatically |
| 60 | - The `field_map` tells Pinecone which field in your records contains the text to embed |
| 61 | |
| 62 | Wait for the index to become ready before proceeding. Waiting a few seconds is sufficient. |
| 63 | |
| 64 | ### Step 3 – Upsert Sample Data |
| 65 | |
| 66 | Run the bundled upsert script to seed the index with sample records. |
| 67 | |
| 68 | If `PINECONE_API_KEY` is set in the environment: |
| 69 | ```bash |
| 70 | uv run scripts/upsert.py --index quickstart-skills |
| 71 | ``` |
| 72 | |
| 73 | If using a `.env` file: |
| 74 | ```bash |
| 75 | uv run --env-file .env scripts/upsert.py --index quickstart-skills |
| 76 | ``` |
| 77 | |
| 78 | **Explain to the user what's happening:** |
| 79 | - The script uploads 9 sample records across three themes: **productivity** (getting work done), **health** (feeling unwell), and **nature** (outdoors/wildlife) |
| 80 | - The dataset is intentionally varied so semantic search can show its value — the queries below use completely different words than the records, but the right ones still surface |
| 81 | - Each record has an `_id`, a `chunk_text` field (the text that gets embedded), and a `category` field |
| 82 | - This is the same structure you'd use for your own data — just replace the records |
| 83 | |
| 84 | ### Step 4 – Query with the MCP |
| 85 | |
| 86 | Use the MCP `search-records` tool to run the first semantic search: |
| 87 | |
| 88 | ``` |
| 89 | index: quickstart-skills |
| 90 | namespace: example-namespace |
| 91 | query: |
| 92 | topK: 3 |
| 93 | inputs: |
| 94 | text: "getting things done efficiently" |
| 95 | ``` |
| 96 | |
| 97 | Display the results in a clean table: ID, score, and `chunk_text`. |
| 98 | |
| 99 | **Explain to the user what's happening:** |
| 100 | - Notice the query shares no keywords with the records — but it surfaces the productivity sentences |
| 101 | - That's semantic search: it finds meaning, not just matching words |
| 102 | - You sent plain text — Pinecone embedded the query using the same model as the index |
| 103 | |
| 104 | **Offer to explore further:** Ask the user if they'd like to try another query to see the effect more clearly: |
| 105 | - Option A: `"feeling under the weather"` — should surface the health records |
| 106 | - Option B: `"wildlife spotting outside"` — should surface the nature records |
| 107 | - Option C: No thanks, move on |
| 108 | |
| 109 | Run whichever query they choose and display the results the same way. If they want to try both, do both. After each result, point out which theme surfaced and why. |
| 110 | |
| 111 | If they decline or are done exploring, proceed to Step 5 or offer to skip ahead to the complete script. |
| 112 | |
| 113 | ### Step 5 – Try Reranking (Optional) |
| 114 | |
| 115 | Ask the user if they want to try reranking. |
| 116 | |
| 117 | If yes, use `search-records` again with reranking enabled: |
| 118 | |
| 119 | ``` |
| 120 | rerank: |
| 121 | model: bge-reranker-v2-m3 |
| 122 | rankFields |