Build an intelligent agent that answers document questions
Workflow Description
An advanced automation template leveraging AI to analyze and segment documents, store content in a vector database, and automatically answer user queries based on indexed material using retrieval chains and language models.
How it works
- 1.Trigger the workflow via manual activation or HTTP request
- 2.Load documents and split them into manageable text chunks
- 3.Convert text segments into vector embeddings using OpenAI
- 4.Store vectors in Milvus for efficient semantic search
- 5.Respond to questions by retrieving relevant content and generating intelligent answers
Use cases
- Create a smart search engine across internal company documentation
- Build an automated customer support system answering frequently asked questions from a knowledge base
- Extract information from lengthy reports and respond to specific inquiries instantly
Requirements
- OpenAI API key for accessing language models and embedding services
- Milvus vector database or compatible vector storage for indexing and retrieval
- Supported document formats (PDF, DOCX, text) ready for processing and ingestion
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (22)
OpenAI Chat Model
OpenAI
When clicking "Execute Workflow"
Manual Trigger
Fetch Essay List
HTTP Request
Extract essay names
HTML Page
Split out into items
Split Out
Fetch essay texts
HTTP Request
Limit to first 3
Limit
Extract Text Only
HTML Page
Sticky Note3
Sticky Note
Sticky Note5
Sticky Note
When chat message received
Chat Trigger
Sticky Note
Sticky Note
Milvus Vector Store
Vector Store Milvus
Default Data Loader
Document Default Data Loader
Embeddings OpenAI
OpenAI
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Sticky Note1
Sticky Note
Embeddings OpenAI1
OpenAI
Milvus Vector Store1
Vector Store Milvus
Sticky Note2
Sticky Note
Q&A Chain to Retrieve from Milvus and Answer Question
Chain Retrieval Qa
Milvus Vector Store Retriever
Retriever Vector Store