Viewing Knowledge Base Details
Function
This API is used to query the knowledge base list, including the knowledge base ID, name, status, creator, creation time, and update time.
URI
GET /v1/{project_id}/applications/{application_id}/uni-search/knowledge-repo/{repo_id}
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
application_id | Yes | String | Definition: Application ID. For details about how to obtain the application ID, see Obtaining an Application ID. Constraints: Character string Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
repo_id | Yes | String | Definition: Knowledge base ID. How to obtain: Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database. Constraints: N/A Value range: Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_). Default value: N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition: Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
id | String | Definition: Knowledge base ID. Value range: N/A |
name | String | Definition: Knowledge base name. Value range: N/A |
detail | String | Definition: Description. Value range: N/A |
repo_type | String | Definition: Knowledge base type Constraints: N/A Value range: |
share_repo_used | Integer | Definition: Number of shared knowledge bases already created. Constraints: This parameter applies to template knowledge bases. Value range: N/A |
share_repo_quota | Integer | Definition: Remaining quota for creating shared knowledge bases. Constraints: This parameter applies to template knowledge bases. Value range: N/A |
tags | Array of TagInfo objects | Definition: Knowledge base tag information. Value range: N/A |
version | String | Definition: Knowledge base version information. Value range: N/A |
refs | String | Definition: List of referenced knowledge base IDs, which are separated by commas (,). Value range: N/A |
status | String | Definition: Status. Value range: |
create_user | String | Definition: User. Value range: N/A |
create_time | String | Definition: Creation time. Value range: N/A |
update_time | String | Definition: Update time. Value range: N/A |
top_k | Integer | Definition: The value of top-K, in the range of 10 to 500. Value range: 10-500 |
prompt | String | Definition: Prompt information. Value range: The value contains a maximum of 8,192 characters. |
common_prompt | String | Definition: General prompt information. Value range: The maximum length is 8,192 characters. |
rerank_enabled | Boolean | Definition: Rerank switch. Value range: |
moderate_enabled | Boolean | Definition: Whether to enable content moderation. Value range: |
query_rewrite_enabled | Boolean | Definition: Rewriting switch. Value range: |
reference_count | Integer | Definition: The number of reference documents. Number of reference documents provided as input to the NLP model along with the query to generate the final answer. Value range: 1-50 |
fields | Array of KnowledgeRepoFieldSchema objects | Definition: Field description. This parameter is not used and is left empty. Value range: N/A |
search_threshold | Float | Definition: Threshold for filtering search interfaces. Value range: When reranking is disabled, the threshold ranges from 0 to 200. When it is enabled, the threshold ranges from 0 to 1. |
chat_ref_threshold | Float | Definition: Reference document filtering threshold. Value range: When reranking is disabled, the threshold ranges from 0 to 200. When it is enabled, the threshold ranges from 0 to 1. |
faq_threshold | Float | Definition: FAQs with a correlation score exceeding this threshold will have their answers directly output, without needing to be summarized by the big model. Precautions:
Value range: When reranking is disabled, the threshold ranges from 0 to 200. When it is enabled, the threshold ranges from 0 to 1. |
embedding_model | String | Definition: Embedding model name. Value range: N/A |
rerank_model | String | Definition: Reranking model name. Value range: N/A |
pangu_nlp_model | String | Definition: NLP model name. Value range: N/A |
search_plan_model | String | Definition: Name of the search planning model. Value range: N/A |
file_extract | FileExtract object | Definition: Document parsing details. Value range: N/A |
search_plan_category_ids | Array of strings | Definition: Search planning categories. Value range: The list can contain a maximum of 10 elements. Each element can contain a maximum of 64 characters. Values: |
language_id | String | Definition: Knowledge base language ID Value range: The value can be: |
cache_enabled | Boolean | Definition: Whether to enable caching. Value range: |
session_config | SessionConfig object | Definition: Cache policy. Value range: N/A |
answer_reference_enabled | Boolean | Definition: Whether to enable referencing. Value range: |
answer_image_reference_enabled | Boolean | Definition: Whether to include both text and images. Value range: |
extend_config | KnowledgeRepoExtendConfig object | Definition: Knowledge base extension configuration. Value range: N/A |
prompt_info | KnowledgeRepoPromptInfo object | Definition: Associated prompts. Value range: N/A |
actions | Array of strings | Definition: Permissions. Value range: N/A |
table_rag_enabled | Boolean | Definition: Whether to use tableRAG. The prerequisite is that an NL2SQL database has been configured for the current cluster. Value range: |
Parameter | Type | Description |
|---|---|---|
tag_key | String | Definition: Knowledge base tag keyword. Constraints: N/A Value range: 1 to 128 characters. Default value: N/A |
tag_value | String | Definition: Knowledge base tag information. Constraints: N/A Value range: 1 to 128 characters. Default value: N/A |
Parameter | Type | Description |
|---|---|---|
name | String | Definition: Field name. Value range: N/A |
field_type | String | Definition: Field type. This parameter is not used and is left empty. Value range: N/A |
name_zh | String | Definition: Field name (Chinese). Value range: N/A |
Parameter | Type | Description |
|---|---|---|
parse_conf | ParseConfReq object | Definition: Document parsing configuration, including whether to use OCR enhancement, whether to parse images, whether to extract text during image parsing, whether to parse the header and footer, and whether to parse the contents page. Constraints: N/A Value range: N/A Default value: N/A |
split_conf | SplitConf object | Definition: Split configuration, including the segmentation mode, level parsing mode, title level depth, title saving mode, segment length, and title matching pattern. Constraints: N/A Value range: N/A Default value: N/A |
Parameter | Type | Description |
|---|---|---|
ocr_enabled | Boolean | Definition: OCR enhancement. Constraints: N/A Value range: Default value: false |
mllm_enabled | Boolean | Definition: Multimodal enhancement. Constraints: N/A Value range: Default value: false |
mllm_model | String | Definition: Multimodal model name. Constraints: The mllm_plan model must have already been configured on the platform. You can check the models configured on the platform using the ListModels API. Value range: The value can contain 1 to 32 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter or digit. Default value: N/A |
image_enabled | Boolean | Definition: Image parsing. Constraints: N/A Value range: Default value: false |
header_footer_enabled | Boolean | Definition: Parse the header and footer. Constraints: N/A Value range: Default value: false |
catalog_enabled | Boolean | Definition: Parse the contents page. Constraints: N/A Value range: Default value: false |
image_conf | String | Definition: Image parsing mode used when image parsing is enabled (image_enable is set to True). Constraints: To return answers with images, you must use the IMAGE mode and retain original images. Value range: Default value: TEXT |
footnote_enabled | Boolean | Definition: Parse footnotes. Constraints: N/A Value range: Default value: false |
Parameter | Type | Description |
|---|---|---|
similarity_threshold | Float | Definition: Query2query similarity threshold for cache hit. A higher threshold indicates a higher similarity between the new query and the cached query is required. Constraints: N/A Options: 0.1 ~ 1.0 Default value: 0.9 |
answer_select_policy | String | Definition: Cache hit selection policy. Constraints: N/A Value range: The value can be: Default value: N/A |
eviction | Eviction object | Definition: Cache expiration policy. Constraints: N/A Value range: N/A Default value: N/A |
model_name | String | Definition: Name of the query2query model used to calculate the similarity between the new query and the cached query when there is a hit. Constraints: N/A Value range: 1 to 64 characters. Default value: N/A |
Parameter | Type | Description |
|---|---|---|
prompt_id | String | Definition: Prompt ID. Constraints: N/A Value range: The value can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. Default value: N/A |
qa_question_prompt_id | String | Definition: QA question generation prompt ID. Constraints: N/A Value range: The value can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. Default value: N/A |
qa_answer_prompt_id | String | Definition: QA answer generation prompt ID Constraints: N/A Value range: The value can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. Default value: N/A |
mllm_prompt_id | String | Definition: ID of the mllm prompt. Constraints: N/A Value range: The value can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. Default value: N/A |
table_rag_config | String | Definition: Prompts related to tabular enhancement, including: chat_prompt_with_sqlresults_id: Q&A prompts for tabular enhancement nl2sql_prompt_id: prompt for generating SQL statements table_rag_prompt_id: tabular Q&A prompt Constraints: N/A Value range: 1 to 512 characters. Default value: N/A |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition: Value range: N/A |
error_msg | String | Definition: Error message. Value range: N/A |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition: Value range: N/A |
error_msg | String | Definition: Error message. Value range: N/A |
Example Requests
View knowledge base details.
/v1/1ed40ceefc8d40f8b884edb6a84e7768/applications/fb9731ab-7085-474f-b6c7-64473586f0f3/uni-search/knowledge-repo/5bb86225-e2ea-4404-8125-aaa3b79419ad
Example Responses
Status code: 200
Response body of knowledge base details.
{
"id" : "1234545",
"name" : "Knowledge base 123",
"detail" : "Financial knowledge base",
"status" : "OPEN",
"create_user" : "",
"create_time" : "",
"update_time" : "1693921595857",
"fields" : [ {
"name" : "id",
"field_type" : "keyword",
"name_zh" : "id"
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Response body of knowledge base details. |
400 | Incorrect request body parameter. |
500 | Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
