UnieAI Studio

UnieAI KB Super Search

Search complete parsed knowledge-base documents from Studio, REST, MCP and agents.

UnieAI KB Super searches complete parsed text. Start with a short query. Results contain the source document, matching line number, and a text preview. Use kb_fetch to read nearby lines before drawing a conclusion.

To use KB tools in an agent, choose UnieAI Harness or UnieAI Harness Lite and connect an authorized knowledge base. The general-model engine does not call KB or other tools. You can also search independently in the KB Search page or REST API; doing so does not enable tools for a general-model engine.

Search in Studio

Open a knowledge base and select Search. Enter a term or regular expression and set the number of results. This page matches the entered pattern directly; it does not automatically split a natural-language question into terms. Search is scoped to that knowledge base. The document view shows the parsed Markdown used by KB Super.

REST API

curl -X POST "$UNIEAI_RUNTIME_BASE_URL/v1/kb/search" \
  -H "Authorization: Bearer $UNIEAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kb_id":"kb_abc123","query":"invoice","mode":"unieai_kb_supra","limit":8}'

kb_id and query are required. limit is 1–50. document_id restricts the search to one document. The response reports mode: "unieai_kb_supra" and includes document and line references. The old hybrid request value is accepted for compatibility but runs KB Super.

Remote MCP and agents

Connect an MCP client to POST {RUNTIME_BASE_URL}/v1/mcp/kb-search with a platform API key. The kb_search tool accepts query, kb_id, limit, and document_id. A Customize Model agent searches its bound knowledge bases, can issue several focused searches, and can call kb_fetch for surrounding lines. No LLM keyword planner, BM25 ranking, embedding, or vector database participates in KB search.

Agent kb_search and POST /v1/kb/search first match the complete query and then try terms or Chinese character groups if nothing matches. If evidence is insufficient, search distinctive names, IDs, clauses or alternative short terms. For explicit regular expressions, use kb_grep with regex: true, for example invoice|receipt; the query of those two general search interfaces is not a regular-expression parameter.

For line-level search, the scope of a file-name pattern, context lines, exact counts, or paging, use the kb_grep tool — see Search a Knowledge Base Like a Folder.

Access and versions

API-key access, bound knowledge bases, pinned marketplace document sets, and as_of_date snapshots still limit which files can be searched. Search uses the active parsed document version. Open the cited source to verify its context; use complete worksheets for counts, sums and rankings.

See Search a Knowledge Base Like a Folder, Page-Aware RAG Architecture and Search Strategy and Tuning.