---
title: "Updates a knowledge"
method: PATCH
path: "/v2/knowledge/{knowledge_id}"
tags: ["Knowledge Bases"]
---

# Updates a knowledge

`PATCH /v2/knowledge/{knowledge_id}`

## Path parameters

- `knowledge_id` string, required — The unique identifier of the knowledge base

## Request body

- union
  - object
    - `description` string, nullable — The description of the knowledge base.
    - `path` string — Entity storage path. With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`. With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
    - `retrieval_settings` object — The retrieval settings for the knowledge base.
      - `top_k` integer — The number of results to return from the search.
      - `threshold` number — The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
      - `rerank_config` object, nullable — The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
        - `top_k` integer — The number of results to return by the reranking model
        - `rerank_threshold` number — The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
        - `rerank_model` string, required — The rerank model to use for the knowledge base.
      - `agentic_rag_config` object, nullable — The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
        - `model` string, required — The model to use for the Agentic RAG
    - `external_config` object — Configuration for the external knowledge base.
      - `name` string — The name of the external knowledge base.
      - `api_url` string, uri — The API URL for the external knowledge base.
      - `api_key` string — The API key for the external knowledge base.
    - `type` 'external'
  - object
    - `description` string, nullable — The description of the knowledge base.
    - `embedding_model` string — The embeddings model used for the knowledge base. If the models is provided and is different than the previous set model, all the datasources in the knowledge base will be re-embedded.
    - `path` string — Entity storage path. With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`. With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
    - `retrieval_settings` object — The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
      - `retrieval_type` 'vector_search' | 'keyword_search' | 'hybrid_search' — The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
      - `top_k` integer — The number of results to return from the search.
      - `threshold` number — The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
      - `rerank_config` object, nullable — The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
        - `top_k` integer — The number of results to return by the reranking model
        - `rerank_threshold` number — The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
        - `rerank_model` string, required — The rerank model to use for the knowledge base.
      - `agentic_rag_config` object, nullable — The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
        - `model` string, required — The model to use for the Agentic RAG
    - `type` 'internal'

## Response `200`

Knowledge successfully updated

- union
  - object
    - `_id` string, required — The unique identifier of the knowledge base.
    - `created` string, required — The creation date of the knowledge base.
    - `description` string, nullable — The description of the knowledge base.
    - `key` string, required — The unique key of the knowledge base.
    - `domain_id` string, required — The project/domain ID of the knowledge base.
    - `path` string — Entity storage path. With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`. With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `updated` string, required — The last update date of the knowledge base.
    - `type` 'internal'
    - `retrieval_settings` object — The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
      - `retrieval_type` 'vector_search' | 'keyword_search' | 'hybrid_search' — The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
      - `top_k` integer — The number of results to return from the search.
      - `threshold` number — The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
      - `rerank_config` object, nullable — The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
        - `top_k` integer — The number of results to return by the reranking model
        - `rerank_threshold` number — The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
        - `rerank_model` string, required — The rerank model to use for the knowledge base.
      - `agentic_rag_config` object, nullable — The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
        - `model` string, required — The model to use for the Agentic RAG
    - `model` string, required — The embeddings model used for the knowledge base.
  - object
    - `_id` string, required — The unique identifier of the knowledge base.
    - `created` string, required — The creation date of the knowledge base.
    - `description` string, nullable — The description of the knowledge base.
    - `key` string, required — The unique key of the knowledge base.
    - `domain_id` string, required — The project/domain ID of the knowledge base.
    - `path` string — Entity storage path. With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`. With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `updated` string, required — The last update date of the knowledge base.
    - `type` 'external'
    - `retrieval_settings` object — The retrieval settings for the knowledge base.
      - `top_k` integer — The number of results to return from the search.
      - `threshold` number — The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
      - `rerank_config` object, nullable — The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
        - `top_k` integer — The number of results to return by the reranking model
        - `rerank_threshold` number — The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
        - `rerank_model` string, required — The rerank model to use for the knowledge base.
      - `agentic_rag_config` object, nullable — The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
        - `model` string, required — The model to use for the Agentic RAG
    - `external_config` object, required
      - `name` string, required — The name of the external knowledge base.
      - `api_url` string, uri, required — The API URL of the external knowledge base.

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/versions/6a22c53a2580/schema)
