Chatbot IA basé sur la documentation, avec RAG, OpenAI et réarrangeur Cohere
Ceci est unInternal Wiki, AI RAGworkflow d'automatisation du domainecontenant 18 nœuds.Utilise principalement des nœuds comme GoogleDrive, ManualTrigger, Agent, ExtractFromFile, ChatTrigger. Chatbot IA basé sur des documents, avec RAG, OpenAI et le réorganisateur Cohere
- •Informations d'identification Google Drive API
- •Clé API OpenAI
- •URL et Clé API Supabase
Nœuds utilisés (18)
Catégorie
{
"meta": {
"instanceId": "6052a1b29f061469e8139dae44556603650099c3365d7598798f132ae827fa1c"
},
"nodes": [
{
"id": "a8afd8c2-2bfd-49f3-9687-0d68c83db4ad",
"name": "Interface de chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
80,
100
],
"webhookId": "de210796-2512-4c20-97eb-87b7f05298cb",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "00c21cda-1193-4cf5-9681-bf21ac2b269c",
"name": "Agent RAG",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
300,
100
],
"parameters": {
"options": {
"systemMessage": "You are an intelligent assistant with access to a knowledge base. Always search for relevant information before answering questions. Be helpful, accurate, and cite your sources when providing information from the knowledge base."
}
},
"typeVersion": 2
},
{
"id": "c74d3fac-14ef-4809-b290-d0344db04c79",
"name": "Modèle IA (OpenAI)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
180,
320
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "e8a473c1-4934-491b-8283-80d48982d604",
"name": "Recherche d'embeddings",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
540,
460
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "6fc17058-70f2-4bbe-a8b5-e35116f14853",
"name": "Mémoire de conversation",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
340,
320
],
"parameters": {
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "ba366390-61e3-4a25-8008-fb172145486a",
"name": "Déclencheur de chargement de documents",
"type": "n8n-nodes-base.manualTrigger",
"position": [
100,
760
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f97d305b-3a96-445c-ace2-535c60055a4f",
"name": "Télécharger PDF depuis Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
320,
760
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "{{GOOGLE_DRIVE_FILE_URL}}"
},
"options": {},
"operation": "download"
},
"typeVersion": 3
},
{
"id": "9eec6cb6-f445-4add-8de9-1464b61dfa7a",
"name": "Embeddings de documents",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
700,
960
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "e64b2357-0238-45ca-87bd-10f8deddd6e4",
"name": "Traiter le texte du document",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
840,
960
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "source",
"value": "={{ $node['Download PDF from Drive'].json.name }}"
},
{
"name": "type",
"value": "pdf"
}
]
}
},
"jsonData": "={{ $json.text }}",
"jsonMode": "expressionData"
},
"typeVersion": 1.1
},
{
"id": "8b0645f9-dbcb-4613-9126-9efa824615bc",
"name": "Recherche en base de connaissances",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
540,
320
],
"parameters": {
"mode": "retrieve-as-tool",
"topK": 10,
"options": {
"queryName": "{{MATCH_FUNCTION_NAME}}"
},
"tableName": {
"__rl": true,
"mode": "id",
"value": "{{VECTOR_TABLE_NAME}}"
},
"useReranker": true,
"toolDescription": "Use this tool to search for information in the knowledge base. Always use this before answering questions to ensure accurate, up-to-date responses."
},
"credentials": {
"supabaseApi": {
"id": "PgMEWpeDY6PHLFXp",
"name": "Supabase Zenithon Suporte IA"
}
},
"typeVersion": 1.3
},
{
"id": "4cb8869a-de07-44f5-8f79-9b3c1207d21c",
"name": "Stockage en base de données vectorielle",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
700,
760
],
"parameters": {
"mode": "insert",
"options": {
"queryName": "{{MATCH_FUNCTION_NAME}}"
},
"tableName": {
"__rl": true,
"mode": "id",
"value": "{{VECTOR_TABLE_NAME}}"
}
},
"typeVersion": 1.3
},
{
"id": "c8d8674d-ebe7-42fa-918e-ea9c5dc56b98",
"name": "Extraire le contenu PDF",
"type": "n8n-nodes-base.extractFromFile",
"position": [
500,
760
],
"parameters": {
"options": {
"maxPages": 500
},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "c5af8b70-bbda-4138-9598-dfd6c44a0eb5",
"name": "Réorganisateur Cohere",
"type": "@n8n/n8n-nodes-langchain.rerankerCohere",
"position": [
700,
460
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c3af22b6-830c-43a6-9a8f-0f38f3dec647",
"name": "Note : Déclencheur de chat",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
-40
],
"parameters": {
"color": 5,
"width": 200,
"height": 120,
"content": "### 1️⃣ Chat Trigger\nReceives messages from users through the chat interface"
},
"typeVersion": 1
},
{
"id": "c3655d77-d3ee-4c21-8166-da08b15175d3",
"name": "Note : Agent RAG",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
-40
],
"parameters": {
"color": 5,
"width": 200,
"height": 120,
"content": "### 2️⃣ RAG Agent\nOrchestrates the conversation using tools and memory"
},
"typeVersion": 1
},
{
"id": "ba9f02ea-6def-433a-9ccc-6f0ec1a1792b",
"name": "Note : Recherche de connaissances",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
180
],
"parameters": {
"color": 5,
"width": 200,
"height": 100,
"content": "### 3️⃣ Knowledge Search\nSearches the vector database for relevant information"
},
"typeVersion": 1
},
{
"id": "ba558d29-fa87-4a2d-a63f-64a768bb2efb",
"name": "Note : Réorganisateur",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
440
],
"parameters": {
"color": 5,
"width": 200,
"height": 100,
"content": "### 4️⃣ Reranker\nImproves search quality by reordering results"
},
"typeVersion": 1
},
{
"id": "0ff39f38-d67e-4517-8f5b-834c032383dd",
"name": "Note : Configuration",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
0
],
"parameters": {
"color": 4,
"width": 260,
"height": 180,
"content": "### Configuration Variables\n\nReplace these in the workflow:\n- **GOOGLE_DRIVE_FILE_URL**\n- **VECTOR_TABLE_NAME**\n- **MATCH_FUNCTION_NAME**"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"a8afd8c2-2bfd-49f3-9687-0d68c83db4ad": {
"main": [
[
{
"node": "00c21cda-1193-4cf5-9681-bf21ac2b269c",
"type": "main",
"index": 0
}
]
]
},
"c5af8b70-bbda-4138-9598-dfd6c44a0eb5": {
"ai_reranker": [
[
{
"node": "8b0645f9-dbcb-4613-9126-9efa824615bc",
"type": "ai_reranker",
"index": 0
}
]
]
},
"c74d3fac-14ef-4809-b290-d0344db04c79": {
"ai_languageModel": [
[
{
"node": "00c21cda-1193-4cf5-9681-bf21ac2b269c",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e8a473c1-4934-491b-8283-80d48982d604": {
"ai_embedding": [
[
{
"node": "8b0645f9-dbcb-4613-9126-9efa824615bc",
"type": "ai_embedding",
"index": 0
}
]
]
},
"6fc17058-70f2-4bbe-a8b5-e35116f14853": {
"ai_memory": [
[
{
"node": "00c21cda-1193-4cf5-9681-bf21ac2b269c",
"type": "ai_memory",
"index": 0
}
]
]
},
"9eec6cb6-f445-4add-8de9-1464b61dfa7a": {
"ai_embedding": [
[
{
"node": "4cb8869a-de07-44f5-8f79-9b3c1207d21c",
"type": "ai_embedding",
"index": 0
}
]
]
},
"c8d8674d-ebe7-42fa-918e-ea9c5dc56b98": {
"main": [
[
{
"node": "4cb8869a-de07-44f5-8f79-9b3c1207d21c",
"type": "main",
"index": 0
}
]
]
},
"8b0645f9-dbcb-4613-9126-9efa824615bc": {
"ai_tool": [
[
{
"node": "00c21cda-1193-4cf5-9681-bf21ac2b269c",
"type": "ai_tool",
"index": 0
}
]
]
},
"e64b2357-0238-45ca-87bd-10f8deddd6e4": {
"ai_document": [
[
{
"node": "4cb8869a-de07-44f5-8f79-9b3c1207d21c",
"type": "ai_document",
"index": 0
}
]
]
},
"ba366390-61e3-4a25-8008-fb172145486a": {
"main": [
[
{
"node": "f97d305b-3a96-445c-ace2-535c60055a4f",
"type": "main",
"index": 0
}
]
]
},
"f97d305b-3a96-445c-ace2-535c60055a4f": {
"main": [
[
{
"node": "c8d8674d-ebe7-42fa-918e-ea9c5dc56b98",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Wiki interne, RAG IA
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Anderson Adelino
@andersonadelinoPartager ce workflow