Search and query knowledge bases directly from the terminal with the Bailian CLI.
The Bailian CLI wraps knowledge-base search and Q&A into commands you can drive from the terminal or an Agent.
Append
Knowledge-base CLI capabilities are currently available only to China site (aliyun.com) accounts.
Commands
| Capability | Command | Notes | Common options |
|---|---|---|---|
| Semantic search | bl knowledge search | Calls a published retrieval service to run semantic search | --query query text, --agent-id retrieval service ID |
| RAG Q&A | bl knowledge chat | Calls a published Q&A service for RAG Q&A with streaming output | --message message text, --agent-id Q&A service ID |
| Direct retrieval (deprecated) | bl knowledge retrieve | Retrieves directly against a knowledge base; use search instead | --index-id knowledge base ID, --query query text |
Example
--help to any command for full parameter details. See the RAG command reference for more commands.