> For the complete documentation index, see [llms.txt](https://docs.clickai.vn/clickai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickai.vn/clickai-docs/nha-phat-trien/giam-sat-hieu-suat-and-phan-tich.md).

# Giám sát hiệu suất & Phân tích

<figure><img src="/files/sCCMQYfgkl6qQpkqQvoW" alt=""><figcaption></figcaption></figure>

## Mục lục

·       \[Tổng quan]\(#tổng-quan)

·       \[Dashboard — Bảng điều khiển]\(#dashboard--bảng-điều-khiển)

·       \[Logs — Nhật ký hoạt động]\(#logs--nhật-ký-hoạt-động)

·       \[Annotation System — Hệ thống ghi chú]\(#annotation-system--hệ-thống-ghi-chú)

·       \[Integrations — Tích hợp bên thứ ba]\(#integrations--tích-hợp-bên-thứ-ba)

&#x20;

## Tổng quan

ClickAI cung cấp bộ công cụ giám sát toàn diện giúp bạn:

·       📈 Theo dõi hiệu suất ứng dụng theo thời gian thực

·       💰 Kiểm soát chi phí token và model usage

·       🐛 Debug các vấn đề trong hội thoại

·       ⭐ Thu thập feedback từ người dùng

·       ✏️ Cải thiện chất lượng phản hồi AI qua annotation

&#x20;

## Dashboard — Bảng điều khiển

Dashboard cung cấp cái nhìn tổng quan về hiệu suất ứng dụng qua các chỉ số chính:

### Các chỉ số theo dõi

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Chỉ số</td><td valign="top">Mô tả</td><td valign="top">Ý nghĩa</td></tr><tr><td valign="top">Total Messages</td><td valign="top">Tổng số tin nhắn</td><td valign="top">Mức độ sử dụng ứng dụng</td></tr><tr><td valign="top">Active Users</td><td valign="top">Số người dùng hoạt động</td><td valign="top">Quy mô người dùng</td></tr><tr><td valign="top">Avg Response Time</td><td valign="top">Thời gian phản hồi trung bình</td><td valign="top">Hiệu suất hệ thống</td></tr><tr><td valign="top">Token Usage</td><td valign="top">Số token đã sử dụng</td><td valign="top">Chi phí vận hành</td></tr><tr><td valign="top">Token Cost</td><td valign="top">Chi phí token quy đổi</td><td valign="top">Ngân sách &#x26; ROI</td></tr><tr><td valign="top">User Satisfaction</td><td valign="top">Tỷ lệ hài lòng (👍/👎)</td><td valign="top">Chất lượng phản hồi</td></tr></tbody></table>

&#x20;

### Bộ lọc thời gian

Bạn có thể xem dữ liệu theo các khoảng thời gian:

·       Last 24 hours — Theo dõi real-time

·       Last 7 days — Xu hướng tuần

·       Last 30 days — Phân tích tháng

·       Custom range — Tùy chỉnh khoảng thời gian

### Biểu đồ trực quan

·       Line Chart: Xu hướng tin nhắn và người dùng theo thời gian

·       Bar Chart: Token usage hàng ngày

·       Pie Chart: Phân bổ đánh giá hài lòng (Positive/Neutral/Negative)

💡 TIP: Theo dõi \*\*Token Cost\*\* thường xuyên để tối ưu chi phí. Nếu chi phí tăng đột biến, hãy kiểm tra xem có workflow nào bị loop hoặc prompt quá dài không.

&#x20;

## Logs — Nhật ký hoạt động

Logs cho phép bạn xem chi tiết từng cuộc hội thoại, debug vấn đề và thu thập feedback.

### Nội dung được ghi lại

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Loại log</td><td valign="top">Chi tiết</td></tr><tr><td valign="top">Conversation Timeline</td><td valign="top">Danh sách tương tác theo thứ tự thời gian</td></tr><tr><td valign="top">Message Details</td><td valign="top">Toàn bộ ngữ cảnh hội thoại với phản hồi AI</td></tr><tr><td valign="top">Performance Data</td><td valign="top">Thời gian phản hồi và token usage mỗi tương tác</td></tr><tr><td valign="top">User Feedback</td><td valign="top">Đánh giá và nhận xét từ người dùng &#x26; team</td></tr></tbody></table>

&#x20;

### Sử dụng Logs Console

Truy cập: Mở ứng dụng → Tab "Logs"

Trong Logs Console, bạn có thể:

1\.     Xem timeline — Duyệt danh sách các cuộc hội thoại

2\.     Chi tiết tin nhắn — Click vào hội thoại để xem toàn bộ nội dung

3\.     Dữ liệu hiệu suất — Thời gian phản hồi, token sử dụng

4\.     Feedback — Xem đánh giá 👍/👎 và comment

### Debug với Logs

Khi ứng dụng AI phản hồi không chính xác:

5\.     Tìm cuộc hội thoại có vấn đề trong Logs

6\.     Xem chi tiết — Kiểm tra prompt, context, và phản hồi

7\.     Phân tích — Xác định nguyên nhân (prompt không rõ, thiếu context, ...)

8\.     Cải thiện — Điều chỉnh prompt hoặc thêm knowledge

### Feedback Collection

ClickAI hỗ trợ thu thập 2 loại feedback:

·       End-user feedback: Người dùng đánh giá 👍/👎 trên giao diện Web App

·       Team feedback: Thành viên team đánh giá và ghi chú trực tiếp trong Logs

### Log Retention — Thời gian lưu trữ

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Gói dịch vụ</td><td valign="top">Thời gian lưu</td></tr><tr><td valign="top">Sandbox</td><td valign="top">30 ngày</td></tr><tr><td valign="top">Professional &#x26; Team</td><td valign="top">Không giới hạn (trong thời gian subscription)</td></tr><tr><td valign="top">Self-hosted</td><td valign="top">Không giới hạn (mặc định), có thể cấu hình</td></tr></tbody></table>

&#x20;

Cấu hình log retention (Self-hosted):

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Biến môi trường</td><td valign="top">Mô tả</td></tr><tr><td valign="top">WORKFLOW_LOG_CLEANUP_ENABLED</td><td valign="top">Bật/tắt tự động dọn log</td></tr><tr><td valign="top">WORKFLOW_LOG_RETENTION_DAYS</td><td valign="top">Số ngày giữ log</td></tr><tr><td valign="top">WORKFLOW_LOG_CLEANUP_BATCH_SIZE</td><td valign="top">Số log xóa mỗi batch</td></tr></tbody></table>

&#x20;

### Cải thiện ứng dụng từ Logs

📋 Quy trình cải thiện liên tục:\
───────────────────────────────\
1\. Thu thập feedback từ Logs\
2\. Xác định pattern lỗi phổ biến\
3\. Điều chỉnh System Prompt\
4\. Bổ sung Knowledge Base\
5\. Tạo Annotation cho câu hỏi thường gặp\
6\. Theo dõi cải thiện qua Dashboard

### Privacy Considerations

🛑 CAUTION: Logs chứa nội dung hội thoại người dùng. Đảm bảo tuân thủ quy định bảo mật dữ liệu: - Hạn chế quyền truy cập Logs cho nhân viên cần thiết - Không chia sẻ dữ liệu logs ra bên ngoài tổ chức - Tuân thủ PDPA / GDPR nếu phục vụ người dùng quốc tế

&#x20;

## Annotation System — Hệ thống ghi chú

Xây dựng thư viện câu trả lời chất lượng cao, cải thiện tính nhất quán và bypass AI generation khi cần.

### Khi nào nên dùng Annotation?

·       📌 Câu hỏi thường gặp cần câu trả lời chuẩn xác

·       🔒 Thông tin nhạy cảm cần kiểm soát chặt chẽ

·       ⚡ Muốn phản hồi nhanh hơn (không cần gọi LLM)

·       🎯 Đảm bảo tính nhất quán cho các câu trả lời quan trọng

### Cách Annotation hoạt động

Người dùng hỏi câu hỏi\
&#x20;       │\
&#x20;       ▼\
Tìm kiếm semantic match trong Annotations\
&#x20;       │\
&#x20;       ├── ✅ Tìm thấy match (> threshold)\
&#x20;       │       → Trả về câu trả lời đã ghi chú\
&#x20;       │\
&#x20;       └── ❌ Không tìm thấy\
&#x20;               → Tiếp tục AI generation bình thường

### Thiết lập Annotation

9\.     Vào ứng dụng → Logs & Annotations → Tab "Annotations"

10\.  Bật Annotation Reply trong settings

11\.  Chọn Embedding Model cho semantic matching

12\.  Cấu hình Similarity Threshold (khuyến nghị: 0.7 - 0.9)

### Tạo Annotation

Cách 1: Từ hội thoại có sẵn

13\.  Trong Debug & Preview hoặc Logs, tìm phản hồi AI tốt

14\.  Click icon "Add Annotation" trên phản hồi

15\.  Chỉnh sửa câu trả lời nếu cần → Lưu

Cách 2: Tạo thủ công

16\.  Vào tab Annotations

17\.  Nhấn "+ Add"

18\.  Nhập câu hỏi mẫu và câu trả lời chuẩn

19\.  Lưu annotation

Cách 3: Import hàng loạt

20\.  Trong tab Annotations, nhấn "..." → "Bulk Import"

21\.  Upload file CSV với format: question, answer

22\.  Xem lại và xác nhận

### Quản lý chất lượng Annotation

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Hành động</td><td valign="top">Mục đích</td></tr><tr><td valign="top">Review hit history</td><td valign="top">Xem annotation nào đang được sử dụng</td></tr><tr><td valign="top">Edit annotations</td><td valign="top">Cập nhật câu trả lời khi thông tin thay đổi</td></tr><tr><td valign="top">Delete unused</td><td valign="top">Xóa annotation không còn phù hợp</td></tr><tr><td valign="top">Bulk export</td><td valign="top">Sao lưu thư viện annotation</td></tr></tbody></table>

<figure><img src="/files/tJi2O2G688IKTzan5wNq" alt=""><figcaption></figcaption></figure>

## Integrations — Tích hợp bên thứ ba

ClickAI hỗ trợ tích hợp với các nền tảng observability bên ngoài:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Nền tảng</td><td valign="top">Mô tả</td></tr><tr><td valign="top">LangSmith</td><td valign="top">Tracing và debugging LLM applications</td></tr><tr><td valign="top">LangFuse</td><td valign="top">Open-source LLM observability</td></tr><tr><td valign="top">Alibaba Cloud</td><td valign="top">Tích hợp monitoring Alibaba Cloud</td></tr></tbody></table>

&#x20;

📝 NOTE: Các tích hợp bên thứ ba cho phép bạn theo dõi chi tiết hơn về LLM calls, latency, và token usage ở mức độ sâu hơn Dashboard mặc định.

&#x20;

*📖 Trước: \[Publish]\(./02-publish.md) · Tiếp: \[Knowledge]*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clickai.vn/clickai-docs/nha-phat-trien/giam-sat-hieu-suat-and-phan-tich.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
