Introducing the 4-Month AI FrameworkRead the guide
Case StudiesCertification · Grounded AI Assistant

Multilingual Halal Certification Website With a Grounded AI Assistant

How we built and run the public website of a Swiss halal certification body, then added an AI assistant that only answers from its own documents

Published

Client

Halal Certification Services

Headquarters

Rheinfelden, Switzerland

Timeline

Since July 2024

Technology

RAG SYSTEM

Multilingual Halal Certification Website With a Grounded AI Assistant case study by EdgeFirm

4

languages across every page, policy and AI answer

46

page routes in each language

2 days

from the assistant's first commit to merge into main

0

model calls for questions below the similarity floor

At a glance

The challenge

A certification body whose policies, procedures, fees and forms must be public, accurate and readable by manufacturers in four languages, with regulatory news that changes month to month

The solution

A Next.js site with 46 routes in English, French, German and Spanish, plus a hybrid-search RAG assistant over the site's own translations and PDFs, with a hard refusal floor and lead capture

The results

  • 4 languages across every page, policy and AI answer
  • 46 page routes in each language
  • 2 days from the assistant's first commit to merge into main
  • 0 model calls for questions below the similarity floor
  • 18 golden questions in the assistant's regression eval
The problem

A Certification Website Where Every Answer Has to Match the Policy

Halal Certification Services (HCS) is a halal certification body based in Rheinfelden, Switzerland, certifying food, non-food, cosmetics, pharmaceutical and service businesses across Europe. Its customers are manufacturers and exporters who need a certificate that will be accepted in markets such as Indonesia, Malaysia and the Gulf states.

For a certifier, the website is not a brochure. It is where the certification procedure, the impartiality policy, the complaint and appeal process, the logo and labelling rules, the fees and the application forms are published. If a page is out of date or a translation drifts from the English original, a manufacturer can act on the wrong rule.

The content also does not stand still. Indonesia's BPJPH has issued new regulations through 2026, recognitions and partner offices change, training dates roll over each year, and questionnaires and press releases are replaced. Every change has to land in English, French, German and Spanish at the same time.

Before the AI assistant, a visitor with a question such as "how do I get certified?" or "what does it cost?" had to find the right page or PDF themselves, or email the office. A general-purpose chatbot was not an option: in a compliance business, an answer that sounds right but is not in the published documents is worse than no answer.

Scope of work

5 capabilities carried the build

Build and maintain the public website of a Swiss halal certification body in four languages, keep its regulatory content current, and add an AI assistant that answers only from the certifier's own published material and hands qualified enquiries to the sales team.

01

Four-language certification website

46 page routes in English, French, German and Spanish, covering certification schemes, procedures, policies, requirements, fees, recognitions, standards, product categories, training, FAQs and contact, with 40 translation files per language.

02

Documents and regulatory publishing

A downloads area with 42 PDFs (policies, questionnaires, press releases, BPJPH material), a blog of regulatory articles, a news module and a breaking-news notice, all translated.

03

Subhan, the grounded AI assistant

A streaming chat widget backed by hybrid retrieval (pgvector embeddings plus Postgres full-text search, fused with Reciprocal Rank Fusion) over the site's own translations and PDFs, answering in the visitor's language.

04

Guardrails and abuse protection

A similarity floor below which the model is never called and a fixed fallback is returned, an origin check and short-lived signed tokens on every chat request, per-IP rate limiting, and a log of unanswered questions.

05

Lead capture and operations

An end-of-chat step that scores the conversation, saves qualified leads and emails the office a short summary, plus contact, application, complaint and appeal, training booking and careers forms that deliver by email.

Technology

The stack behind it

Next.js, React, Tailwind CSS, i18next, PostgreSQL with pgvector, OpenAI gpt-4o-mini and text-embedding-3-small, Nodemailer, Vercel

OpenAIOpenAI
PostgreSQLPostgreSQL

Frontend

Next.js 14 (App Router), React 18, Tailwind CSS, Radix UI primitives and Sonner toasts

Internationalisation

next-i18n-router with i18next and react-i18next, locale-prefixed routes for en, fr, de and es

Retrieval

PostgreSQL with pgvector (1024-dimension embeddings, HNSW cosine index) and a generated tsvector column with a GIN index for lexical search

LLM and embeddings

OpenAI SDK against any OpenAI-compatible endpoint, gpt-4o-mini and text-embedding-3-small by default, with model and provider set by environment variables

Ingestion and evaluation

Node scripts for SQL migrations, incremental ingestion of locale JSON and PDFs (content-hash diffing, token-based chunking) and a golden-set regression eval

Email and hosting

Nodemailer for forms and lead alerts, deployed on Vercel

How we built it

Our development process

Months 1 to 3

Website foundation

From the first commit on 31 July 2024 we built the Next.js site with locale-prefixed routing and translations for English, French, German and Spanish, the home page, product category pages and the training calendar.

Months 9 to 11

Policies, procedures and downloads

Between March and May 2025 we turned the certifier's policies and procedures into translated pages, built the fees, terms, recognition and standards pages, and redesigned the downloads area for mobile.

Months 12 to 22

Regulatory publishing

From June 2025 to April 2026 we shipped a steady flow of translated blog articles, questionnaires and press releases, a site-wide SEO pass in February 2026 and a news module in April 2026.

Month 25

Grounded AI assistant

In July 2026 we added Subhan, the RAG assistant, with eight SQL migrations covering documents and chunks, hybrid search, the answer cache, chat sessions and leads, plus the ingestion and evaluation scripts.

Months 26 to 28

Lead capture and growth

Name, email, phone and company capture in the widget, scored lead emails, a careers section, updated office details and a breaking-news notice.

Transparency

Every number on this page was measured by EdgeFirm from the codebase and git history. HCS has not shared chat volume, lead counts or conversion figures, so none are quoted here.

After launch

Since the assistant launched we added contact capture inside the chat, a callback request that bypasses the score gate, a careers section with job filters, and a breaking-news notice tuned for mobile.

Next steps

The unanswered-question log gives HCS a running list of what visitors ask that the site does not yet cover, which feeds directly into new pages, FAQs and articles.

After launch

What changed after launch

4 Languages, One Source of Truth

Every page, policy, procedure and blog post is served in English, French, German and Spanish from shared translation files, and the AI assistant replies in the visitor's locale from the same content. Measured by EdgeFirm from the codebase.

2 Days From First Commit to Merge

The RAG assistant's first commit landed on 13 July 2026 and was merged into main on 14 July 2026, because ingestion reads the content the site already maintains instead of scraping it. Measured by EdgeFirm from git history.

0 Model Calls for Off-Topic Questions

Greetings are answered from canned replies, repeat questions from a 24-hour answer cache, and any question whose best match falls below the similarity floor gets a fixed fallback without calling the model. The assistant cannot improvise an answer the documents do not support.

18 Golden Questions Guard Every Change

A regression eval runs 14 should-answer and 4 should-refuse questions through the live endpoint and fails below an 80% pass rate, so changes to prompts, models or content are checked before release.

Leads Arrive Qualified

Each finished conversation is scored from 1 to 10. Only visitors who give a company name and a phone number and show real intent, or who ask for a callback, are saved and emailed to the office as a two-line summary rather than a transcript.

For a certification body, the website is part of the compliance record, so the work was less about adding features than about keeping four languages of policy accurate as the regulations moved. That discipline is also what made the AI assistant safe to ship: it reads the same translations and PDFs the site publishes, refuses when the documents do not cover a question, and routes serious enquiries to people. A grounded assistant is only as good as the content under it, and here that content was already maintained.

Talk to the founders

Get AI live in months, not years.

Book a 30-minute strategy call with the founders who will write your code.