NVIDIA-NeMo / NVIDIA-NeMo/Anonymizer

feat: move prompts to versioned template files

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
Python
Stars
122
Forks
17
Avg merge
4d 2h
Merged PRs (30d)
11

Description

Priority Level

Medium

Task Summary

Detection and replacement prompts are currently inline Python strings in detection_workflow.py and llm_replace_workflow.py. Move them to versioned template files for easier review, diffing, and iteration without touching Python code.

Technical Details & Implementation Plan

Create src/anonymizer/engine/prompts/ directory with template files (e.g. validation.txt, augmentation.txt, latent_detection.txt, replacement.txt). Load at module level or lazily. Keep <<PLACEHOLDER>> tag convention for variable substitution. Consider whether Jinja blocks should stay inline or move to the template files.

Suggested by @andreatgretel in PR #3 review.

Dependencies

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the inline prompts in detection_workflow.py and llm_replace_workflow.py, then inspect the surrounding src/anonymizer/engine structure. Compare how each workflow performs placeholder substitution and handles Jinja blocks. Done means the prompts are in versioned files under src/anonymizer/engine/prompts/ and both workflows preserve their existing behavior without inline prompt strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.