HomeArticlesSecurity & Privacy
Data Governance • Security Architecture

AI Chatbot Security, Tenant Isolation & Data Privacy

The engineering blueprint for secure enterprise conversational AI. Discover how PostgreSQL tenant isolation, AES-256 credential encryption, and Zero Data Retention inference safeguard company intellectual property.

Written by: Knogents Team
Category: Enterprise Security
Reading time: 12 min read

Enterprise Security Principles

Connecting internal company documents, customer support transcripts, and live e-commerce databases to external language models requires rigorous safeguards. At Knogents, our security architecture is built on three core pillars: strict multi-tenant database vector isolation, zero data retention by underlying inference engines, and end-to-end cryptographic protection of all external tokens and credentials.

The Four Architectural Pillars of Knogents Security

1. Strict Multi-Tenant Vector Isolation

PostgreSQL pgvector tenant-scoped filtering

In multi-tenant RAG architectures, preventing cross-tenant data leakage is the foundational requirement. Knogents enforces hard tenant boundaries in PostgreSQL. Every vector similarity query calculates cosine distance using parametrized SQL bound strictly to the verified tenant UUID:

-- Hard multi-tenant boundary constraint
SELECT id, content, document_title FROM document_chunks 
WHERE bot_id = $1 -- Validated tenant UUID
  AND (embedding <=> $2) < 0.28
ORDER BY (embedding <=> $2) ASC LIMIT 5;

Chunks belonging to one business can never be matched or retrieved by queries initiated from another organization.

2. Zero Data Retention (ZDR) Model Inference

Commercial enterprise model confidentiality

Unlike consumer-facing chatbots where user prompts can be collected to train future model versions, Knogents interfaces exclusively with enterprise API endpoints governed by Zero Data Retention (ZDR) agreements. Incoming context and outgoing completions are processed statelessly in volatile RAM and deleted immediately upon request completion.

3. AES-256-GCM Credential Encryption

Protection for Shopify Storefront tokens and API keys

When merchants connect their Shopify Storefront Access Tokens or custom API keys, credentials are never stored in plaintext. They are encrypted at rest using industry-standard AES-256-GCM with unique cryptographic initialization vectors (IVs) and decrypted only in memory during authenticated tool execution.

4. Privacy-First Embed Loader (Cookie-Free)

Standalone client script under 20 KB

The standalone embed script (embed.js) sets zero third-party tracking cookies by default. It manages temporary UI state via ephemeral browser sessionStorage, ensuring visitors can interact with the chatbot without triggering cookie consent complications or third-party ad tracking.

Enterprise AI Security Evaluation Checklist

Before deploying any conversational AI platform on a corporate website, evaluate its compliance against these essential standards:

AI Chatbot Security, Tenant Isolation and Data Privacy
Security RequirementGeneric Consumer ChatbotsKnogents Architecture
Training on Company DataYes (default opt-in)Never (Strict ZDR enforcement)
Database Vector IsolationShared pool without row constraintsTenant-scoped SQL queries in pgvector
API Key StoragePlaintext or base64 encodingAES-256-GCM encryption at rest
Permanent Data PurgingManual support tickets or uncertain1-click instant purge in dashboard

Frequently Asked Questions

Will our company documents or customer conversations be used to train foundation models?

No. Knogents utilizes commercial API inference endpoints protected under strict Zero Data Retention (ZDR) and enterprise confidentiality agreements. Your uploaded PDFs, spreadsheets, sitemaps, and user chat transcripts are never logged, reused, or ingested to train public foundation models or adjust neural weights.

How does Knogents prevent cross-tenant vector data leakage in PostgreSQL?

Every vector search in PostgreSQL pgvector enforces strict tenant scoping via bot_id foreign key constraints and parametrized queries (WHERE bot_id = $1). Vectors belonging to Company A are partitioned at the database query layer and can never be retrieved or matched against queries initiated by Company B.

How are third-party credentials like Shopify Storefront tokens secured?

When merchants connect their Shopify Storefront Access Tokens or API credentials, the keys are encrypted at rest using AES-256-GCM encryption with unique initialization vectors (IVs). Credentials are decrypted only in memory during authenticated tool execution and are never exposed to client browsers.

How does the system defend against prompt injection and data extraction attacks?

Knogents employs a two-tier defense. First, vector retrieval uses strict cosine distance thresholds (under 0.28), ensuring that only chunks semantically related to the customer query enter the prompt context. Confidential documents unrelated to the inquiry are never retrieved. Second, hardened system prompt instructions explicitly instruct the model to reject attempts to override operational guardrails.

Does the client widget set third-party tracking cookies on customer browsers?

No. The Knogents embed script (under 20 KB) is completely cookie-free by default. It manages temporary session state through ephemeral browser sessionStorage, ensuring full compliance with international privacy frameworks without requiring complex cookie consent banners.

What happens to our company data if we delete a document or close our account?

Document deletion in Knogents is immediate and permanent. When an administrator removes a PDF, sitemap, or spreadsheet, its vector embeddings and raw chunk text are immediately purged from PostgreSQL database clusters with zero residual caching.

Continue Reading Our Research

Related Architectural Research

Deepen your understanding of retrieval-augmented generation and vector databases.

Production Industry Solutions

See how these architectural principles are implemented in production AI agents.

24/7 STOREFRONT ASSISTANT

Build an AI Agent Grounded in Your Enterprise Knowledge

Index your sitemaps, PDFs, and spreadsheets with header preservation and strict cosine thresholding.

Free tier includes 100 messages/mo
No credit card required
Under 20 KB vanilla script