If you already have a chatflow exported as a `.json` file (e.g. `Product Detection Q&A Chatflow.json`), you can import it directly into Flowise instead of building from scratch.
Search for **"Recursive Character Text Splitter"** in the nodes panel and drag it onto the canvas.
| Setting | Recommended Value |
|---|---|
| Chunk Size | `1000` |
| Chunk Overlap | `200` |
---
### Step 2: Document Store (RAG)
Search for **"Document Store"** and drag it onto the canvas.
1. Click **Select Store** → **Create New Store**
2. Name it (e.g., `Product Documentation`)
3. Assign the **Recursive Character Text Splitter** to the Document Store
4. Add your documents:
- Click the store → **Add Document Loader**
- Choose a loader: **Text File**, **PDF File**, **Docx File**, etc.
- Upload your knowledge base files
5. Connect the **Document** output of the Document Store to the Faiss node
> **What to put in your documents:**
> Write plain text files or PDFs describing your software — features, FAQs, installation steps, error explanations, etc. The more detailed your docs, the better the chatbot answers.
---
### Step 3: Ollama Embeddings
Search for **"Ollama Embeddings"** and drag it onto the canvas.
| Setting | Value |
|---|---|
| Base URL | `http://localhost:11434` (or your server IP) |
| Model Name | `nomic-embed-text:latest` |
Connect the **OllamaEmbeddings** output to the **Embeddings** input of the Faiss node.
---
### Step 4: Faiss Vector Store
Search for **"Faiss"** and drag it onto the canvas.
| Setting | Value |
|---|---|
| Base Path to load | `/root/.flowise/vectorstore` (must be an existing directory) |
Create the directory if it doesn't exist:
```bash
mkdir -p /root/.flowise/vectorstore
```
Connect:
- **Document** output from Document Store → **Document** input of Faiss
- **OllamaEmbeddings** → **Embeddings** input of Faiss
The **Faiss Retriever** output connects to the **Vector Store Retriever** input of the QA Chain.
---
### Step 5: Ollama Chat Model
Search for **"ChatOllama"** or **"Ollama"** and drag it onto the canvas.
| Setting | Value |
|---|---|
| Base URL | `http://localhost:11434` (or your server IP) |
| Model Name | `qwen2.5:3b` |
| Temperature | `0.7` (lower = more factual, higher = more creative) |
> **Important:** Use the exact model name with a colon, e.g. `qwen2.5:3b` not `qwen2.5-3b`.
Connect the **ChatOllama** output to the **Chat Model** input of the QA Chain.
---
### Step 6: Buffer Memory
Search for **"Buffer Memory"** and drag it onto the canvas.
| Setting | Value |
|---|---|
| Session ID | *(leave empty — auto-uses the session ID passed by the user)* |
| Memory Key | `chat_history` |
Connect the **BufferMemory** output to the **Memory** input of the QA Chain.
> Buffer Memory keeps conversation history so users can ask follow-up questions naturally.
> Note: Buffer Memory resets if Flowise restarts. For persistent memory across restarts, use **Redis-Backed Memory** or **MongoDB Memory** instead.
---
## Upsert Documents
Before the chatbot can answer questions, you must index your documents into the vector store.
1. Click the **Upsert** button (top right of the canvas)
2. Wait for it to complete — you should see a success message
3. Verify the index files were created:
```bash
ls /root/.flowise/vectorstore/
# Expected output: faiss.index faiss.json
```
> **Re-upsert every time** you update or add documents to the Document Store.
---
## Using Cloud LLM APIs (Optional)
If you prefer using cloud providers instead of (or in addition to) Ollama:
### OpenAI
1. Get your API key at https://platform.openai.com/api-keys
2. In Flowise: **Settings** → **API Keys** → Add key
3. Replace the **ChatOllama** node with a **ChatOpenAI** node
4. Enter your API key and choose a model (e.g., `gpt-4o`)
### Anthropic (Claude)
1. Get your API key at https://console.anthropic.com
2. Replace the **ChatOllama** node with a **ChatAnthropic** node
3. Enter your API key and choose a model (e.g., `claude-sonnet-4-5`)
### Google Gemini
1. Get your API key at https://aistudio.google.com
2. Use the **ChatGoogleGenerativeAI** node
3. Enter your API key and model name (e.g., `gemini-1.5-pro`)
> **For Embeddings with cloud APIs:** Replace Ollama Embeddings with **OpenAI Embeddings** or **Google Generative AI Embeddings** nodes, using the same API key setup.
---
## Deploy Chatbot to Users
### Direct Link
Share the chatbot link directly — no account needed for users:
```
http://your-server-ip:3000/chatbot/YOUR-FLOW-ID
```
Find your flow ID in the URL when editing the flow.
Users just open the link and start chatting immediately. No signup required.
---
### Embed in Website
Paste this into any HTML page to show a chat bubble:
```html
<scripttype="module">
import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js"
// Generate or reuse a session ID per user
let sessionId = localStorage.getItem("chatSessionId");
if (!sessionId) {
sessionId = crypto.randomUUID();
localStorage.setItem("chatSessionId", sessionId);
}
Chatbot.init({
chatflowid: "YOUR-FLOW-ID",
apiHost: "http://your-server-ip:3000",
chatflowConfig: {
sessionId: sessionId
},
theme: {
button: {
backgroundColor: "#your-brand-color",
right: 20,
bottom: 20,
},
chatWindow: {
title: "Software Support",
welcomeMessage: "Hello! How can I help you today?",
height: 600,
width: 400,
}
}
})
</script>
```
Get your embed code from Flowise: open the flow → click the **`<>` (Embed)** button (top right).
---
### Session Management
Each user needs an isolated session to prevent seeing each other's conversation history.
| Scenario | Behavior |
|---|---|
| No `sessionId` set | All users share memory — **dangerous** |
| Unique `sessionId` per user | Fully isolated conversations |
| Using your own auth system | Pass your user's ID as the `sessionId` |
```javascript
// If users are logged into your system, use their user ID
sessionId: currentUser.id // e.g. "user_12345"
// For anonymous users, use localStorage (persists across page refreshes)
Firecrawl lets you scrape entire websites and feed the content directly into your Document Store as a knowledge base. This is useful if your software documentation lives on a website or wiki.
---
### What Firecrawl Does
```
Your website / docs URL
↓
Firecrawl crawls all pages
↓
Returns clean Markdown text
↓
Loaded into Document Store
↓
Indexed into Faiss for RAG
```
---
### Option A: Firecrawl Cloud (Easiest)
1. Sign up at [https://firecrawl.dev](https://firecrawl.dev)
2. Get your API key from the dashboard
3. Add the API key to Flowise:
- Go to **Settings** → **API Keys** → **Add Credential**