Back to Prompt Library
implementation
Build the application
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Build a Cross-Border Wire Counterparty LEI Drift and Remediation Tracker
Format
Code-aware
Lines
65
Sections
11
Linked challenge
Build a Cross-Border Wire Counterparty LEI Drift and Remediation Tracker
Prompt source
Original prompt text with formatting preserved for inspection.
65 lines
11 sections
No variables
1 code block
## Build
Detect entity drift and mismatched registration jurisdictions between raw SWIFT MT103 counterparty strings and official LEI reference records. Synthesize structured data-cleansing queues and repair orders for banking back-office operators.
## User
Payment Data Quality Engineer
## Workflow
1. Ingest batch normalized international payment transactions containing noisy legal names and country codes.
2. Query mock GLEIF API search endpoints utilizing full-text search and registration jurisdiction filters.
3. Compare counterparty postal codes, legal forms, and registered statuses against current LEI Golden Copy records.
4. Export an operational remediation file containing verified LEI codes and corrected SWIFT field 59 formatted lines.
## Interface
A side-by-side reconciliation table with one-click approval for suggested SWIFT field replacements.
## Data
Fictional payment text files paired with simulated GLEIF API responses returning legal address components.
Starter examples below are synthetic. They are not downloaded records.
## Source
[GLEIF API](https://www.gleif.org/en/lei-data/gleif-api)
Leverages GLEIF Golden Copy search schemas, legal name normalizations, and corporate jurisdiction code lists.
## Tools
haystack, pydantic, requests.
Haystack provides document search pipelines to evaluate fuzzy entity string similarity across large reference datasets.
Embedder model for text similarity indexing coupled with an API-driven LLM for semantic discrepancy extraction.
## 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
- Normalizes noisy corporate suffixes to standard legal forms using GLEIF reference code lists.
- Generates properly formatted SWIFT field 59 proposal lines compliant with character length limits.
- Maintains an audit trail of original vs proposed counterparty attributes with match confidence scores.
## Starter Examples
```json
[
{
"input": {
"msg_ref": "SWIFT-2024-881",
"raw_field59": "ZENITH CORP /STREET 4 /LONDON",
"country_hint": "GB"
},
"expected_output": {
"msg_ref": "SWIFT-2024-881",
"lei_found": "213800XYZ99887766554",
"canonical_name": "ZENITH TRADING UK LIMITED",
"proposed_field59": "ZENITH TRADING UK LIMITED /4 THE CIRCUS /LONDON EC2",
"match_confidence": 0.88,
"status": "READY_FOR_OPERATOR_REVIEW"
}
},
{
"input": {
"msg_ref": "SWIFT-2024-882",
"raw_field59": "X",
"country_hint": "XX"
},
"expected_output": {
"msg_ref": "SWIFT-2024-882",
"lei_found": null,
"canonical_name": null,
"proposed_field59": null,
"match_confidence": 0,
"status": "UNRESOLVABLE_INSUFFICIENT_DATA"
}
}
]
```
## Safety
Produces advisory data hygiene updates for simulated SWIFT fields without direct transmission to financial clearing houses.
Use mock external writes. Require human review before any real deployment.Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.