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 Procurement Release Language Normalization Pipeline
Format
Code-aware
Lines
79
Sections
11
Linked challenge
Build an OCDS Procurement Release Language Normalization Pipeline
Prompt source
Original prompt text with formatting preserved for inspection.
79 lines
11 sections
No variables
1 code block
## Build
Parse Open Contracting Data Standard releases containing multi-lingual free-text fields. Extract default language tags, consolidate language-suffixed descriptions, and validate procurement party arrays for translation consistency.
## User
Public procurement risk officer
## Workflow
1. Ingest OCDS release packages containing planning and tender objects with multi-lingual suffixed fields.
2. Identify the declared default language tag from the OCDS release schema.
3. Extract and map suffixed fields (e.g., description_es) into a normalized translation map.
4. Generate a consolidated multi-lingual procurement summary for analyst review.
## Interface
Queue management view presenting contracting awards, supplier metadata, and consolidated translation maps.
## Data
Download standard public sample OCDS release packages featuring multi-lingual suffixed fields such as title_es and title_fr. Evaluate with simplified synthetic app records.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Open Contracting Data Standard](https://standard.open-contracting.org/latest/en/schema/reference/)
Extracts parties, language tags, and release structures from Open Contracting Data Standard schema reference 5.
## Tools
pydantic-ai, fastapi, pandas.
Pydantic AI enables strict schema validation and reliable LLM-driven parsing of diverse language-suffixed fields.
Local or hosted LLM compatible with Pydantic AI for schema extraction and normalization tasks.
## 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 standard OCDS release package JSON without structural parsing errors.
- Extracts the default language tag and groups suffixed language fields accurately.
- Outputs a consolidated JSON translation map mapping fields by language code.
## Starter Examples
```json
[
{
"input": {
"language": "en",
"tender": {
"title": "Road construction",
"title_es": "Construcción de carreteras"
}
},
"expected_output": {
"default_language": "en",
"translations": {
"en": {
"title": "Road construction"
},
"es": {
"title": "Construcción de carreteras"
}
},
"status": "VALID",
"record_type": "Simplified synthetic app record, not complete official schema file"
}
},
{
"input": {
"language": "es",
"tender": {
"description": "Servicios",
"description_fr": "Services"
}
},
"expected_output": {
"default_language": "es",
"translations": {
"es": {
"description": "Servicios"
},
"fr": {
"description": "Services"
}
},
"status": "VALID",
"record_type": "Simplified synthetic app record, not complete official schema file"
}
}
]
```
## Safety
Procurement screening simulations only; does not cancel public tenders or disqualify real commercial 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.