call(back)

Prompting an LLM to Migrate a Codebase and Clean Data

Your team wants a large language model to speed up two jobs: migrating an entire codebase from Java to Python, and cleaning a database table with tens of thousands of rows of inconsistent data. Explain how you would prompt the model for each task, and how you would ensure data quality and security throughout, including sensitive data.

The model, the tooling and the contents are not specified; state your assumptions. The focus is how you instruct the model and the safeguards around it, not any one product.

Answer in the first person with your own decisions, in under three minutes, and have a 60-second version ready for a round that keeps interrupting.

Hints

Hint 1

One prompt will not do: split the migration by module in dependency order, carry shared conventions in every prompt, and define done as passing the original tests.

Hint 2

For the cleaning job, prompt for rules and code, not for cleaned rows: have the model propose normalisation rules from a sample, review them, run them as code, and keep the originals.

Hint 3

Security is about what leaves your boundary: an enterprise deployment with retention guarantees, redaction or synthetic samples for anything sensitive, and secrets never in a prompt.

Solution

Show the approach

What a strong answer contains

  • A migration plan: module-by-module prompts with conventions and library mappings, verification against the existing tests and recorded outputs, human review of each piece.
  • A cleaning plan: profile the data, prompt for rules and transformation code on a redacted sample, validate on a holdout, run as a reproducible job with the raw table kept.
  • Quality controls: tests, diffs, spot checks, and metrics on what changed.
  • Security controls: where the model runs, what data it may see, redaction, no credentials in prompts, audit of what was sent.

Assistant

Sign in to use the assistant — ask what the problem means, get a hint when you're stuck, or have your current work reviewed. Conversations save to your account.

Asked at

Similar Problems2