Custom prompts

Reusable instruction templates that steer the AI's tone, register, and formatting — shared with your organization or kept private.

Not verified yet

A custom prompt is a saved instruction the AI receives alongside your source text. Where the glossary pins down terminology, a custom prompt shapes style: tone, register, and formatting rules.

Examples that work well:

  • "Translate in a formal, business register. Use the polite second person (Sie) in German, vykání in Czech."
  • "This is product copy for a children's app. Keep sentences short and use vocabulary appropriate for ages 6–10."
  • "Preserve all Markdown formatting (**bold**, [links](...)) exactly. Do not translate text inside code blocks or placeholders like {{name}}."

A custom prompt has

FieldWhat it does
NameShown in the prompt picker (e.g. "Formal Czech").
PromptThe instruction text the AI receives.
PrivateOff = every member of your organization can see and use it. On = only you can. The dashboard notes: "Private prompts cannot be seen or used by other organization members."

Creating and managing prompts

Prompts are created from the Manual translation page: open the custom prompt dropdown and choose to create a new one. The dialog asks for the name, the prompt text, and the private flag. You can edit or delete prompts from the same picker.

That page doubles as the prompt-development loop: select the prompt, paste representative text, and watch the output change as you refine the wording — the translation re-runs whenever you switch prompts.

Where prompts apply

Every AI translation in LangSync can use a custom prompt:

WhereWhich prompt
Manual translationThe prompt you pick on the page.
New term with Translate automaticallyThe namespace's default prompt.
Translate missing (batch)The namespace's default prompt, or one named in the API request.
Bulk import with automatic translationThe namespace's default prompt, or one named in the import setup.
CLI syncThe namespace's default prompt.
Sparkle suggestion in the editorThe namespace's default prompt.

Set a namespace's default prompt

Give a namespace a default prompt and every automatic translation in it follows the same style, whoever starts it and from wherever.

  1. Open the namespace, then ⋯ → Namespace settings.
  2. Pick a prompt in Default prompt, or No default prompt to translate without one.
  3. Click Update namespace.

Only shared prompts can be a namespace default, because every member's translations use it. In the API, set it with PATCH /namespaces/{namespaceName} and { "defaultCustomPromptId": "<prompt id>" }; send an empty string to remove it. The namespace returns it as defaultCustomPromptId.

To use a different prompt for one run, pass customPromptId in the body of POST /namespaces/{namespaceName}/terms/translate-missing, in the setup of a bulk import, or in a suggestion request. It can be any shared prompt, or your own private one. A prompt from another organization, or someone else's private prompt, fails the request with 400 INVALID_CUSTOM_PROMPT before anything is translated.

Writing prompts that work

  • Keep them short. A few sentences. The AI also receives a fixed instruction set (preserve meaning, tone, formatting); your prompt is for what's specific to you.
  • Be concrete about what to preserve. "Don't translate placeholders like {{name}}" is more reliable than "preserve formatting".
  • One prompt per use case. Formal support replies, playful marketing, legal text — three prompts, not one mega-prompt trying to cover all three. Pick per translation.
  • Terminology belongs in the glossary, not in prompts. A prompt saying "always translate Dashboard as Übersicht" works only where that prompt is applied; a glossary entry applies to every AI translation in the organization.

Behaviour and edge cases

  • Privacy is enforced at use time. A private prompt can be seen, used, edited, and deleted only by its creator; others in the organization get a permission error even with a direct reference.
  • Deleting a prompt doesn't touch any translation created with it — translations stand on their own once saved. A namespace that used it as its default goes back to No default prompt.
  • Making a prompt private also removes it as the default of every namespace that used it, since a default has to be shared.
  • Editing a prompt's text affects future translations only; nothing is re-run.
  • Creation, updates, and deletion are recorded in the audit log (custom_prompt.created / custom_prompt.updated / custom_prompt.deleted).
  • Manual translation — where prompts are picked and developed.
  • Auto-translate: the batch and single-cell AI translation that uses the namespace's default prompt.
  • Glossaries — the terminology counterpart, applied to every AI call.

On this page