# Search Knowledge Base
URL: /reference/blocks/context-engine-search-knowledge-base
Type: reference
Description: Search synced knowledge base documents using semantic search with automatic reranking
Keywords: search knowledge base, context-engine/search-knowledge-base, integrations, context_engine, block, workflow builder
`context-engine/search-knowledge-base` — Search synced knowledge base documents using semantic search with automatic reranking.

Where it appears [#where-it-appears]

The **Search Knowledge Base** block lives in the **Integrations** group of the Workflow Builder. Connect the Context Engine integration before adding it.

Fields [#fields]

| Field             | Type                       | Required | Default | Description                                                                                            |
| ----------------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------ |
| `knowledgeBaseId` | select                     | Yes      | —       | The synced knowledge base to search. Choose from the knowledge bases configured for your organization. |
| `searchQuery`     | text (supports references) | Yes      | —       | The text to search for.                                                                                |
| `topK`            | number                     | No       | `5`     | Maximum number of documents to return                                                                  |
| `minScore`        | number                     | No       | `15`    | Only return results above this relevance threshold.                                                    |

Inputs and outputs [#inputs-and-outputs]

Inputs are the configurable fields above. The block produces these outputs:

**Outputs**

Reference an output downstream with `<Search Knowledge Base.field>`.

| Name         | Type   | Description                       |
| ------------ | ------ | --------------------------------- |
| `results`    | array  | Array of matching documents       |
| `count`      | number | Number of results returned        |
| `confidence` | json   | Search confidence level and score |
| `meta`       | json   | Search metadata                   |

Example [#example]

A minimal configuration for this block:

```json
{
  "type": "context-engine/search-knowledge-base",
  "config": {
    "knowledgeBaseId": "...",
    "searchQuery": "<PreviousStep.field>",
    "topK": 5,
    "minScore": 15
  }
}
```

Limits and failure modes [#limits-and-failure-modes]

* Requires a connected Context Engine integration. Calls fail if that integration is disconnected or its authorization has expired.
* Required fields (`knowledgeBaseId`, `searchQuery`) must be set, or the block fails validation before it runs.

Related [#related]

* [All workflow blocks](/reference/blocks)
* [Workflow Builder overview](/workflow-builder-overview)
* [Integrations](/integrations)