I’m planning to build a chat agent using Ollama, with associated data stored in a Qdrant database.
I’m currently testing the following workflow: RAG – AI Agent.
However, I’m not receiving any data or information from the Qdrant database. In the Qdrant Vector Store node, I noticed that the fields “pageContent” and “metadata” are empty, while in the Qdrant database the field is named “text”.
My question is: Is this workflow approach correct, and how can I modify the mapping?
@LTJ i wanna know, Are you using LangChain format for your Qdrant collection or a custom schema?
Did you tried, The field mapping issue occurs because n8n’s Qdrant node expects LangChain format (pageContent and metadata), but your database uses text.
Add a Function node before the Qdrant Vector Store node to map your fields:
// Map from 'text' field to LangChain expected format
return items.map(item => ({
json: {
query: item.json.query,
vectors: item.json.vectors.map(vec => ({
pageContent: vec.text || "", // Map from 'text' to 'pageContent'
metadata: vec.metadata || {} // Keep or create metadata
}))
}
}));
This converts your Qdrant data format to the structure the RAG workflow expects.