GovTribe

Rerank Search Results MCP tool

Rerank a bounded shortlist of GovTribe records from a typed search_results_id or explicit candidate list. Use this only after retrieval; it does not replace Search_GovTribe or typed Search_* tools.

Examples

Use Rerank_Search_Results after retrieval when a shortlist needs a second-stage relevance pass for a specific goal. In GovTribe AI, it is available as a deferred search utility function after search tools have found candidate records. It does not replace Search_GovTribe or typed Search_* tools, and it does not change their default ordering.

Use search_results_id for typed Search_* results. Use candidates[] for Search_GovTribe, merged lists, or hand-curated GovTribe records. When using candidates[], omit search_results_id; if a client sends search_results_id as an empty string, GovTribe treats it as absent and keeps candidates[] as the selected source.

GovTribe front-loads available strategic priority signals before semantic text when it builds the rerank document. For award-style records, those signals can include obligated value, ceiling value, buyer, awardee, award or contract type, program, vehicle, competition context, UAS or drone indicators, and routine small-BPA cues. The record's semantic search text, GovTribe AI summary, descriptions, and snippets still provide the concept-matching context used by the reranker.

Arguments

ArgumentTypeRequiredUse
search_results_idstringOne source requiredReplays a typed search result set from a prior Search_* response. Mutually exclusive with candidates[].
candidatesobject arrayOne source requiredExplicit shortlist. Each item requires govtribe_type and govtribe_id. Mutually exclusive with search_results_id.
ranking_goalstringRequired with candidates[]The relevance goal for reranking. Optional with search_results_id; when omitted, the temporary search query is reused.
candidate_limitintegerNoMaximum replayed typed-search candidates. Defaults to 50 and may not exceed 50. Applies only to search_results_id.
max_resultsintegerNoMaximum ranked results returned. Defaults to 10 and may not exceed 50.

Each explicit candidate may include title, snippet, source_tool, source_rank, and source_score. GovTribe rehydrates each candidate by govtribe_type and govtribe_id; the submitted snippet is added as candidate context, so it can carry source-specific clues from the previous search or curation step without replacing authoritative GovTribe record fields.

Rerank a typed search result set

{
  "tool": "Rerank_Search_Results",
  "arguments": {
    "search_results_id": "<search_results_id>",
    "ranking_goal": "prioritize active opportunities for cloud migration and zero trust work",
    "candidate_limit": 50,
    "max_results": 10
  }
}

If ranking_goal is omitted, the tool uses the temporary search query stored with search_results_id. The replay returns current matching records from that temporary search state, not a frozen snapshot of the earlier rows.

Rerank explicit candidates from broad discovery

{
  "tool": "Rerank_Search_Results",
  "arguments": {
    "ranking_goal": "best records for researching NOAA cloud modernization vendors",
    "candidates": [
      {
        "govtribe_type": "vendor",
        "govtribe_id": "<vendor_govtribe_id>",
        "source_tool": "Search_GovTribe",
        "source_rank": 1
      },
      {
        "govtribe_type": "federal_contract_award",
        "govtribe_id": "<award_govtribe_id>",
        "source_tool": "Search_GovTribe",
        "source_rank": 2
      }
    ],
    "max_results": 5
  }
}

The response includes typed-search resolver hints when the record type has a matching typed Search_* tool. Use those hints to retrieve fuller records after reranking.