RAG Agent - problem with Vector Store (Pinecone)

Hey Guys,

I’m building my first RAG agent where I will be using the PDF data base from Google Drive.
Searching and downloading files from Google Drive is working
Pinecone Vector Store also is working and give input.

But chat Agent cannot embed empty or undefined text.
If you need any print screens, just let me know.

1 Like

Welcome to the n8n community @jacek-thomann

From the error and the screenshots, I wouldn’t start by suspecting Pinecone itself. The strongest signal is that some step is reaching the tool with empty text, so the model tries to generate embeddings for empty/undefined text. Pinecone may be populated correctly, but the AI Agent / Vector Store Tool could still be receiving an empty input.

Hi @jacek-thomann

The AI Agent is passing an empty or undefined query to the embedding node when it tries to search Pinecone.

Most likely cause is the chat input isn’t being passed correctly to the tool. The agent fires the tool but the query string it sends is empty.

Two things to check:

  1. The tool description: the AI Agent decides what to send to the tool based on its description. If the description is vague or missing, the agent may call it with no input.

  2. The Vector Store tool input mapping: in the “Answer questions” node, check if the query field is mapped to {{ $json.query }} or similar. If it’s blank or misconfigured, it sends empty text to the embedder.

Let me know it works :crossed_fingers:

This is the date I’m getting from PINECONE

This is what I have in mapping on Pinecone Vector Store

@jacek-thomann

the input is an emty item, that’s why you get the error, so check the FROM AI tab from your “Answer Questions“ node because that’s where the AI agent passes the query, if it’s not configured to accept input from the agent, it sends empty text.

check these docs

Good diagnosis from @houda_ben. The core issue is the AI Agent isn’t passing the query properly to your Vector Store tool. One thing I’d double-check: your “Answer questions” node FROM_AI input mapping. Even if it looks right in the UI, n8n sometimes doesn’t bind the agent’s output variable correctly. I’d also add some debug logging between the AI Agent and the Vector Store tool — use an expression node to log what the agent is actually sending. That’ll show you exactly why the query is empty. Let me know if that helps!

Hi @jacek-thomann Welcome!
First, in your data embedding workflow in the default data loader use Default data loader, your embedding flow should look like this:

Once done, in your 2nd flow when you are retrieving data, remove all the tools first, and then just directly add a PINECONE VECTOR STORE tool, no sub vector database agents, just directly connect your pinecone node as a tool. That would make it works seamlessly, also use GPT-4o and GPT-5> models.

And read this if you want:

And problem should be resolved :smile: