Knowledge Base
Import, manage, and search your knowledge base so the AI can deflect questions accurately.
answerLoops searches the knowledge base for material relevant to a question and uses it to draft a reply. Keep articles current and review imported content before using it for customer answers.
Import methods
There are four ways to add content to the knowledge base.
1. URL import
Import a web page or an entire documentation site.
- Go to Knowledge Base → Import
- Paste a URL into the import field
- Choose Single page or Entire site
- Single page imports only that URL
- Entire site crawls linked pages up to a maximum of 25 pages
- Click Import and wait for processing to finish. Larger sites take longer.
- Imported pages appear in the Sources list when complete
Each page becomes a separate source entry. The crawler fetches the rendered content, splits it into chunks, embeds each chunk as a vector, and writes everything to the database.
Re-import deduplication: if you import the same URL a second time, pages that were already ingested are skipped automatically. Only new pages are processed. This means you can safely re-run a site import after adding new docs without creating duplicates.
Self-hosted operators must configure the URL import service. See environment variables.
2. File upload
Drag and drop files directly into the KB.
Supported formats: PDF, DOCX, MD, TXT, CSV
Maximum file size: 50 MB per file
- Go to Knowledge Base → Import
- Drag files onto the upload area, or click to open the file picker
- Files are processed immediately — each becomes one or more source entries depending on size
Large files are split into chunks automatically. Each chunk is embedded and indexed for semantic search.
3. GitHub repo sync
Connect a GitHub repository and sync its markdown files into the KB.
- Go to Knowledge Base → GitHub Sync
- Select the repository from the picker (requires GitHub App installed on your org)
- Click Sync now to queue an import of all
.mdand.mdxfiles - Optionally enable Auto-sync on push — answerLoops receives a webhook from GitHub on every push to the default branch and queues a re-sync automatically
The sync respects the repo's file tree. Each markdown file becomes its own source entry.
GitHub and Notion syncs run as background jobs — the Knowledge Base page shows each one as queued, then Syncing N/M as it works through the files or pages, then done, and you can navigate away while it runs. Re-triggering a sync for the same source while one is still in progress does nothing; the running job finishes on its own.
Install the GitHub App for the repositories you want to sync. Self-hosted operators must also configure the app credentials; see GitHub setup.
4. Notion workspace
Connect a Notion workspace and pull its pages and databases into the KB — useful for teams that keep their support content in Notion rather than a published docs site. Unlike the other three sources, this isn't one click: Notion requires creating a credential in Notion itself, then separately sharing pages with it. Full walkthrough with every click: Notion integration.
- In Notion, create a connection (Settings → Developer → Open developer tools → + New connection, Access token auth) and copy its token (starts with
ntn_orsecret_). - Share the pages you want synced: open each top-level page, click ••• → Connections, and add your connection. Sharing a page also shares its subpages, so sharing one top-level parent page is usually enough rather than adding every page individually. answerLoops syncs everything the connection can see — you control the scope by sharing or unsharing pages in Notion.
- In answerLoops, go to Integrations → Notion, paste the token, and click Connect.
- Go to the Knowledge Base page and click Sync now in the Notion panel. Each Notion page (and each row of a shared database) is converted to text, split into chunks, and embedded like every other source. Re-syncing replaces the previous Notion content.
Notion content imports unpublished. It is searchable from the dashboard but is not used to answer customer questions or served to the website widget until you click Publish to widget on the Notion panel. Every other source publishes automatically on import; Notion is the exception because workspace docs are often internal drafts. Your publish choice is kept across re-syncs.
The token is stored encrypted (set ENCRYPTION_KEY before connecting in any real deployment). There is no environment variable to configure — Notion is set up per workspace in the Integrations UI.
Sources list
The Sources tab on the Knowledge Base page lists every imported source. Each row shows:
| Column | Description |
|---|---|
| Name | File name, page URL, repo, or "Notion workspace" |
| Type | url, file, github, or notion |
| Chunks | Number of vector chunks indexed from this source |
| Size | Approximate content size |
A source marked Unpublished (currently only Notion) is indexed and shows in dashboard search but is held back from customer-facing answers and the website widget until you publish it from the Notion panel.
To remove a source, select it and click Delete selected. Deleting a source removes all its chunks from the vector index — any articles derived from it will no longer surface in search results.
Promoting tickets to the KB
When a ticket is resolved with a good answer, you can turn it into a KB article so the AI can reuse that answer for similar future questions.
- Open a ticket with status
resolved - Click Promote to KB in the ticket actions panel
- The Q&A pair is saved as a new KB article
Promoted articles appear in the Sources list with type ticket.
Search
Use the search bar at the top of the Knowledge Base page to find articles.
Semantic search (default when an AI provider is configured): searches by meaning rather than exact words. Asking "how do I reset my password" will surface an article titled "Account recovery steps" even though the words don't match exactly.
Keyword fallback (when no AI key is configured): falls back to exact text matching. An amber warning banner appears at the top of the KB page to indicate that semantic search is unavailable.
To clear a search and return to the full article list, click the × inside the search field or the Clear button.
Data persistence
KB articles and source chunks are stored in the kb_articles and kb_sources tables in PostgreSQL. They persist across Docker restarts as long as you retain the postgres-data volume.
Never run docker compose down -v. The -v flag deletes all Docker volumes, which permanently removes your KB articles, tickets, and all other data. Use docker compose down (without -v) to stop the stack safely.