Switch language한국어
Back to the list

We built an embeddable AI chat widget, hybrid RAG search, and agent portability — here's how (CrewForm v1.8.0)

TL;DR AI

Key summary

2 min read
  1. Embeddable chat widget: deploy a site chat bubble with one script tag (https://runner.crewform.tech/chat/widget.js); supports data-key and data-theme.

  2. Widget needs no React or npm—built as a single Vite bundle, uses Shadow DOM, preserves session memory across reloads, enforces per-visitor rate limits, offers a Settings UI with embed snippet generator and live preview, streams responses via SSE, and is included in the Docker image for self-hosting.

  3. Knowledge Base adds hybrid search combining vector similarity (pgvector cosine) with PostgreSQL full-text (tsvector + ts_rank_cd).

  4. Final retrieval score is computed as 0.7 × cosine_similarity plus 0.3 × ts_rank; retrieval uses over-fetch and rerank to produce top-K results.

  5. Documents can be tagged (e.g., 'FAQ', 'Technical', 'Policy') and filtered via GIN-indexed tags; the Retrieval Tester enables interactive query testing with color-coded similarity scores, mode toggles, tag/doc filters, and top-K adjustment before deployment to agents.

Read the original