Help with RAG Workflow: Pinecone Search Returns Empty Result for AI Agent Tool

Hello, community!
I’m building an AI agent (RAG workflow) to answer questions about health insurance plans, but I’m stuck on a problem I can’t seem to solve.
The Goal:
My AI Agent should use a tool (BuscaRegrasHapvida) to search for information in a Pinecone index and answer the user’s questions.
The Problem:
When I ask about “carências” (grace periods), the agent replies that it couldn’t find the information. I’ve enabled “Return Intermediate Steps”, and the log shows the following:
The agent correctly chooses the right tool (BuscaRegrasHapvida).
The agent creates the correct, clean search query (carência planos Hapvida).
The tool is invoked, but it seems to return an empty result, which forces the agent to say it found nothing.
My Setup:
Indexing: I have indexed my “rules” documents into Pinecone under the default namespace. Each document has metadata, including operadora: “Hapvida”.
Tool BuscaRegrasHapvida: This tool is configured to search the default namespace and use a Metadata Filter for operadora = “Hapvida”.
What I’ve already tried:
Verifying that the data exists in Pinecone (it does).
Simplifying the architecture and prompts multiple times.
Adjusting metadata filters.
I believe the issue is in the configuration of the Pinecone Vector Store node inside my tool, which is failing to execute the search correctly, even with the right query.

Hi @Isnar_Chagas !

First it might be easier to diagnose the problem with some more details about your workflow. Can you select it (Ctrl/Cmd+A) and copy paste it into your reply?

Don’t forget to paste it into a code block (start typing 3 backticks ``` and a code block placeholder will appear) and then it will get rendered nicely here.

Have you tried what Pinecone suggests when getting started? They actually have a template workflow and makes use of a remote MCP server.

You can easily get started with a working pinecone agent by just starting a new n8n workflow and pasting this url into the canvas.

https://raw.githubusercontent.com/pinecone-io/n8n-templates/refs/heads/main/quickstart/assistant-quickstart.json

1 Like