# Search\_Query\_Guide

## Purpose

Use this guide to construct `query` values for GovTribe `Search_*` requests so query text matches the intended search behavior. Use it when:

* converting user intent into exact terms vs conceptual language.
* normalizing mixed phrases, identifiers, and excludes into one query string.

## Construction Rules

* For default keyword behavior:
  * preserve user quotes and add quotes around clear entities/IDs.
  * correct obvious typos outside quoted strings and IDs.
  * output terms/phrases with optional `|` and `-term` only.
  * for `Search_Federal_Contract_Awards` with non-empty product/theme text, include quoted query content.
* For `search_mode: "semantic"`:
  * start with plain-language intent.
  * append 2-6 domain-aware synonyms/paraphrases.
  * relax narrow constraints last if sparse.
  * keep query concise (about 20-25 words).

## Examples

### Default Keyword-Behavior Examples

Exact solicitation ID lookup: Tool: `Search_Federal_Contract_Opportunities`

```json
{
  "query": "\"W912HQ-24-R-0123\""
}
```

Quoted phrase with procurement term: Tool: `Search_Federal_Contract_Opportunities`

```json
{
  "query": "\"cyber incident response\" BPA"
}
```

Quoted product-name lookup on FCA: Tool: `Search_Federal_Contract_Awards`

```json
{
  "query": "\"endpoint detection\""
}
```

### Semantic Mode Examples (`search_mode: "semantic"`)

Recompete discovery intent with paraphrases: Tool: `Search_Federal_Contract_Opportunities`

```json
{
  "query": "ways to find recompete contracts in DoD; identify expiring awards; follow-on opportunities; contract renewals",
  "search_mode": "semantic"
}
```

Similarity intent with domain synonyms: Tool: `Search_Federal_Contract_Opportunities`

```json
{
  "query": "notices similar to FAA SWIM support; aviation data integration; system wide information management; enterprise integration support",
  "search_mode": "semantic"
}
```
