Skip to main content
Loading navigation
Back to prompt library

Build a FollowTheMoney Custom Watchlist Payload Generator — implementation

Linked challenge: Build a FollowTheMoney Custom Watchlist Payload Generator

Prompt source

implementation75 lines11 sectionsNo variables1 code block
## Build
Convert proprietary internal fraud lists into valid FollowTheMoney entity schemas for local yente API ingestion. Map custom attributes to open-source formats and validate entity relationships.

## User
Compliance data engineer

## Workflow
1. Ingest raw internal fraud records containing name, aliases, and known fraudulent birth dates.
2. Map unstructured fields to the strict FollowTheMoney entity data model schema using LLM extraction.
3. Generate associated relationship objects linking affiliated fraudulent companies and individuals.
4. Package the transformed entities into a JSON stream ready for local yente indexing.

## Interface
A schema mapping dashboard displaying raw fraud data inputs and generated FollowTheMoney JSON payloads.

## Data
Create 50 synthetic internal flat-file fraud records with varying property structures.
Starter examples below are synthetic. They are not downloaded records.

## Source
[OpenSanctions data toolkit](https://raw.githubusercontent.com/opensanctions/yente/main/README.md)
Integrates directly with yente documentation supporting custom watchlists and FollowTheMoney entities from source excerpt 2.

## Tools
pydantic-ai, fastapi, pydantic.
Pydantic AI enforces strict typing and validation, ensuring generated JSON outputs match exactly with the required FollowTheMoney entity schema.
Any modern LLM capable of robust JSON schema output via Pydantic.

## 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
- Successfully maps raw inputs to standard FollowTheMoney schema types (e.g., Person, Company).
- Validates generated JSON against strict FTM schema properties using Pydantic.
- Outputs an array of entity objects structured for yente API ingestion.

## Starter Examples
```json
[
  {
    "input": {
      "fraudster_name": "Ivan Petrov",
      "birth_year": 1975,
      "fraud_type": "Identity Theft",
      "record_type": "simplified synthetic app record"
    },
    "expected_output": {
      "schema": "Person",
      "properties": {
        "name": [
          "Ivan Petrov"
        ],
        "birthDate": [
          "1975"
        ],
        "topics": [
          "fraud"
        ]
      }
    }
  },
  {
    "input": {
      "company": "Fake Co Ltd",
      "registration": "999888",
      "record_type": "simplified synthetic app record"
    },
    "expected_output": {
      "schema": "Company",
      "properties": {
        "name": [
          "Fake Co Ltd"
        ],
        "registrationNumber": [
          "999888"
        ]
      }
    }
  }
]
```

## Safety
Processes mock internal data locally, avoiding exposure of real fraud intelligence to external third parties.
Use mock external writes. Require human review before any real deployment.