Skip to main content
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 FollowTheMoney Custom Watchlist Payload Generator

Format
Code-aware
Lines
75
Sections
11
Linked challenge
Build a FollowTheMoney Custom Watchlist Payload Generator

Prompt source

Original prompt text with formatting preserved for inspection.

75 lines
11 sections
No variables
1 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.

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.