> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/admin/10.0/workflow-applications/semanticsearch.md).

# SEMANTICSEARCH

The **SEMANTICSEARCH** workflow application performs a hybrid full-text and semantic search on requests, with customizable filters and scoring. It returns structured JSON results for use in process logic.

## Required parameters

<table><thead><tr><th width="264.63531494140625" valign="top">Parameter</th><th width="113.991455078125" valign="top">Type</th><th width="114.91168212890625" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>QUERY</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">The main search query (full-text and similarity)</td></tr><tr><td valign="top"><code>QUERY_DATA_&#x3C;NAME></code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Query for a specific data field (e.g. <code>QUERY_DATA_TITLE</code>)</td></tr><tr><td valign="top"><code>RESULT</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">JSON string containing the search results</td></tr></tbody></table>

{% hint style="info" %}
At least one of `QUERY` or `QUERY_DATA_<NAME>` must be provided.
{% endhint %}

## Optional parameters

<table><thead><tr><th width="263.923095703125" valign="top">Parameter</th><th width="111.1424560546875" valign="top">Type</th><th width="112.63818359375" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>REQUEST_ID</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">The request number to filter on</td></tr><tr><td valign="top"><code>REQUEST_STATE</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Request state: <code>OPEN</code> or <code>CLOSED</code></td></tr><tr><td valign="top"><code>REQUEST_SUBSTATE</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><p>Substate:</p><ul><li>For <code>OPEN</code>, use <code>NOT_RUNNING_NOT_STARTED</code> or <code>RUNNING</code></li><li> For <code>CLOSED</code>, use <code>COMPLETED</code> or <code>ABORTED</code></li></ul></td></tr><tr><td valign="top"><code>REQUEST_CREATED_AT_FROM</code></td><td valign="top">DATETIME</td><td valign="top">IN</td><td valign="top">Filter: request created at (from)</td></tr><tr><td valign="top"><code>REQUEST_CREATED_AT_TO</code></td><td valign="top">DATETIME</td><td valign="top">IN</td><td valign="top">Filter: request created at (to)</td></tr><tr><td valign="top"><code>REQUEST_CLOSED_AT_FROM</code></td><td valign="top">DATETIME</td><td valign="top">IN</td><td valign="top">Filter: request closed at (from)</td></tr><tr><td valign="top"><code>REQUEST_CLOSED_AT_TO</code></td><td valign="top">DATETIME</td><td valign="top">IN</td><td valign="top">Filter: request closed at (to)</td></tr><tr><td valign="top"><code>REQUESTER_USERNAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Requester's username</td></tr><tr><td valign="top"><code>PROCESS_NAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Process name</td></tr><tr><td valign="top"><code>PROCESS_VERSION</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Process version</td></tr><tr><td valign="top"><code>QUERY_SCORE</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Score threshold for the main query (default: <code>0.5</code>); see <a href="#query-scores">Query scores</a> below for more information</td></tr><tr><td valign="top"><code>QUERY_SCORE_DATA_&#x3C;NAME></code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Score threshold for the specific data field query (e.g. <code>QUERY_SCORE_DATA_SUBJECT</code>); see <a href="#query-scores">Query scores</a> below for more information</td></tr><tr><td valign="top"><code>SELECT_DATA_LIST</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Comma- or semicolon-separated list of data fields to include in the search result</td></tr></tbody></table>

{% hint style="info" %}
`QUERY_SCORE_DATA_<NAME>` is required if you have a `QUERY_DATA_<NAME>` parameter.
{% endhint %}

#### Query scores

* Query scores are applicable to semantic search only, not full-text search.
* The default score of `0.5` is equivalent to a 50% similarity threshold.
* For stricter matching, use a score closer to `1.0` (e.g. `0.75` for a 75% similarity threshold).
* For looser matching, use a score closer to `0.0` (e.g. `0.25` for a 25% similarity threshold).

This applies to both the `QUERY_SCORE` and the `QUERY_SCORE_<NAME>` parameters.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.workflowgen.com/admin/10.0/workflow-applications/semanticsearch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
