You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.6 KiB
1.6 KiB
| name | description |
|---|---|
| describe-entity | Xem chi tiết một hồ sơ theo entity_code — metadata, danh sách files, trạng thái index. Dùng khi user hỏi sâu về một record cụ thể. |
Describe Entity
Khi nào dùng
- "Cho tôi chi tiết hồ sơ TBMT-2026-001"
- "Hồ sơ X có bao nhiêu file?"
- "Trạng thái index của KHLCNT-... ?"
- "File chính của hồ sơ này tên gì?"
Workflow
- Cần
entity_codechính xác. Nếu user nói mơ hồ ("hồ sơ A", "cái gói thầu hôm qua"):- Hỏi lại để clarify, hoặc
- Dùng
list_entitiesđể tìm trước rồi xác nhận với user.
- Gọi
describe_entity(entity_code="<mã>"). - Xử lý lỗi:
- Tool raise
entity_not_found→ thông báo user "Không tìm thấy hồ sơ <mã>", gợi ý dùnglist_entitiesđể xem danh sách.
- Tool raise
- Nếu OK: trả lời gồm:
- Metadata: type, status, ngày tạo / cập nhật.
- Bảng files: mỗi row có
id(cần chofetch-raw-file),file_name,file_type,size.
Ví dụ
User: "Chi tiết hồ sơ TBMT-2026-001"
Agent:
→ describe_entity(entity_code="TBMT-2026-001")
← {entity: {...}, files: [{id: 10, file_name: "main.pdf", ...}, ...]}
Reply: metadata + bảng files với cột id để user/agent có thể tham chiếu khi cần download.
Anti-patterns
- ❌ Đừng đoán entity_code — phải hỏi nếu user mơ hồ.
- ❌ Đừng tóm tắt nội dung file dựa vào file_name — đó là việc của
search_procurement_docs. - ❌ Đừng giấu
idcủa file — agent/user cầnidđể tải file gốc quafetch_raw_file_url.