Skip to main content
Loading navigation
Back to prompt library

Build an OCDS Public Tender Bidder Risk and Credential Expiry Auditor — implementation

Linked challenge: Build an OCDS Public Tender Bidder Risk and Credential Expiry Auditor

Prompt source

implementation94 lines11 sectionsNo variables1 code block
## Build
Cross-examine public procurement tender releases formatted in Open Contracting Data Standard specifications against supplier certification records. Flag expired operating certificates and unresolved watchlist hits prior to contract award dispatch.

## User
Public Procurement Integrity Analyst

## Workflow
1. Parse public procurement contract award releases conforming to the Open Contracting Data Standard 1.1 release schema.
2. Extract winning supplier party identifiers, tax registration codes, and declared consortium member organizations.
3. Cross-reference party identifiers against internal vendor credential logs and FollowTheMoney entity watchlist dumps.
4. Generate a structured tender integrity scorecard highlighting expired credentials and screening hits for committee review.

## Interface
A tender adjudication summary table linking OCDS award blocks to supplier credential verification badges and audit trails.

## Data
Sample OCDS JSON release packages combined with synthetic supplier credential tables validated via Frictionless Python.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Open Contracting Data Standard](https://standard.open-contracting.org/latest/en/schema/reference/)
Consumes OCDS release packages, parties array objects, organization role designations, and award block structures.

## Tools
mastra-ai, frictionless, pydantic.
Mastra AI provides declarative workflow primitives to orchestrate multi-step data joins between OCDS schemas and compliance checks.
TypeScript/Node-compatible LLM runtime supporting deterministic schema transformations and concise summary generation.

## 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
- Parses OCDS release JSON packages with strict schema adherence to the parties and awards sections.
- Correctly identifies supplier organizations lacking current valid tax or commercial licenses.
- Outputs an audit-ready tender pre-award clearance report with explicit verification status per bidder.

## Starter Examples
```json
[
  {
    "input": {
      "ocid": "ocds-213xz-tender-4001",
      "award": {
        "id": "AWD-1",
        "suppliers": [
          {
            "id": "ORG-US-554",
            "name": "Global Rail Spares"
          }
        ]
      },
      "credentials": {
        "ORG-US-554": {
          "tax_clearance_valid": false,
          "license_expiry": "2023-11-30"
        }
      }
    },
    "expected_output": {
      "ocid": "ocds-213xz-tender-4001",
      "award_id": "AWD-1",
      "supplier_id": "ORG-US-554",
      "clearance_status": "BLOCKED_CREDENTIAL_EXPIRED",
      "reasons": [
        "Tax clearance invalid",
        "Operating license expired"
      ],
      "requires_manual_waiver": true
    }
  },
  {
    "input": {
      "ocid": "ocds-213xz-tender-4002",
      "award": {
        "id": "AWD-2",
        "suppliers": [
          {
            "id": "ORG-DE-910",
            "name": "Bavaria Transit Systems"
          }
        ]
      },
      "credentials": {
        "ORG-DE-910": {
          "tax_clearance_valid": true,
          "license_expiry": "2026-06-30"
        }
      }
    },
    "expected_output": {
      "ocid": "ocds-213xz-tender-4002",
      "award_id": "AWD-2",
      "supplier_id": "ORG-DE-910",
      "clearance_status": "APPROVED",
      "reasons": [],
      "requires_manual_waiver": false
    }
  }
]
```

## Safety
Advisory integrity checks only; does not autonomously cancel public bids, award public funds, or lodge criminal allegations.
Use mock external writes. Require human review before any real deployment.