agent-platform-rag-engine-management
Skill này làm gì
Skill dùng Agent Platform Python SDK để duyệt các corpus và file của RAG Engine, lấy ngữ cảnh liên quan và tạo câu trả lời dựa trên dữ liệu đó. Skill dành cho lập trình viên xây dựng AI dựa trên truy xuất trên Google Cloud.
Khi nào nên dùng
- ✓Khi bạn muốn xem trong dự án có những corpus hoặc file RAG nào.
- ✓Khi bạn muốn lấy các đoạn văn liên quan từ một corpus để trả lời câu hỏi.
- ✓Khi bạn muốn câu trả lời của mô hình được căn cứ trên corpus RAG của bạn.
Liên kết skill
https://github.com/google/skills/blob/main/skills/cloud/agent-platform-rag-engine-management/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Liệt kê các corpus RAG của tôi trên Agent Platform, rồi tìm các đoạn nói về chính sách hoàn tiền của chúng tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê và đọc corpus tự do, truy xuất ngữ cảnh khớp với truy vấn, và yêu cầu bạn xác nhận trước mọi lệnh tạo nội dung có dùng tài nguyên tính toán.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Agent Platform RAG Engine Management
This skill provides instructions on how to interact with Agent Platform RAG
Engine using the Agent Platform Python SDK. You MUST use the vertexai Python
SDK to perform RAG Engine operations, rather than raw REST calls or MCP tools,
because this code is intended to be run by external clients.
Safety & Confirmation Tiers (CRITICAL)
Before executing any commands or scripts on behalf of the user, you must adhere to the following safety tiers based on the action requested:
Tier R: Read-only (
list_corpora,list_files,get_corpus,retrieval_query)- No confirmation needed. Execute immediately to gather information or retrieve grounded contexts.
Tier RC: Read-only but consumes Compute Resources (
client.models.generate_content)Requires interactive confirmation with 'Yes'/'No' options before executing grounded content generation. The confirmation prompt MUST clearly explain the proposed generation execution and its key parameters (e.g., target corpus ID, query text, target model). Natural-language paraphrases without specifying exact parameters are insufficient, as explicit parameter listing is required to ensure unambiguous user approval of the specific resource and configuration.
Same-turn restriction: Do not execute the generation code in the same turn as presenting the confirmation prompt. Stop and wait for the user's reply; only execute after explicit 'Yes' / approval.
Gold Standard Example:
I will perform grounded content generation with the following parameters. Please confirm this information before I proceed:
- Target Corpus ID:
projects/123/locations/us/ragCorpora/abc - Target Model:
gemini-2.5-pro - Query Text: "What are the company policies on remote work?"
Do you confirm? [Yes/No]
- Target Corpus ID:
Phase 0: Environment Setup
CRITICAL: Before running any of the Python snippets below, you must ensure the environment is correctly initialized by following these steps:
Google Cloud Authentication: Authenticate with your Google Cloud credentials and configure active Application Default Credentials (ADC) for Agent Platform access:
gcloud auth login gcloud auth application-default loginPython Dependencies: This skill needs
google-cloud-aiplatformandgoogle-genai, which the sandbox already provides. Do not create a virtual environment — it starts empty and hides packages the environment already provides, forcing a redundant install. Do not spend a separate command checking for them: run the snippet directly, and only if it fails withModuleNotFoundError, install in the same command as the retry:pip install -q google-cloud-aiplatform google-genai && python3 - <<'PY' ... PYExecution: Run each snippet as a quoted heredoc,
python3 - <<'PY'...PY, rather thanpython3 -c '...', whose nested quotes break easily. There is no environment to activate first. When one step needs several of the snippets below (for example, list the corpora and then the files in each), combine them into one script and one command. Thevertexai.preview.ragdeprecation warning printed on stderr is expected; keep using these snippets rather than switching clients because of it.
Workflow Decision Tree
Information Gathering: Has the user provided the Project ID, Region, and Corpus ID?
- No -> Proceed to [1. Listing Corpora and Files] to discover the necessary Resource Names and IDs. Only ask the user if discovery fails.
- Yes -> Proceed.
Task Type: What does the user want to do?
- List Corpora and Files -> Proceed to [1. Listing Corpora and Files].
- Inspect a Corpus -> Proceed to [2. Getting / Inspecting a RAG Engine Corpus].
- Search for Contexts -> Proceed to [3. Retrieving Contexts].
- Answer questions using RAG Engine -> Proceed to [4. Answering the User with Retrieved Context].
[!TIP]
Placeholder Parameter Replacement: The Python scripts below use bracketed string placeholders (like
"{project_id}","{region}", and"{corpus_id}"). You MUST dynamically replace these placeh
Câu hỏi thường gặp
Skill có tạo câu trả lời mà không hỏi không?
Không. Việc tạo nội dung dùng tài nguyên tính toán nên skill xin xác nhận trước.
Skill có bao gồm các sản phẩm RAG khác không?
Không. Google Workspace RAG và gRAG nằm ngoài skill này.
Skill có xử lý truy vấn cơ sở dữ liệu tổng quát không?
Không. Những việc đó thuộc các skill cơ sở dữ liệu khác.
Chi tiết
Mô tả gốc của tác giả
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google Workspace RAG, or other RAG products like gRAG.
repo: google/skills
Độ phổ biến
- Sao GitHub
- 22k
- Vị trí xếp hạng
- #10207
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
finding-google-skills
22kGiúp agent của bạn tìm hướng dẫn Google phù hợp cho việc thiết lập, như hosting, cơ sở dữ liệu, lưu trữ, đăng nhập hoặc phục vụ mô hình AI.
gcloud
22kGiúp agent của bạn viết và kiểm tra các lệnh gcloud của Google Cloud, tra cứu cú pháp chính xác trước khi chạy bất cứ thứ gì để không đoán các flag.
google-cloud-recipe-auth
22kHướng dẫn agent của bạn qua quản lý danh tính và quyền truy cập của Google Cloud, gồm cách con người và dịch vụ đăng nhập và những quyền họ nhận được.
google-cloud-recipe-onboarding
22kHướng dẫn một lập trình viên mới qua các bước đầu tiên trên Google Cloud, gồm chọn dự án, liên kết thanh toán và triển khai tài nguyên đầu tiên.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.