Below is a “reasonable-but-educated-guess” teardown of how Meezan Bank could have built the MeezanGPT widget you see on their website.
I don’t work for Meezan Bank, so I can’t give you their exact repo or cloud diagram, but by (1) looking at typical patterns banks follow when exposing GPT-powered chat, (2) inspecting network traffic of similar sites, and (3) factoring in the compliance requirements of a regulated financial institution, we can outline a highly plausible architecture and the steps they would have taken.
1. Bird’s-eye architecture
┌─────────────────────────────┐
│ MeezanBank.com Front-end │
│ (React / Next / plain JS) │
└────────────┬────────────────┘
│WebSocket/HTTPS
▼
┌─────────────────────────────┐
│ Conversational Gateway │
│ (Azure Bot Service / │
│ AWS API Gateway / │
│ Node/Express “/chat”) │
└────────────┬──────────┬─────┘
│ │
│REST │DirectLine
▼ ▼
┌──────────────────────┐ ┌────────────────┐
│ Orchestrator / RAG │ │ Legacy Core │
│ (LangChain, │ │ Systems (CBS) │
│ Semantic Kernel) │ │ │
└────────┬─────────────┘ └────────────────┘
│
│Calls
▼
┌───────────────────────────┐
│ LLM Endpoint │
│ (Azure OpenAI ‑ GPT-4/3) │
└───────────────────────────┘
• Front-end chat bubble → loads a minified JS bundle that mounts a React component (or Microsoft WebChat) to the page.
• The component opens a DirectLine/WebSocket connection to a Conversational Gateway (Bot Framework or a custom Node API).
• Gateway handles auth, rate limiting, redaction, and streams user prompts to the Orchestrator.
• Orchestrator (built with LangChain/Semantic Kernel) performs:
1. Retrieval Augmented Generation (RAG) – queries a vector index of product brochures, Islamic banking guidelines, FAQs.
2. System & guard-rail prompts (tone, disclaimers).
3. Calls Azure OpenAI’s GPT-3.5-turbo or GPT-4.
• Responses are streamed back → rendered with markdown → code for hyperlinks, bold, etc.
2. Why a bank would likely pick Azure
- Data residency & compliance (ISO 27001, SOC 2, PCI-DSS).
- Private networking to an Azure OpenAI resource (no traffic traverses the public internet).
- Microsoft already bundles Bot Framework, Cognitive Search, and Content Moderator.
3. Key building blocks
| Layer | Likely tech | What it does |
|---|
| UI widget | React + MS WebChat or custom | Render chat, handle streaming, theme to Meezan colors, store session in localStorage |
| Gateway | Azure Bot Service OR Node API on Azure App Service | JWT auth, throttling, PII redaction, logging |
| Orchestration | LangChain.js / Semantic Kernel | RAG pipeline, function-calling, prompt templates |
| Vector store | Azure Cognitive Search or Pinecone | Embeddings of PDFs, website pages, policy docs |
| LLM | Azure OpenAI GPT-3.5-turbo / GPT-4 | Heavy lifting of natural language generation |
| Analytics | AppInsights / Elastic | Conversation metrics, hallucination alerts |
| Security | Azure KeyVault | API keys, secrets, connection strings |
4. Typical build steps (condensed tutorial)
-
Curate knowledge base
• Crawl meezanbank.com, PDFs, product sheets.
• Split into chunks (≈ 500 tokens) → embed with text-embedding-ada-002 → push vectors into Cognitive Search.
-
Stand-up the LLM endpoint
• Create Azure OpenAI resource → deploy GPT-3.5-turbo.
• Enable “content filtering = high” for banking compliance.
-
Write an orchestrator function (pseudo-code)
from langchain.chat_models import AzureChatOpenAI
from langchain.chains import ConversationalRetrievalChain
from langchain.embeddings import AzureOpenAIEmbeddings
from langchain.vectorstores.azuresearch import AzureSearch
retriever = AzureSearch(
index_name="meezan-knowledge",
embedding_function=AzureOpenAIEmbeddings()
).as_retriever(search_type="similarity", k=4)
llm = AzureChatOpenAI(
deployment_name="gpt-35-turbo",
temperature=0.2,
streaming=True
)
qa_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
retriever=retriever,
system_prompt=(
"You are MeezanGPT, a helpful assistant for Meezan Bank. "
"ALWAYS display the disclaimer: 'This is for general information; "
"for account-specific queries call 111-331-331.' "
"If unsure, say you don't have that information."
)
)
-
Expose an HTTPS endpoint (POST /chat) that:
• Accepts {user, message} JSON.
• Passes message into qa_chain.
• Streams tokens using Server-Sent Events (SSE) or WebSocket.
-
Drop-in front-end widget
<script src="https://cdn.meezanbank.com/meezaGPT.min.js"></script>
<script>
MeezanGPT.init({
token: "public-anon-token", // rate-limited
element: "#meezan-chat",
accentColor: "#682A8C"
})
</script>
<div id="meezan-chat"></div>
- Governance & monitoring
• Log every prompt + response to an internal SIEM.
• Periodically review for PII leaks or hallucinations.
• Add fallback: if user asks about their balance, respond with “Please log in to internet banking.”
5. Features you can notice from the live widget (if you open DevTools)
• Network calls likely hit something like /directline/conversations/... (Bot Framework) or /api/chat.
• Many responses end with a standard disclaimer → enforced via system prompt.
• Typing indicator & streaming tokens → means they’re using server-side chunking (OpenAI’s stream=True).
• Messages limited to N chars → simple client-side filter to control spend.
6. How you can build a similar “YourBrandGPT” in 1-2 weeks
- Collect & embed your docs (LangChain + Pinecone).
- Create an Azure OpenAI resource (or OpenAI.com if compliance allows).
- Fork a WebChat React sample and style it.
- Deploy orchestrator on Azure Functions or AWS Lambda.
- Add caching & usage caps.
- Ship an internal beta; measure answer quality before public launch.
TL;DR
MeezanGPT is almost certainly:
• A React (or Microsoft WebChat) widget on the website
• Talking to an Azure Bot Service / Node gateway
• Which uses a LangChain-style RAG pipeline
• Backed by Azure OpenAI models fine-tuned and/or prompted with Meezan Bank content.
Replicating it boils down to: curate domain docs → vector store → orchestrator → LLM → front-end widget, all wrapped in the governance & security controls that a bank demands.