Ask questions about a PDF using AI

Go to Workflow
118,063 views
Built by David Roberts David Roberts
Created on June 05, 2026

Description

The workflow first populates a Pinecone index with vectors from a Bitcoin whitepaper. Then, it waits for a manual chat message. When received, the chat message is turned into a vector and compared to the vectors in Pinecone. The most similar vectors are retrieved and passed to OpenAI for generating a chat response.

Note that to use this template, you need to be on n8n version 1.19.4 or later.

Nodes Used (9)

Binary Input Loader
@n8n/n8n-nodes-langchain.documentBinaryInputLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Google Drive
n8n-nodes-base.googleDrive
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Pinecone: Insert
@n8n/n8n-nodes-langchain.vectorStorePineconeInsert
Pinecone: Load
@n8n/n8n-nodes-langchain.vectorStorePineconeLoad
Question and Answer Chain
@n8n/n8n-nodes-langchain.chainRetrievalQa
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Vector Store Retriever
@n8n/n8n-nodes-langchain.retrieverVectorStore