Xpersona
A

Alibabacloud Analyticdb Postgresql Knowledgebase Ops

CLAWHUB · Unverified

ADBPG Knowledge Base Management: Create knowledge bases, upload documents, search, Q&A. Triggers: "knowledge base", "document library", "document upload", "k... Skill: Alibabacloud Analyticdb Postgresql Knowledgebase Ops Owner: sdk-team Summary: ADBPG Knowledge Base Management: Create knowledge bases, upload documents, search, Q&A. Triggers: "knowledge base", "document library", "document upload", "k... Tags: latest:0.0.2 Version history: v0.0.2 | 2026-04-29T03:15:58.786Z | auto **Adds strict AI-mode and User-Agent enforcement for all CLI operations.** - Enforces use of aliy

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-analyticdb-postgresql-knowledgebase-ops
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-analyticdb-postgresql-knowledgeba/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

138,451 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alibabacloud-analyticdb-postgresql-knowledgebase-ops
description: |
  ADBPG Knowledge Base Management: Create knowledge bases, upload documents, search, Q&A.
  Triggers: "knowledge base", "document library", "document upload", "knowledge search", "RAG", "Q&A", "embedding", "ADBPG", "AnalyticDB PostgreSQL"
---

# ADBPG Knowledge Base Management

Build enterprise knowledge bases in three steps: **Create Knowledge Base → Upload Documents → Search & Q&A**

The system automatically handles document parsing, chunking, vectorization, and index building. Users only need to focus on business logic.

**Architecture**: `ADBPG Instance + Namespace + DocumentCollection + Vector Index + LLM Service`

## Core Concepts

- **Knowledge Base**: Container for documents, automatically manages vector indexes (corresponds to DocumentCollection in API)
- **Document**: Files uploaded to the knowledge base, supports PDF/Word/Markdown/HTML/JSON/CSV/images, etc.
- **Q&A**: Intelligent conversation based on knowledge base + large language model

---

## Environment Setup

**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include:
`--user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops`

> **[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution.
> Run the following commands before any CLI invocation:
> ```bash
> aliyun configure ai-mode enable
> aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops"
> ```

> **[MUST] Disable AI-Mode at EVERY exit point** — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed.
> AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.
> ```bash
> aliyun configure ai-mode disable
> ```

> **Pre-check: Aliyun CLI >= 3.3.3 required**
> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,
> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update,
> or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions.
> Then **[MUST]** run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.
> Then **[MUST]** run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date.

> **Pre-check: Alibaba Cloud Credentials Required**
>
> **Security Rules:**
> - **NEVER** read, echo, or print credential material (including environment-based secrets)
> - **NEVER** ask the user to paste long-lived secrets directly in the conversation or command line
> - **NEVER** use `aliyun configure set` with literal credential values
> - **ONLY** use `aliyun configure l

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-analyticdb-postgresql-knowledgebase-ops",
  "version": "0.0.2",
  "publishedAt": 1777432558786
}

references/acceptance-criteria.md

# Acceptance Criteria - ADBPG Knowledge Base Management

**Scenario**: ADBPG Knowledge Base Management Skill  
**Purpose**: Skill testing acceptance criteria

## Table of Contents

- [1. CLI Command Pattern Verification](#1-cli-command-pattern-verification)
- [2. Python SDK Code Pattern Verification](#2-python-sdk-code-pattern-verification)
- [3. Workflow Verification](#3-workflow-verification)
- [4. Parameter Verification](#4-parameter-verification)
- [5. Security Checks](#5-security-checks)
- [6. Error Handling Checks](#6-error-handling-checks)
- [Checklist](#checklist)

---

## 1. CLI Command Pattern Verification

### 1.1 Product Name Verification

#### ✅ CORRECT
```bash
aliyun gpdb describe-regions
aliyun gpdb init-vector-database
aliyun gpdb create-document-collection
```

#### ❌ INCORRECT
```bash
# Wrong: Product name should be gpdb, not adbpg
aliyun adbpg describe-regions

# Wrong: Product name should be lowercase
aliyun GPDB describe-regions
```

### 1.2 Command Format Verification (Plugin Mode)

#### ✅ CORRECT - Plugin mode (lowercase with hyphens)
```bash
aliyun gpdb describe-regions
aliyun gpdb init-vector-database
aliyun gpdb create-namespace
aliyun gpdb create-document-collection
aliyun gpdb upload-document-async
aliyun gpdb query-content
```

#### ❌ INCORRECT - Traditional API mode (CamelCase)
```bash
# Wrong: Should use plugin mode with lowercase hyphens
aliyun gpdb DescribeRegions
aliyun gpdb InitVectorDatabase
aliyun gpdb CreateNamespace
aliyun gpdb CreateDocumentCollection
```

### 1.3 Parameter Name Format Verification

#### ✅ CORRECT - Lowercase with hyphens
```bash
aliyun gpdb create-document-collection \
  --biz-region-id cn-hangzhou \
  --db-instance-id gp-xxxxx \
  --manager-account admin \
  --manager-account-password 'pass' \
  --collection my_kb \
  --embedding-model text-embedding-v4 \
  --dimension 1024
```

#### ❌ INCORRECT - CamelCase parameter names
```bash
# Wrong: Parameter names should be lowercase with hyphens
aliyun gpdb create-document-collection \
  --RegionId cn-hangzhou \
  --DBInstanceId gp-xxxxx \
  --ManagerAccount admin
```

### 1.4 User-Agent Must Be Present

#### ✅ CORRECT
```bash
aliyun gpdb describe-regions --user-agent AlibabaCloud-Agent-Skills
aliyun gpdb query-content --content "test" --user-agent AlibabaCloud-Agent-Skills
```

#### ❌ INCORRECT
```bash
# Wrong: Missing --user-agent parameter
aliyun gpdb describe-regions
aliyun gpdb query-content --content "test"
```

---

## 2. Python SDK Code Pattern Verification

### 2.1 Import Paths

#### ✅ CORRECT
```python
from alibabacloud_gpdb20160503.client import Client
from alibabacloud_gpdb20160503 import models
from alibabacloud_tea_openapi.models import Config
from alibabacloud_tea_util.models import RuntimeOptions
```

#### ❌ INCORRECT
```python
# Wrong: Incorrect package name
from alibabacloud_gpdb.client import Client
from alibabacloud_adbpg.client import Client

# Wrong: Incorrect version number
from alibabacloud_gpdb20200101.client import Clien

references/cli-installation-guide.md

# Aliyun CLI Installation & Configuration Guide

Complete guide for installing and configuring Aliyun CLI.

## Table of Contents

- [Installation](#installation)
- [Configuration](#configuration)
- [Verification](#verification)
- [Security Best Practices](#security-best-practices)
- [Troubleshooting](#troubleshooting)
- [Advanced Configuration](#advanced-configuration)
- [Next Steps](#next-steps)
- [References](#references)

> **Aliyun CLI 3.3.3+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.3 or later for full plugin ecosystem coverage.

## Installation

### macOS

**Using Homebrew (Recommended)**
```bash
brew install aliyun-cli
# Upgrade to latest
brew upgrade aliyun-cli

# Verify version (>= 3.3.3)
aliyun version
```

**Using Binary**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz

# Extract
tar -xzf aliyun-cli-macosx-latest-amd64.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

### Linux

**Debian/Ubuntu**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

**CentOS/RHEL**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

**ARM64 Architecture**
```bash
# Download ARM64 version
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-arm64.tgz
sudo mv aliyun /usr/local/bin/
```

### Windows

**Using Binary**
1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip
2. Extract the ZIP file
3. Add the directory to your PATH environment variable
4. Open new Command Prompt or PowerShell
5. Verify: `aliyun version`

**Using PowerShell**
```powershell
# Download
Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip"

# Extract
Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli

# Add to PATH (requires admin privileges)
$env:Path += ";C:\aliyun-cli"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)

# Verify
aliyun version
```

## Configuration

### Quick Start

```bash
aliyun configure set \
  --mode AK \
  --access-key-id <your-access-key-id> \
  --access-key-secret <your-access-key-secret> \
  --region cn-hangzhou
```

All `aliyun configure` commands support non-interactive flags, which is the recommended approach —
it works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.

**Where to Get Access Keys**

1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save t

references/interaction-guidelines.md

# Interaction Guidelines - ADBPG Knowledge Base Management

## Table of Contents

- [AskUserQuestion Usage Principles](#askuserquestion-usage-principles)
- [Information Collection Strategy](#information-collection-strategy)
- [Smart Defaults](#smart-defaults)
- [Best Practices](#best-practices)

---

## AskUserQuestion Usage Principles

AskUserQuestion should **only be used for limited option selections**, not for free-form input:

| Scenario | Usage |
|----------|-------|
| Chunking strategy selection (General/Technical/FAQ/Legal) | AskUserQuestion |
| Yes/No confirmation | AskUserQuestion |
| Guiding when user intent is unclear | AskUserQuestion |
| File paths, URLs, passwords, instance IDs, knowledge base names | **Collect via text conversation**, not AskUserQuestion |

> **Anti-pattern**: Don't put "Let me input" as an AskUserQuestion option. Users cannot enter free-form text in options. For free-form input, simply ask in your reply text.

---

## Information Collection Strategy

### When Creating a Knowledge Base

Collect via text conversation:

```
Please provide the following information:
1. Instance ID (format: gp-bp1234567890)
2. Manager account name
3. Manager account password
4. Namespace password (needed for upload/search/Q&A, recommend different from manager password)
5. Knowledge base name (lowercase letters and underscores)
```

### When Uploading Documents

Collect via text conversation:

```
Please provide the file source:
- Public URL: Give me the link directly
- Local file: Give me the file path, e.g., /Users/xxx/docs/manual.pdf
- Local directory: Give me the directory path, e.g., /Users/xxx/docs/, I'll scan supported files
```

---

## Smart Defaults

### Text Knowledge Base

| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Namespace | ns_{collection} | Prefixed with collection name, **public is forbidden** |
| EmbeddingModel | text-embedding-v4 | Recommended for text, 1024 dimensions |
| Dimension | 1024 | Vector dimension (text) |
| Metrics | cosine | Cosine similarity |
| TopK | 10 | Return 10 results |
| RerankFactor | 5 | Rerank factor, maximize retrieval precision |
| DocumentLoaderName | ADBPGLoader | Most format support |
| ChunkSize | 500 | Chunk size, works with reranker for precision |
| ChunkOverlap | 50 | Chunk overlap, ~10% of ChunkSize |
| Model (Q&A) | qwen-max | Qwen model |

### Image Knowledge Base

| Parameter | Value | Description |
|-----------|-------|-------------|
| EmbeddingModel | qwen3-vl-embedding | Multimodal vision model |
| Dimension | 2560 | Vision model default dimension |

> **Note**: Image and text knowledge bases cannot share the same Collection due to different EmbeddingModel and Dimension. Create them separately.

### Chunking Strategies

| Scenario | ChunkSize | ChunkOverlap | Suitable Documents |
|----------|-----------|--------------|-------------------|
| **General** (default) | 500 | 50 | Most documents |
| Technical docs | 800 | 100 | Manuals

Sponsored

Ads related to Alibabacloud Analyticdb Postgresql Knowledgebase Ops and adjacent AI workflows.