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 Public Procurement Ownership Conflict and Case Prep Engine

Format
Code-aware
Lines
167
Sections
11
Linked challenge
Build a Public Procurement Ownership Conflict and Case Prep Engine

Prompt source

Original prompt text with formatting preserved for inspection.

167 lines
11 sections
No variables
1 code block
## Build
Cross-reference winning bidders in public procurement tender releases against beneficial ownership statements. Flag shared corporate control across competing bidders and construct analyst case files with evidence summaries.

## User
Public procurement fraud investigator

## Workflow
1. Ingest simplified Open Contracting Data Standard award records to identify winning and competing tender bidders.
2. Query synthetic Beneficial Ownership Data Standard v0.4 ownership statements to trace natural persons controlling each bidder.
3. Detect shared direct or indirect beneficial owners between ostensibly competing bidders in the same tender.
4. Compile an analyst case brief documenting overlapping ownership shares, dates, and simulated conflict flags.

## Interface
Multi-pane web review console showing tender comparison tables, ownership links, conflict badges, and exportable case prep dossiers.

## Data
Use mock OCDS JSON releases and BODS v0.4 normalized JSON records generated locally; no external network credentials required.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Open Contracting Data Standard](https://standard.open-contracting.org/latest/en/schema/reference/)
Applies OCDS release structure from Section Reference with parties, tender awards, and buyer/supplier role arrays.

## Tools
pydantic-ai, fastapi, networkx.
Enforces type-safe schema definitions for parsed OCDS awards, BODS ownership structures, and output conflict dossiers.
Local or hosted LLM with structured output capabilities to generate analyst case narratives from graph relationships.

## 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
- Identifies overlapping natural persons across distinct bidding parties within the same tender ocid.
- Calculates cumulative ownership share across indirect intermediary holdings.
- Emits a structured case preparation report containing verifiable party IDs and calculated ownership percentages.
- Produces valid normalized conflict records adhering to the Pydantic schema.

## Starter Examples
```json
[
  {
    "input": {
      "tender_release": {
        "ocid": "ocds-215964-101",
        "id": "rel-01",
        "date": "2024-03-01T00:00:00Z",
        "tag": [
          "award"
        ],
        "parties": [
          {
            "id": "GB-COH-001",
            "name": "Apex Civil Ltd",
            "roles": [
              "supplier"
            ]
          },
          {
            "id": "GB-COH-002",
            "name": "Vortex Civil Ltd",
            "roles": [
              "supplier"
            ]
          }
        ],
        "awards": [
          {
            "id": "aw-1",
            "suppliers": [
              {
                "id": "GB-COH-001"
              }
            ]
          }
        ]
      },
      "ownership_statements": [
        {
          "statement_id": "stmt-1",
          "entity_id": "GB-COH-001",
          "owner_name": "Eleni Vance",
          "share_pct": 51,
          "is_beneficial_owner": true
        },
        {
          "statement_id": "stmt-2",
          "entity_id": "GB-COH-002",
          "owner_name": "Eleni Vance",
          "share_pct": 49,
          "is_beneficial_owner": true
        }
      ]
    },
    "expected_output": {
      "ocid": "ocds-215964-101",
      "conflict_detected": true,
      "shared_principals": [
        {
          "name": "Eleni Vance",
          "entities": [
            "Apex Civil Ltd",
            "Vortex Civil Ltd"
          ],
          "max_holding_pct": 51
        }
      ],
      "case_priority": "high",
      "recommended_action": "Refer to procurement audit board for non-competitive bidding review"
    }
  },
  {
    "input": {
      "tender_release": {
        "ocid": "ocds-215964-102",
        "id": "rel-02",
        "date": "2024-03-02T00:00:00Z",
        "tag": [
          "award"
        ],
        "parties": [
          {
            "id": "GB-COH-003",
            "name": "Summit Rail Ltd",
            "roles": [
              "supplier"
            ]
          },
          {
            "id": "GB-COH-004",
            "name": "Horizon Track Ltd",
            "roles": [
              "supplier"
            ]
          }
        ],
        "awards": [
          {
            "id": "aw-2",
            "suppliers": [
              {
                "id": "GB-COH-003"
              }
            ]
          }
        ]
      },
      "ownership_statements": [
        {
          "statement_id": "stmt-3",
          "entity_id": "GB-COH-003",
          "owner_name": "Marcus Kane",
          "share_pct": 75,
          "is_beneficial_owner": true
        },
        {
          "statement_id": "stmt-4",
          "entity_id": "GB-COH-004",
          "owner_name": "Sarah Croft",
          "share_pct": 60,
          "is_beneficial_owner": true
        }
      ]
    },
    "expected_output": {
      "ocid": "ocds-215964-102",
      "conflict_detected": false,
      "shared_principals": [],
      "case_priority": "low",
      "recommended_action": "Standard procurement file archiving"
    }
  }
]
```

## Safety
Simulates all procurement reviews without filing statutory bid-rigging charges or notifying actual bidding vendors.
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.