Back to prompt library
Build a Yente Cross-Dataset Entity Resolution Tracer — implementation
Linked challenge: Build a Yente Cross-Dataset Entity Resolution Tracer
Prompt source
implementation109 lines11 sectionsNo variables1 code block
## Build
Trace matching entity profiles across independent screening datasets using OpenSanctions Yente API. Consolidate disjointed jurisdictional sanctions records into unified analyst provenance dossiers.
## User
Sanctions Quality Assurance Analyst
## Workflow
1. Ingest cross-jurisdictional screening alerts produced by a local yente matching instance.
2. Retrieve overlapping entity profiles and FollowTheMoney schema representations from distinct datasets.
3. Merge matching properties and identify divergent birth dates or aliases across lists.
4. Generate a consolidated entity profile documenting cross-dataset provenance and discrepancies.
## Interface
A provenance tree view showing match lineage, raw upstream gazette references, and analyst commentary comparison.
## Data
Run a local yente Docker instance indexing standard OpenSanctions default dataset samples.
Starter examples below are synthetic. They are not downloaded records.
## Source
[OpenSanctions data toolkit](https://raw.githubusercontent.com/opensanctions/yente/main/README.md)
Query yente match endpoints and FollowTheMoney entity properties to extract lineage metadata.
## Tools
mastra-ai, pydantic, httpx.
Mastra AI supports deterministic state machines and provenance step tracking across complex compliance workflows.
Hosted language model to generate structured audit justifications.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Queries local yente instance using FollowTheMoney schema representations.
- Extracts source dataset provenance identifiers and published timestamps.
- Produces a signed reconciliation dossier documenting dispute resolution grounds.
## Starter Examples
```json
[
{
"input": {
"target_query": {
"name": "Orion Marine Freight",
"jurisdiction": "CY"
},
"yente_matches": [
{
"id": "ftm-1",
"datasets": [
"ofac_sdn"
],
"properties": {
"incorporationDate": [
"2010"
]
}
},
{
"id": "ftm-2",
"datasets": [
"eu_fsf"
],
"properties": {
"incorporationDate": [
"2011"
]
}
}
]
},
"expected_output": {
"merged_entity_id": "ftm-merged-01",
"source_datasets": [
"ofac_sdn",
"eu_fsf"
],
"discrepancies_detected": true,
"conflicting_fields": [
"incorporationDate"
],
"resolution_status": "requires_manual_merge"
}
},
{
"input": {
"target_query": {
"name": "Atlas Services",
"jurisdiction": "DE"
},
"yente_matches": [
{
"id": "ftm-3",
"datasets": [
"un_sc"
],
"properties": {
"incorporationDate": [
"2005"
]
}
}
]
},
"expected_output": {
"merged_entity_id": "ftm-3",
"source_datasets": [
"un_sc"
],
"discrepancies_detected": false,
"conflicting_fields": [],
"resolution_status": "clean_single_source"
}
}
]
```
## Safety
Simulates sanctions review provenance. All entity mappings and datasets are synthetic or public test fixtures.
Use mock external writes. Require human review before any real deployment.