使用GPT-4和多数据库搜索构建全面文献综述
中级
这是一个Document Extraction, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Code, OpenAi, PdfVector, WriteBinaryFile 等节点。 使用GPT-4和多数据库搜索构建全面文献综述
前置要求
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "placeholder"
},
"nodes": [
{
"id": "start-node",
"name": "开始",
"type": "n8n-nodes-base.stickyNote",
"position": [
250,
250
],
"parameters": {
"content": "## 文献综述参数"
},
"typeVersion": 1
},
{
"id": "pdfvector-search",
"name": "PDF 向量 - 搜索论文",
"type": "n8n-nodes-pdfvector.pdfVector",
"notes": "Search across multiple academic databases",
"position": [
450,
300
],
"parameters": {
"limit": 50,
"query": "={{ $json.topic }}",
"fields": [
"title",
"abstract",
"authors",
"year",
"doi",
"pdfUrl",
"totalCitations"
],
"yearTo": "={{ $json.endYear }}",
"resource": "academic",
"yearFrom": "={{ $json.startYear }}",
"operation": "search",
"providers": [
"pubmed",
"semantic_scholar",
"arxiv",
"google_scholar"
]
},
"typeVersion": 1
},
{
"id": "sort-papers",
"name": "按引用次数排序",
"type": "n8n-nodes-base.code",
"position": [
650,
300
],
"parameters": {
"functionCode": "// Sort papers by citations in descending order\nreturn items.sort((a, b) => (b.json.totalCitations || 0) - (a.json.totalCitations || 0));"
},
"typeVersion": 1
},
{
"id": "limit-papers",
"name": "选择顶级论文",
"type": "n8n-nodes-base.code",
"position": [
850,
300
],
"parameters": {
"functionCode": "// Limit to top N papers\nconst maxPapers = $node['Start'].json.maxPapers || 10;\nreturn items.slice(0, maxPapers);"
},
"typeVersion": 1
},
{
"id": "pdfvector-parse",
"name": "PDF 向量 - 解析论文",
"type": "n8n-nodes-pdfvector.pdfVector",
"notes": "Parse each paper's PDF",
"position": [
1050,
300
],
"parameters": {
"useLlm": "auto",
"resource": "document",
"operation": "parse",
"documentUrl": "={{ $json.pdfUrl }}"
},
"typeVersion": 1
},
{
"id": "synthesize",
"name": "综合综述",
"type": "n8n-nodes-base.openAi",
"position": [
1250,
300
],
"parameters": {
"model": "gpt-4",
"messages": {
"values": [
{
"content": "Create a literature review section for this paper:\n\nTitle: {{ $json.title }}\nAuthors: {{ $json.authors }}\nYear: {{ $json.year }}\n\nContent: {{ $json.content }}\n\nGenerate:\n1. Key contribution summary (2-3 sentences)\n2. Methodology overview\n3. Main findings\n4. Relevance to topic: {{ $node['Start'].json.topic }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "combine-sections",
"name": "合并章节",
"type": "n8n-nodes-base.code",
"position": [
1450,
300
],
"parameters": {
"functionCode": "// Combine all review sections into a single document\nconst reviewSections = items.map(item => item.json.reviewSection || item.json.content || '').filter(section => section);\nreturn [{ json: { reviewSections: reviewSections.join('\\n\\n') } }];"
},
"typeVersion": 1
},
{
"id": "export-review",
"name": "导出综述",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
1650,
300
],
"parameters": {
"fileName": "literature_review_{{ $now.format('yyyy-MM-dd') }}.md",
"fileContent": "# Literature Review: {{ $node['Start'].json.topic }}\n\n{{ $json.reviewSections }}"
},
"typeVersion": 1
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "PDF Vector - Search Papers",
"type": "main",
"index": 0
}
]
]
},
"Combine Sections": {
"main": [
[
{
"node": "Export Review",
"type": "main",
"index": 0
}
]
]
},
"Select Top Papers": {
"main": [
[
{
"node": "PDF Vector - Parse Papers",
"type": "main",
"index": 0
}
]
]
},
"Sort by Citations": {
"main": [
[
{
"node": "Select Top Papers",
"type": "main",
"index": 0
}
]
]
},
"Synthesize Review": {
"main": [
[
{
"node": "Combine Sections",
"type": "main",
"index": 0
}
]
]
},
"PDF Vector - Parse Papers": {
"main": [
[
{
"node": "Synthesize Review",
"type": "main",
"index": 0
}
]
]
},
"PDF Vector - Search Papers": {
"main": [
[
{
"node": "Sort by Citations",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 文档提取, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用GPT-4、PDFVector和PostgreSQL导出从文档提取数据
使用GPT-4、PDFVector和PostgreSQL导出从文档提取数据
Code
Open Ai
Switch
+5
9 节点PDF Vector
文档提取
使用GPT-4和多数据库搜索自动化学术文献综述
使用GPT-4和多数据库搜索自动化学术文献综述
If
Set
Code
+4
13 节点PDF Vector
文档提取
学术引用网络构建器
使用PDF向量API构建学术引用网络,用于Gephi可视化
Set
Code
Pdf Vector
+2
9 节点PDF Vector
文档提取
使用 PDF 向量、OCR、GPT-4 和 Google Drive 的研究论文分析系统
使用 PDF 向量、OCR、GPT-4 和 Google Drive 的研究论文分析系统
Code
Open Ai
Postgres
+4
11 节点PDF Vector
文档提取
使用PDF Vector和HIPAA合规从医疗文档提取临床数据
使用PDF Vector和HIPAA合规从医疗文档提取临床数据
If
Code
Postgres
+4
9 节点PDF Vector
文档提取
使用PDF Vector进行OCR、分析和Google Drive的文档处理
使用PDF Vector进行OCR、分析和Google Drive的文档处理
Set
Code
Split Out
+6
13 节点PDF Vector
文档提取
工作流信息
难度等级
中级
节点数量8
分类2
节点类型5
作者
PDF Vector
@pdfvectorA fully featured PDF APIs for developers - Parse any PDF or Word document, extract structured data, and access millions of academic papers - all through simple APIs.
外部链接
在 n8n.io 查看 →
分享此工作流