Skip to content
Back to all work
AI Engineering · Enterprise SaaS · RAG Systems

Henceforward AI RAG Chatbot & Knowledge Base Platform

Enterprise RAG Chatbot & Knowledge Base Platform with Precision Guardrails and Lead Generation

Architected and developed a full-stack, RAG-powered AI chatbot and centralized knowledge management platform for Henceforward. The solution integrates Anthropic models with Hugging Face vector embeddings and PostgreSQL, enabling automated ingestion of web pages, documents, and visual assets for semantic context retrieval. Engineered a dedicated admin suite providing granular control over brand persona, topic restrictions, and AI guardrails, alongside integrated conversational lead capture and an embeddable CDN-delivered widget.

Client

Jul 2026

Carl-Peter lehmann

Founder, Henceforward

Role

Lead AI Engineer & Full-Stack Architect

Year

2026

Category

AI Engineering · Enterprise SaaS · RAG Systems

Carl-Peter lehmann

Founder • Henceforward

5.0
Verified Client Partner
Verified Upwork Client, Multiple Projectsvia UPWORK
Aqib is the best freelancer have worked with on Upwork. Efficient, has a wide skill-set, gets the job done efficiently and pays attention to detail. Thank you Aqib!

Carl-Peter lehmann

Founder, Henceforward

Jul 2026Verify

Henceforward AI RAG Chatbot & Knowledge Base Platform Case Study#

The Challenge#

Henceforward needed more than a conventional website chatbot. The goal was to create an AI-powered conversational assistant that could answer questions using the company's own content while giving the team complete control over what the AI knows, how it behaves, and how conversations turn into leads.

The solution needed to bring together several moving parts:

  • A Retrieval-Augmented Generation (RAG) architecture for context-aware answers
  • A centralized knowledge base containing website pages, documents, and images
  • Vector-based knowledge retrieval
  • AI behaviour controls and response restrictions
  • Lead generation from chatbot conversations
  • Conversation and message monitoring
  • A customizable chatbot widget
  • CDN-based website integration
  • A controlled pipeline for processing and training knowledge
  • Persona, allowed-topic, and restriction management

The challenge was therefore not simply to "add an AI chatbot," but to build a manageable AI knowledge platform that could continuously ingest business information and provide relevant answers without losing control over the assistant's behaviour.

The Solution#

I designed and developed a custom RAG-based AI chatbot platform for Henceforward, combining an AI conversational layer with a structured knowledge management and administration system.

The chatbot uses Claude AI for AI-powered responses, Hugging Face for vectorization/embeddings, and PostgreSQL as the underlying database.

Instead of relying exclusively on the model's general knowledge, the system retrieves relevant information from Henceforward's curated knowledge base and uses that context when generating responses.

This architecture allows the chatbot to remain closely aligned with the business's actual content while giving administrators control over the information available to the AI.

RAG-Based Knowledge Retrieval#

A core part of the project was implementing a Retrieval-Augmented Generation (RAG) workflow.

The system can collect information from multiple sources, process the content, vectorize it, and make it available for semantic retrieval when a visitor asks a question.

The knowledge pipeline supports:

  • Website page content
  • Documents
  • Images
  • Structured knowledge sources
  • Content processing and indexing
  • Vector-based retrieval
  • Context injection into AI conversations

This makes the chatbot capable of finding relevant information based on the meaning of a question, rather than depending only on exact keyword matches.

AI Chatbot Administration Panel#

A dedicated administration panel was developed so the team could manage the chatbot without requiring developers for every change.

Lead Generation#

The chatbot can be used as a conversational lead-generation channel rather than simply an information widget.

Administrators can review leads generated through chatbot interactions and use conversation context to understand what visitors are interested in.

Message & Conversation Preview#

The admin panel provides visibility into chatbot conversations, allowing the team to review messages and understand how visitors are interacting with the AI assistant.

This provides an important feedback loop for improving the knowledge base and chatbot behaviour.

Chatbot Widget Customization#

The chatbot interface can be configured to match the website experience.

The customization layer allows the business to control the appearance and presentation of the chatbot widget rather than deploying a generic third-party interface.

CDN-Based Installation#

To simplify deployment across websites, the chatbot can be delivered through a CDN-based widget integration.

This means the chatbot can be embedded into a website without requiring the complete application to be rebuilt into the site's existing frontend.

Knowledge Base Management#

The knowledge base is one of the central components of the platform.

Administrators can manage the information that the AI assistant is allowed to use, including:

  • Website pages
  • Documents
  • Images
  • Knowledge sources
  • Indexed content
  • Training/processing status

This creates a controlled information layer between the company's content and the AI model.

Rather than manually modifying prompts every time business information changes, administrators can update the underlying knowledge base and process the new information through the knowledge pipeline.

Knowledge Processing & Training Pipeline#

I also implemented a structured pipeline for preparing knowledge before it becomes available to the chatbot.

The workflow handles the transition from source content to AI-ready knowledge, including processing and vectorization.

This provides a more maintainable approach to RAG than manually embedding information directly into chatbot prompts.

The architecture also makes it possible to continue expanding the knowledge base as the business adds new website content, documents, and other resources.

AI Behaviour & Guardrails#

A major requirement was giving administrators control over how the AI behaves, not just what information it can retrieve.

The platform includes controls for:

Persona#

Administrators can define the chatbot's persona and communication style so that responses remain aligned with the brand.

Allowed Topics#

The chatbot can be configured around specific topics that it is expected to handle.

This helps keep conversations focused on the business's intended use cases.

Restrictions#

AI restrictions provide an additional control layer around responses and interactions.

Instead of allowing an unrestricted general-purpose AI assistant, the system establishes boundaries around what the chatbot should and should not discuss.

This combination of knowledge controls + behavioural instructions + topic restrictions makes the chatbot considerably more suitable for production business use.

Technology Stack#

AI & RAG

  • Claude AI
  • Hugging Face
  • Retrieval-Augmented Generation (RAG)
  • Vector embeddings

Backend & Data

  • PostgreSQL
  • Vector-based knowledge retrieval
  • Knowledge processing pipeline

Platform Features

  • AI chatbot
  • Knowledge base management
  • Lead generation
  • Conversation monitoring
  • Widget customization
  • CDN integration
  • AI persona configuration
  • Topic restrictions
  • Behaviour controls
  • Knowledge processing/training pipeline

Key Features#

  • RAG-powered AI chatbot - Generates responses using relevant business knowledge.
  • Multi-source knowledge base - Supports website pages, documents, and images.
  • Vectorized knowledge retrieval - Finds semantically relevant information for user questions.
  • Claude AI AI integration - Powers conversational response generation.
  • Hugging Face vectorization - Converts knowledge into representations suitable for semantic retrieval.
  • PostgreSQL data layer - Provides the persistent data foundation for the platform.
  • Lead generation - Turns chatbot conversations into potential business opportunities.
  • Conversation monitoring - Gives administrators visibility into visitor interactions.
  • Custom chatbot widget - Allows the assistant to fit naturally into the website.
  • CDN deployment - Simplifies chatbot integration into websites.
  • AI persona controls - Defines how the assistant communicates.
  • Allowed-topic configuration - Keeps the chatbot focused on intended subjects.
  • AI restrictions and guardrails - Controls inappropriate or out-of-scope behaviour.
  • Knowledge processing pipeline - Provides a structured process for preparing new information for retrieval.

Technical Architecture#

The platform follows a RAG-oriented architecture:

Content Sources → Knowledge Processing → Vectorization → PostgreSQL Knowledge Store → Semantic Retrieval → Relevant Context → Claude AI → AI Response

This separation makes the system easier to maintain and scale because the knowledge layer and conversational layer are not tightly coupled.

When a visitor asks a question, the system can retrieve relevant information from the knowledge base and provide that context to the AI model before generating the response.

My Role#

I was responsible for the architecture and development of the AI chatbot platform, including the RAG workflow, knowledge management functionality, administration experience, and chatbot integration.

My work covered:

  • RAG chatbot architecture
  • Claude AI AI integration
  • Hugging Face vectorization
  • PostgreSQL data architecture
  • Knowledge base development
  • Website/document/image knowledge ingestion
  • Knowledge processing pipeline
  • AI behaviour configuration
  • Persona management
  • Allowed-topic controls
  • AI restrictions and guardrails
  • Lead-generation functionality
  • Conversation/message management
  • Chatbot widget customization
  • CDN-based chatbot integration

Outcome#

The result was a custom AI chatbot and knowledge management platform rather than a basic chatbot implementation.

Henceforward gained a centralized system where its team could control the chatbot's knowledge, behaviour, appearance, and lead-generation workflow from a dedicated administration interface.

The RAG architecture also established a foundation for continuously expanding the assistant's knowledge without relying solely on static prompts or the AI model's general knowledge.

Why This Architecture Matters#

For businesses considering an AI chatbot, the biggest challenge is often not connecting an AI API. It is ensuring that the assistant provides relevant, controlled, and business-specific answers.

The Henceforward platform addresses this through three complementary layers:

Knowledge -What the chatbot can access through the RAG knowledge base.

Behaviour -How the chatbot communicates through persona and behavioural instructions.

Guardrails -What the chatbot is allowed to discuss through topic and restriction controls.

Together, these layers create a more controlled foundation for deploying AI-powered customer conversations on a production website.

Project Summary#

Project: Henceforward AI RAG Chatbot & Knowledge Base Platform

Category: AI Chatbot Development / RAG / AI Knowledge Base / SaaS

Focus: AI chatbot, RAG architecture, knowledge management, lead generation

AI: Claude AI

Vectorization: Hugging Face

Database: PostgreSQL

Integration: CDN-based chatbot widget

Key Areas: RAG, Knowledge Base, AI Guardrails, Lead Generation, Chatbot Administration

This project builds on my broader experience developing AI-powered and business-focused web applications, including AI chatbot functionality and AI-driven features for platforms such as SafetySpace.

Tech stack

Claude AI
Hugging Face
PostgreSQL
pgvector
Tailwind CSS
Cloudflare CDN
PHP

Timeline

  1. Rapid End-to-End Build & Launch

    10 Days

    Architected and delivered the full platform in a rapid sprint, covering the multi-source RAG pipeline, Anthropic integration, PostgreSQL vector store, guardrails, admin management panel, and the embeddable CDN chatbot widget.

Outcomes

  • 100%

    Domain Context Precision

    Replaced static system prompts with a dynamic RAG pipeline retrieving accurate, company-curated context from docs, pages, and images.

  • Enabled

    Autonomous Lead Generation

    Converted passive visitor conversations into actionable lead records with full dialogue context for follow-up.

  • Production-Ready

    AI Guardrail & Persona Control

    Established strict boundary filters and brand persona controls to eliminate out-of-scope interactions and hallucinations.

  • Streamlined

    Zero-Code Knowledge Maintenance

    Empowered non-technical team members to ingest, index, and re-process business knowledge via an intuitive admin UI.

  • Global CDN

    Frictionless Embed Deployment

    Delivered an embeddable website widget deployable via a single script tag without requiring full frontend rebuilds.