Skip to content

ĐẶC TẢ CÁC USE CASE - AI ASSISTANT

Tài liệu này mô tả các use case thuộc nhóm Trợ lý ảo AI (AI Assistant). AI Agent tích hợp khả năng hiểu ngữ nghĩa (NLU), thực thi hành động (Function Calling), và gợi ý thông minh (Recommendation) cho phân công task.


UC_AI_01 – Create New AI Chat Session | Tác nhân: pm, mem | JWT required

Tạo phiên chat mới. Post: Insert chat_sessions (user_id, title, created_at).

UC_AI_02 – Chat with AI (Send Request / Receive CoT) | Tác nhân: pm, mem | JWT + session ownership

Gửi tin nhắn → AI phân tích intent (NLU) → thực thi function calling hoặc trả lời → lưu message (USER + ASSISTANT) → ghi log ai_logs. Post: Insert chat_messages (2 records), insert ai_logs.

UC_AI_03 – View AI Chat History | Tác nhân: pm, mem | JWT + session ownership

Xem lịch sử các phiên chat và tin nhắn trong từng phiên. Chỉ xem session của chính mình.

UC_AI_04 – View AI Activity Logs (Audit) | Tác nhân: ad, pm, mem | JWT + membership

Xem nhật ký hoạt động AI trong dự án: request, response, reasoning (chain-of-thought), action_taken, tool_output. Dùng cho audit và review.

UC_AI_05 – Request AI Auto-Assignment | Tác nhân: pm | JWT + MANAGER role

PM yêu cầu AI gợi ý phân công. Thuật toán: Skill matching × Availability (workload) × Heuristic weights (system_settings). Kết quả: ranked list với scores. PM chấp nhận hoặc từ chối.

BướcPMHệ thống
1Click "AI Auto-Assign"
2JWT + MANAGER check
3Lấy task required_skills, difficulty
4Lấy heuristic weights từ system_settings
5Query member skills + workloads
6AI tính matching score per member
7Log reasoning vào ai_logs
8Hiển thị ranked suggestion list
9Accept/Reject
10(Accept) Cập nhật assignee_id + workload

Use CaseTênRelated Table
UC_AI_01Create New AI Chat Sessionchat_sessions
UC_AI_02Chat with AIchat_messages, ai_logs
UC_AI_03View AI Chat Historychat_messages
UC_AI_04View AI Activity Logsai_logs
UC_AI_05Request AI Auto-Assignmenttasks, system_settings