TQH Studio
TQH Studio
TQH LAB2026AI Engineer & Product Builder

Enterprise Policy & Pricing Intelligence Assistant

A targeted RAG assistant engineered to answer customer inquiries strictly from verified documents to reduce unsupported responses.

CÔNG NGHỆ & HẠ TẦNG SỬ DỤNG
PythonOpenAI EmbeddingsSupabase pgvectorNext.js Edge APITelegram Webhook
01 // THE CHALLENGE & CONTEXT

Bài Toán & Bối Cảnh Thực Tế

Off-the-shelf ChatGPT integrations answer unpredictably, inventing discounts, quoting obsolete terms, or guessing return policies when queried by prospective customers. Rule-based chatbots are too brittle to understand natural conversational intent.

02 // REQUIREMENTS & CONSTRAINTS

Yêu Cầu & Ràng Buộc Kỹ Thuật

REQ-1

Grounded retrieval: Answers must be 100% cited from approved internal policy and price documentation.

REQ-2

Explicit fallback: The assistant must decline answering when information is absent from source chunks.

REQ-3

Automated sales lead detection with instant staff notification.

03 // ARCHITECTURAL SOLUTION

Giải Pháp Kiến Trúc Cốt Lõi

We built a Retrieval-Augmented Generation (RAG) assistant using Supabase pgvector. Internal policy documents are chunked and embedded with vector representations. When a query is received, high-dimensional cosine similarity locates the top 3 relevant chunks, which are injected into a gated system prompt that forbids extrapolating beyond the text.

PostgreSQL Vector Search via pgvector

Embeddings are indexed directly inside relational database tables, eliminating the need for expensive third-party vector databases.

Gated System Prompt Engineering

System instructions enforce strict epistemic boundaries: If the source chunk does not contain the answer, the model gracefully redirects to human staff.

Real-Time Lead Extraction Hook

A background function scans conversational intent for contact requests and immediately forwards prospective client inquiries to Telegram.

Các Hạng Mục Đã Chuyển Giao

Document chunking and automated vector ingestion pipeline
Lightweight embeddable chat widget with typing indicators
Instant Telegram notification dispatcher for sales leads

Bài Học Thực Chiến & Đúc Kết Kỹ Thuật

Constraining the LLM context window to verified internal documents significantly reduces unsupported answers while delivering instant 24/7 responsiveness under defined test queries.

Cần hiện thực hóa một sản phẩm số tương tự?

Chúng tôi trực tiếp phân tích yêu cầu, tư vấn kiến trúc và đồng hành thực hiện từ ý tưởng đến chuyển giao hoàn tất.

Bắt Đầu Trao Đổi Dự Án