Overview
Recruiting and research teams often want to find more people similar to a known person. The known person is a candidate or contact they already rate, given as an example rather than a filter set. For example, a hiring manager may want to find engineers like the one they hired from another employer last year. But this manager can’t easily write that as a query using a job title and specific skills, because it’s likely to be too vague or too narrow. The example candidate represents the implicit criteria the hiring manager wants; the task is to make those criteria explicit. This tutorial walks through a pattern for solving this problem, by resolving the seed profile and then performing an expanded search, using the Seltz Answer and Search endpoints.Outline
- Resolve the seed and derive search criteria with a single Answer call.
- Confirm the seed before expanding.
- Expand results by searching again using the derived criteria.
- Filter and dedupe the results.
1. Resolve the seed and derive search criteria with a single Answer call.
Rather than callingsearch yourself, picking a candidate by hand, and parsing the profile’s Markdown content, use answer with a response_format JSON schema. Passing scope: "people" grounds the answer in people profiles, and the schema shapes the result directly into the criteria you need for the expanded search. A bare name is a weak query on this scope, and a generic anchor like an employer alone may not be distinctive enough either. Combine whatever identifying details you already have, such as employer, role, and location, similar to anchoring a company name with an industry or location.
answer always returns citations regardless of response_format, so the same call also gives you the resolved profile’s URL. You’ll use this URL in step 2 to confirm the seed, and again in step 4 to keep it out of the expanded results.
response_format behavior, including how a malformed schema is rejected before the request is billed.
Generation can also be truncated partway through, in which case
response.answer doesn’t parse as valid JSON: the example above returns None rather than raising, since you should retry a failed resolution with a more specific anchor, not treat it as a match. Check for this before continuing to the next step: the steps below assume a resolved seed and fail on a None/null result.2. Confirm the seed before expanding.
This step takes place in your product. It’s valuable to confirm you’re using the right seed before expanding the search: if you use the wrong seed, there’s no way for the user to know, and the downstream results may be incorrect in a way that’s hard to recognize. This confirmation step prevents that from happening. The example below shows the resolved headline, role, skills, and source URL, and asks the user to confirm it’s the right person before continuing.3. Expand results by searching again using the derived criteria.
Build a second query from the criteria you derived, as descriptive terms rather than a strict filter. You’re looking for people who resemble the seed, not people who match it exactly. Userole here rather than headline: the people scope is also used for same-company retrieval, so a query that still carries the seed’s employer name, as headline does, biases the expansion toward the seed’s coworkers instead of similar people elsewhere. role describes what makes someone a match, using title and skills, without the company that made headline useful for confirming identity in step 2.
4. Filter and dedupe the results.
The expanded search can return the seed itself, along with duplicate profiles. This step drops the seed by URL, and dedupes the rest of the results before showing them to the user.Beyond recruiting
The same seed-and-expand pattern works for other scopes too. Swapscope: "people" for companies to find companies similar to a known one, deriving criteria like industry and company size from the seed instead of headline, role, and skills. Only the query, the response schema, and the anchor terms change.
The same trap from step 3 applies here: whatever field you use to anchor the seed (like a company’s own name) can end up biasing the expand query toward things related to the seed rather than things similar to it. Keep an identity-anchoring field separate from the match-describing fields you actually expand on.
Next steps
- People — What a
people-scope result contains - Answer API Reference — Full
response_formatspecification - Handle errors — Handling errors from the
searchendpoint - Data Concepts — How scopes work across Seltz endpoints