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 Multilingual Procurement Translation Review Workspace
Format
Code-aware
Lines
81
Sections
11
Linked challenge
Build an OCDS Multilingual Procurement Translation Review Workspace
Prompt source
Original prompt text with formatting preserved for inspection.
81 lines
11 sections
No variables
1 code block
## Build
Parse OCDS tender releases containing multilingual free-text descriptions. Consolidate language-suffixed party names and default language tags to unify fragmented supplier compliance records for efficient evaluation.
## User
A multilingual procurement document translation review workspace that preserves original entity names.
## Workflow
1. Ingest simplified synthetic OCDS procurement releases containing language-suffixed party arrays and default language tags.
2. Extract base entity descriptions and normalize language tags using standard BCP47 codes.
3. Consolidate duplicate party records that differ only by translated names or regional suffixes.
4. Output a unified tender entity ledger linking consolidated supplier profiles to their original language variants.
## Interface
Translation review workspace displaying canonical entity names alongside their parsed regional suffixes and language codes.
## Data
Simplified synthetic app records structured as OCDS JSON payloads featuring simulated name_es, name_fr, and default language fields.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Open Contracting Data Standard](https://standard.open-contracting.org/latest/en/schema/reference/)
Guides the extraction of language-suffixed fields and default language tags for consolidating multilingual party entities according to OCDS schema conventions.
## Tools
pydantic-ai, fastapi.
Ensures strict validation of BCP47 tags and schema-compliant party dictionaries when extracting canonical and translated entity names.
LLM capable of mapping multilingual field suffixes to canonical party entities.
## 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
- Correctly parses the default language and identifies all language-suffixed fields within a party array.
- Consolidates related translations into a single canonical entity record without losing the original language variations.
- Accurately maps recognized language tags to their corresponding translated strings in the output structure.
## Starter Examples
```json
[
{
"input": {
"record_type": "simplified synthetic app record",
"language": "en",
"parties": [
{
"id": "party-1",
"name": "Water Works",
"name_es": "Obras Sanitarias",
"name_fr": "Service des Eaux"
}
]
},
"expected_output": {
"canonical_id": "party-1",
"default_language": "en",
"consolidated_names": {
"en": "Water Works",
"es": "Obras Sanitarias",
"fr": "Service des Eaux"
},
"resolution_status": "unified"
}
},
{
"input": {
"record_type": "simplified synthetic app record",
"language": "es",
"parties": [
{
"id": "party-2",
"name": "Consultores de Software",
"name_en": "Software Consultants"
}
]
},
"expected_output": {
"canonical_id": "party-2",
"default_language": "es",
"consolidated_names": {
"es": "Consultores de Software",
"en": "Software Consultants"
},
"resolution_status": "unified"
}
}
]
```
## Safety
Entity consolidations must be verified by human reviewers before integration into official registries.
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.