Kiến trúc Lead Stage AI được thiết kế theo dạng **Micro-modular pipeline** dựa trên LangGraph, tách biệt hoàn toàn giữa việc *phân loại ý định* (Classifier) và *sinh ngôn ngữ* (Stylist).
Kiến trúc Lead Stage AI được thiết kế theo dạng **Micro-modular pipeline** dựa trên LangGraph, tách biệt hoàn toàn giữa việc *phân loại ý định* (Classifier) và *sinh ngôn ngữ* (Stylist).
<divclass="mermaid">
graph TD
%% Styling
classDef user fill:#a5d8ff,stroke:#4a9eed,stroke-width:2px,color:#000,rx:8,ry:8
Thay vì dùng một Agent to (monolith) để làm mọi thứ, hệ thống chia làm 2 AI:
Thay vì dùng một Agent to (monolith) để làm mọi thứ, hệ thống chia làm 2 AI:
1.**AI #1 (Classifier + Tool Router):** Chuyên trách đọc câu hỏi của user, lịch sử chat (`user_insight`, `chat_history_summary`) để quyết định xem user đang ở Stage nào (Awareness, Interest, Consideration, Decision, Retention) và gọi Tool tương ứng (ví dụ: `lead search tool`, `check is stock`).
1.**AI #1 (Classifier + Tool Router):** Chuyên trách đọc câu hỏi của user, lịch sử chat (`user_insight`, `chat_history_summary`) để quyết định xem user đang ở Stage nào (Awareness, Interest, Consideration, Decision, Retention) và gọi Tool tương ứng (ví dụ: `lead search tool`, `check is stock`).
Tài liệu này mô tả chi tiết thiết kế các bảng dữ liệu chính từ nguồn `shared_source` (StarRocks/MySQL) được sử dụng để tích hợp vào hệ thống Chatbot AI.
"description":"Tài liệu thiết kế cơ sở dữ liệu chi tiết, bao gồm các bảng từ nguồn StarRocks (shared_source) và PostgreSQL/SQLite (dashboard_canifa).",
"sections":[
{
"id":"main-tables",
"title":"Các bảng dữ liệu chính (Shared Source)",
"type":"markdown",
"file":"01_tables.md"
},
{
"id":"other-tables",
"title":"Tất cả các bảng trong hệ thống (All Tables)",