Welcome to the BundesFAQ-Chatbot project!
This is the main repository for the BundesFAQ-Chatbot project.
- main - Main/production branch
- Mehdi - Mehdi's development branch
- soufiane_dev - Soufiane's development branch
Clone this repository and switch to your development branch to start working.
This project integrates a Retrieval-Augmented Generation (RAG) workflow built in n8n.
It combines OpenAI models, Pinecone vector storage, and Google Drive automation to enable document-based question answering with real-time data updates.
The diagram below illustrates the AI chat workflow.
- Chat Trigger – The flow starts when a chat message is received by the bot.
- AI Agent – Serves as the main controller that manages memory, message context, and routing.
- OpenAI Chat Model – Handles response generation and reasoning.
- Simple Memory – Stores short-term conversational context to maintain continuity.
- Answer with Vector Store – When the user asks a question, the agent retrieves the most relevant information from the vector database via semantic search.
- Pinecone Vector Store – Stores embeddings of the knowledge base for retrieval.
- OpenAI Embeddings – Generates vector representations for text chunks used in the search.
This setup allows the chatbot to deliver context-aware answers based on both stored memory and uploaded documents.
The second workflow automates document ingestion and embedding creation whenever a file is updated in Google Drive.

-
Google Drive Trigger – Detects when a file is uploaded or modified.
-
Download File – Fetches the updated file for processing.
-
Default Data Loader – Parses and structures document content.
-
Recursive Character Text Splitter – Splits long documents into smaller chunks for efficient embedding.
-
OpenAI Embeddings – Converts each chunk into high-dimensional vectors.
-
Pinecone Vector Store – Saves these vectors in Pinecone for fast semantic retrieval.
| Component | Description |
|---|---|
| Backend | n8n workflows |
| LLM | OpenAI Chat Model (GPT) |
| Vector Database | Pinecone |
| Embedding Model | OpenAI Embeddings API |
| Data Source | Google Drive (automatic document ingestion) |
| Memory | Simple Memory in n8n |
This integration ensures that the chatbot can automatically learn from new documents and answer user questions using contextual memory and document data.
- Add user authentication for secure document uploads and chat access.
- Implement metadata filtering (e.g., by topic, department, or date).
- Extend support for additional file formats (PDF, DOCX, TXT).
- Introduce logging and analytics to monitor vector queries and model responses.
