N8n AI Agent + Qdrant RAG issue

Describe the problem/error/question

I’m building a RAG-based AI Agent in n8n using Qdrant Vector Store, and I’m stuck on a confusing behavior.

  • Qdrant successfully retrieves top-k documents (I can clearly see pageContent and metadata in the Qdrant node output).

  • However, the AI Agent still responds with INSUFFICIENT_EVIDENCE, as if no documents were retrieved.

  • This happens even when the retrieved documents are clearly relevant.

What’s confusing is the execution order:

  • In most examples, the flow looks like:

    OpenAI → Qdrant → OpenAI (final answer)
    
    
  • In my workflow, it often looks like:

    OpenAI → OpenAI → Qdrant
    
    

    which makes it seem like the agent decides before properly using the tool output.

I also noticed that sometimes the embeddings output (vector numbers) flows through instead of retrieved text, and when that happens the agent always returns INSUFFICIENT_EVIDENCE.

Main question:
How are Qdrant tool results (pageContent) actually injected into the AI Agent’s context in n8n?
Is an explicit transformation step required to pass retrieved documents as evidence?

Any guidance would be appreciated.

Please share your workflow


Share the output returned by the last node

I

I would work more on the system prompt.

I understand is calling the RAG but there are no instraction on your agent about how it should use those information.

Instead of leaving it empy or default, try to put something like.

You are an expert agent on consumer devices(?).
Your goal is to answer customer question using the quadrant vector store tool you have attached.
After retrieving the related documents formulate a response to the customer.

MANDATORY STEPS:

  • ALWAYS use the RAG to retrieve answers
  • If no documents are retrieved, reformulate the RAG query an try again ONE SINGLE TIME

Of course this is an example but you can elaborate from that.

Hope this solves