Skip to main content
Pinecone is a fully managed vector database that enables semantic search and RAG (Retrieval-Augmented Generation) applications. The Pinecone tool allows you to query vector indexes for similar vectors using semantic similarity.
  • PINECONE_CREATE_INDEX
    • Create new serverless vector indexes
    • Configure vector dimension and distance metric
    • Select cloud provider and deployment region
    • Optional integrated inference: set an embedding model and Pinecone embeds your text
    • Wait-until-ready option for immediate use
  • PINECONE_QUERY
    • Search for similar vectors using semantic similarity
    • Dual-mode operation: Vector query OR text query with integrated inference
    • Support for top-K results retrieval
    • Metadata filtering with Pinecone filter syntax
    • Namespace isolation for data partitioning
    • Similarity threshold filtering (minScore)
    • Optional inclusion of metadata and vector values
  • PINECONE_UPSERT
    • Insert or update vectors in Pinecone index
    • Dual-mode operation: Vector upsert OR document upsert with integrated inference
    • Batch operations (up to 100 vectors/documents per request)
    • Metadata support for rich vector annotations
    • Namespace isolation for data organization

Connect with Pinecone credentials

You need a Pinecone API key to use this tool. You can obtain one from the Pinecone Console. Note: Treat API keys as sensitive information and never commit them to public repositories.

Create an index and upsert documents

Setting embeddingModel creates an index with integrated inference, so Pinecone embeds the text of each document and query for you. No dimension is needed; the model sets it.
The upsert returns the number of records written at steps.upload_docs.result.upsertedCount. The search results are at steps.search.result.matches; each match has id, score and metadata (the record’s stored fields, such as text and category).

Query an index

Example: Query with Reranking for Improved Relevance

Reranking re-scores initial results to improve relevance. This is especially useful for complex queries.
Reranking works with text queries (query). rerankRankFields is required when rerankModel is set, and every field in it must also be listed in fields. rerankTopN must not exceed topK.

Example: Search with Metadata Filtering

query only works on an index created with integrated inference. For an index without it, pass vector instead: a JSON array of numbers from the same embedding model the index was built with, with a length that matches the index dimension. Jinba Flow has no built-in embedding step, so a vector must come from an external source.

Example: Answer a Question with Retrieved Context (RAG)

Search the index with the user’s question, then pass the matches to an LLM as context.
{{steps.search.result.matches}} is inserted as JSON text, so the LLM sees each match’s metadata.text. The answer is at steps.generate_answer.result.content.

Parameters

PINECONE_CREATE_INDEX

*Provide either dimension (standard index) or embeddingModel (integrated inference).

PINECONE_QUERY

*Either vector or query must be provided, but not both.

PINECONE_UPSERT

*Either vectors or documents must be provided, but not both.

Output

PINECONE_QUERY returns the following under result (steps.<id>.result.matches, and so on). PINECONE_UPSERT returns result.upsertedCount.

Use Cases

RAG (Retrieval-Augmented Generation)

Combine Pinecone with an LLM tool such as OPENAI_INVOKE (see the RAG example above):
  1. Search Pinecone with the user’s question as a text query (integrated inference), or with a vector generated outside Jinba Flow that matches the index dimension
  2. Take the relevant documents from result.matches
  3. Pass them as context in the LLM prompt
Search documents by meaning rather than keywords:
  • Find similar articles
  • Recommend related content
  • Discover relevant information

Question Answering

Build Q&A systems with context retrieval:
  • Technical documentation search
  • Customer support knowledge base
  • Research paper discovery

Resources