Skip to content

Commit c2fa5ac

Browse files
committed
refactor: improve the parsing prompt
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent cccb0a1 commit c2fa5ac

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

services/apps/git_integration/src/crowdgit/services/affiliation/affiliation_service.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,16 @@ def get_extraction_prompt(self, content_to_analyze: str) -> str:
301301
It is valid to use an email/domain pattern only when the file itself explicitly
302302
defines that pattern as an affiliation rule.
303303
- name: the organization name the file states, else null.
304-
- domain: use a domain the file states; otherwise infer it from the stated
305-
organization name only when confident (e.g. "Google" -> google.com), else null.
306-
Never infer a domain from an email.
304+
- domain: choose the organization's domain in this order:
305+
1. a domain the file explicitly states for the organization;
306+
2. a domain you can infer confidently from the stated organization name
307+
(e.g. "Google" -> google.com);
308+
3. only when the file explicitly ties an organization to this contributor
309+
AND provides that same contributor's email, the domain of that email
310+
(e.g. company "Ericsson Software Technology" + "john@est.tech" -> est.tech).
311+
Otherwise null. An email domain is a domain source only for an organization
312+
the file has already named for that person — never use it to invent or guess
313+
an organization that the file does not state.
307314
- isUnaffiliated: set true only when the file explicitly marks the person as
308315
independent / unaffiliated / personal / no employer — not as a fallback when
309316
the organization is merely missing. When true, set name and domain to null.

0 commit comments

Comments
 (0)