> ## Documentation Index
> Fetch the complete documentation index at: https://docs.search-artemis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Parameters

> Understanding and configuring search parameters in Artemis Search

## Available Parameters

<ParamField query="search_query" type="string" required>
  The main search query string.
</ParamField>

<ParamField query="num_batches" type="integer" default="1">
  The number of synthetic data batches to generate for the search.
</ParamField>

<ParamField query="top_k" type="integer" default="10">
  The maximum number of results to return.
</ParamField>

## Configuring Parameters in the Playground

<Steps>
  <Step title="Synthetic Dataset Size">
    Adjust the 'Synthetic Dataset Size' input to control how much synthetic data is used for each search request. This correlates to the `num_batches` parameter.
  </Step>

  <Step title="Proba Threshold">
    Set the 'Proba Threshold' to filter and keep only results above a certain probability. This helps in refining the quality of your search results.
  </Step>

  <Step title="Top K Threshold">
    Use the 'Top K Threshold' to limit the number of results returned. This corresponds to the `top_k` parameter.
  </Step>
</Steps>

## Using Parameters in API Requests

When making API requests, you can include these parameters in your query string:

<CodeGroup>
  ```bash theme={null}
  curl -X GET "https://api.search-artemis.com/search?search_query=HIPAA%20compliant%20companies&num_batches=2&top_k=5" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python theme={null}
  import requests

  url = "https://api.search-artemis.com/search"
  params = {
      "search_query": "HIPAA compliant companies",
      "num_batches": 2,
      "top_k": 5
  }
  headers = {
      "Authorization": "Bearer YOUR_API_KEY"
  }

  response = requests.get(url, params=params, headers=headers)
  ```
</CodeGroup>

<Note>
  Remember to replace `YOUR_API_KEY` with your actual Artemis Search API key.
</Note>

## Advanced Search Parameters

We also provide advanced search parameters that you can use to further refine your search results.

### Filter Query

If your dataset has [filter columns](/datasets/understanding-datasets#filter-columns), you can use the `filter_query` parameter to filter the search results using the filter columns in the dataset.

Your filter query should be included in the form `{ filter_query: "YOUR_FILTER_QUERY" }` in the body of your search request.

The filter query you provide may be any valid Pandas query string and assume the 'python' engine is used to evaluate the query. Learn more about valid filter queries [here](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html).

<Tip>
  ChatGPT is a fantastic resource for generating filter queries.
</Tip>

#### Example 1:

If you had a dataset of companies with a filter column called `company_size` with the values `small`, `medium`, and `large`, you could filter the search results to only include search results with the `company_size` of 'large' by setting the `filter_query` parameter to `company_size == 'large'`.

Your search body would look like this:

```json theme={null}
{
  ...
  "filter_query": "company_size == 'large'"
}
```

#### Example 2:

If you had a dataset of companies with a filter column called `country` which contained the names of countries associated with each search result, you could filter the search results to only include search results with a `country` that started with `United` by setting the `filter_query` parameter to `country.str.contains('United', case=False, na=False)`.

Your search body would look like this:

```json theme={null}
{
  ...
  "filter_query": "country.str.contains('United', case=False, na=False)"
}
```

<Warning>
  You must have at least one filter column in your dataset to use the `filter_query` parameter.
</Warning>

## Best Practices

* Start with a larger `top_k` value and gradually decrease it as you refine your search.
* Experiment with different `num_batches` values to balance between search depth and response time.

## Next Steps

* View our [API reference](/api-reference) for more details on search parameters.
