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 an OCDS Bidder LEI Age and UBO Status Monitor

Format
Code-aware
Lines
78
Sections
11
Linked challenge
Build an OCDS Bidder LEI Age and UBO Status Monitor

Prompt source

Original prompt text with formatting preserved for inspection.

78 lines
11 sections
No variables
1 code block
## Build
Cross-reference public tender awards against GLEIF API entity records to verify supplier incorporation dates. Alert on recently formed entities winning large contracts without verified beneficial ownership data.

## User
Procurement audit analyst

## Workflow
1. Extract winning supplier identifiers and contract award amounts from OCDS tender releases.
2. Retrieve legal entity metadata via synthetic GLEIF Golden Copy records to calculate entity operational age.
3. Check BODS records to verify the presence of declared natural person ultimate beneficial owners.
4. Generate an audit alert for high-value tenders awarded to recently incorporated entities lacking UBOs.

## Interface
Dashboard showing tender awards ranked by shell company risk score, with drill-down views into corporate lineage.

## Data
Utilize mock OCDS awards and local JSON mocks of GLEIF API entity responses and BODS ownership records.
Starter examples below are synthetic. They are not downloaded records.

## Source
[GLEIF API](https://www.gleif.org/en/lei-data/gleif-api)
Uses GLEIF API data model concepts including LEI reference records and entity status flags.

## Tools
dspy, fastapi, pandas.
Optimizes heuristic scoring and narrative explanation pipelines for evaluating complex shell company attributes.
Hosted or local model capable of evaluating multi-factor risk profiles and synthesizing structured summaries.

## 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
- Calculates company age at time of tender award using GLEIF incorporation date fields.
- Flags contracts awarded to entities incorporated less than ninety days before tender closing.
- Verifies presence of valid ultimate beneficial owners in BODS records.
- Outputs an audit case dossier containing actionable findings.

## Starter Examples
```json
[
  {
    "input": {
      "ocds_award": {
        "award_date": "2024-03-01",
        "award_value": 2500000
      },
      "lei_record": {
        "registration_date": "2024-01-01"
      },
      "bods_data": {
        "has_ubo": false
      }
    },
    "expected_output": {
      "age_in_days": 60,
      "ubo_verified": false,
      "shell_risk_status": "alert",
      "message": "Entity is under 90 days old with no verified UBO winning a high-value contract",
      "_note": "Simplified synthetic app records, not complete official schema files"
    }
  },
  {
    "input": {
      "ocds_award": {
        "award_date": "2024-03-01",
        "award_value": 150000
      },
      "lei_record": {
        "registration_date": "2023-03-01"
      },
      "bods_data": {
        "has_ubo": true
      }
    },
    "expected_output": {
      "age_in_days": 366,
      "ubo_verified": true,
      "shell_risk_status": "pass",
      "message": "Established entity with verified UBO",
      "_note": "Simplified synthetic app records, not complete official schema files"
    }
  }
]
```

## Safety
Acts purely as an analytical audit triage tool; does not revoke or cancel procurement awards automatically.
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.