Skip to main content
Loading navigation
Back to prompt library

Build a Nominal National Accounts Reconciliation Workspace — Implementation planning and evidence-linked development

Linked challenge: Build a Nominal National Accounts Reconciliation Workspace

Prompt source

Implementation planning and evidence-linked development51 lines16 sectionsNo variables28 checklist items
## User
A national-accounts data engineer.

## Build
Reconcile expenditure-side nominal GDP to its source tables. Trace sign errors, missing components, and inconsistent annual-rate conventions to specific records.

## Input Contract
- Key: release_id + period + account_line.
- Fields: consumption, investment, government, exports, imports, reported_gdp, currency_scale, annual_rate.
- Imports are positive source amounts subtracted once. Annualized levels must share a convention.

## Workflow
1. Map source lines to the declared accounting identity.
2. Normalize units without silently correcting signs.
3. Locate reconciliation differences and duplicate records.
4. Export a correction proposal with source-to-account lineage.

## Interface
An accounting bridge with unmatched-line queues and reviewer-approved mapping changes.

## Deliverables
- A versioned source mapping registry.
- A reconciliation workbook with explicit residuals and correction history.
- Runnable local application, setup commands, and a dependency lockfile.
- Versioned input data, data dictionary, acquisition instructions, and rights notes.
- Calculation traces, source references, assumption records, and exported review artifacts.
- A deterministic baseline and tests for normal, incomplete, contradictory, and failure-recovery cases.
- A recorded complete workflow with a reproducible manifest and explicit limitations.

## Acceptance Criteria
- Compute C + I + G + X - M with one import subtraction.
- Do not mix quarterly flows with annual-rate levels.
- Keep unexplained residuals rather than allocating them to a convenient component.
- Mapping changes retain their reviewer and prior version.

## Contrast Case
An import increase raises gross trade but lowers the expenditure identity when other components remain fixed.

## Dataset Scope
The attached starter files are prototype inputs. Expected starter answers are visible. They are not independent holdouts.

Full target: Acquire nominal expenditure tables for 20 quarters. Add synthetic mapping errors, duplicate import rows, and inconsistent scaling for controlled debugging.

Complete target contracts and expert review remain pending. Public observations are not historical release vintages.

## Tools
DuckDB, Pandera, Streamlit

Use an available model appropriate to the task. Record provider, model identifier, version or retrieval date, settings, cost, and latency. Use deterministic code for calculations. Models may extract, retrieve, or explain evidence. They must not invent missing records, override approval rules, or claim professional authority.

## Constraints
Use this identity for compatible nominal accounts, not arbitrary real chained components.

- No fabricated records, source citations, professional endorsements, or expert-adjudication claims.
- No future-data leakage into dated decisions, model fitting, or historical valuation inputs.
- No unauthorized payments, account restrictions, regulatory filings, or production changes.
- No automated appraisal certification, tax-compliance determination, or unsupported fraud accusation.
- No concealed uncertainty or silently invented inputs required for a numerical conclusion.

## Scoring
- Correct domain calculations and justified methods with documented assumptions. Weight: 30.
- Source lineage, temporal integrity, rights checks, and explicit synthetic-data labels. Weight: 25.
- A working application with review, export, error handling, and reproducible state. Weight: 20.
- Adversarial cases, uncertainty, missing-data behavior, and sensitivity analysis. Weight: 15.
- Evidence-linked conclusions that distinguish facts, assumptions, and unresolved judgments. Weight: 10.
Score each dimension from zero to two. Weighted score = sum(weight * score / 2). A failed safety gate blocks acceptance.