AI-Powered Parameter Extraction:
The user’s message is sent to an AI model that extracts structured search parameters such as:
· Target role
· Country
· Region
· Mapped country list (when a region is given)
· Industry
· Company
· Relevant keywords
· Maximum number of results
· Search depth
This allows users to request leads in natural language like:
“Find senior JS backend developers in Southern Europe.”
Smart Parameter Normalization:
The extracted AI output is cleaned, validated, and converted into a consistent JSON object. If the user gives a region instead of a single country, the workflow preserves the region, maps it to supported countries, and avoids sending invalid country values to Tavily. If the user omits optional parameters, safe defaults are applied automatically.
Role Validation & Clarification:
If the AI cannot identify a target role, the workflow stops early and returns a clarification response asking the user to provide a role such as CTO, CEO, Head of AI, or Senior Backend Developer.
Search Query Construction:
The normalized parameters are converted into two query variants:
· Primary query: a natural phrasing that starts with “LinkedIn profile” for better retrieval quality
· Fallback query: a shorter backup query to improve recall if the first search misses good candidates
Automated Web Search (Tavily API):
Using the structured parameters, the workflow queries Tavily twice (primary and fallback). Each request can include:
· Role and keyword-based query text
· Optional single-country filter when one exact c