Chat with Documents Using LangChain and Pinecone
detail.loadingPreview
Ingest documents from Google Drive, vectorize them with OpenAI, store in Pinecone, and enable chat interactions with LangChain nodes. This workflow automates the process of creating a searchable knowledge base.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of creating a searchable knowledge base from documents stored in Google Drive. It leverages LangChain and OpenAI for document processing and Pinecone for efficient vector storage and retrieval.
The workflow first fetches a document from Google Drive, adds metadata, and embeds it into vector representations using OpenAI. These embeddings are then stored in a Pinecone vector database. Subsequently, a chat interface is provided where users can ask questions. The workflow retrieves relevant document chunks from Pinecone based on the user's query, synthesizes an answer using OpenAI's chat model, and provides citations to the original document sources.
Key Features
- Fetches documents from Google Drive.
- Splits documents into manageable chunks for processing.
- Generates embeddings using OpenAI for semantic understanding.
- Stores and retrieves document embeddings from Pinecone.
- Enables a chat interface for querying the document corpus.
- Provides answers with citations to the source document.
How To Use
- Ensure you have a Google Drive account connected to n8n and the Google Drive node is configured.
- Set up your OpenAI API key in n8n credentials.
- Create a Pinecone index with 1536 dimensions and configure the Pinecone nodes with your index name.
- Update the
file_urlin theSet file URL in Google Drivenode to point to your desired document (e.g., a PDF from Google Drive). - Populate Pinecone by executing the workflow manually.
- Interact with the chat interface by clicking the 'test workflow' button on the
Chat Triggernode or by using the provided chat button in the workflow notes.
Apps Used
Workflow JSON
{
"id": "bf40c27f-2399-4700-a2dd-4fd9d34e29cf",
"name": "Chat with Documents Using LangChain and Pinecone",
"nodes": 0,
"category": "PDF and Document Processing",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: bf40c27f-2399...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automated PII Removal from CSV Files on Google Drive using OpenAI
This workflow automatically detects new CSV files in a Google Drive folder, uses OpenAI to identify and remove Personally Identifiable Information (PII) columns, and uploads the cleaned file back to Google Drive. It leverages Google Drive Trigger, Google Drive, OpenAI, and code nodes for robust data sanitization.
Automated Document Processing and Q&A with Langchain and Mistral AI
This workflow automates the processing of local documents, chunking them for efficient analysis, and then uses Mistral AI for question answering via a Qdrant vector store. It allows for intelligent retrieval and summarization of information from various document types.
Automated Audio Transcription and Summarization from Google Drive to Notion
Automatically transcribe audio files from Google Drive using OpenAI Whisper, then summarize and send structured data to Notion.