Skip to content

Content Opportunities and briefs are always generated in English regardless of the brand's language #638

Closed

Description

@gkhngyk

Problem

Content Opportunities and their briefs are always generated in English, even for brands whose language is not English (e.g. a Turkish-market brand with language: tr gets English titles, descriptions, and briefs).

The cause is that neither generation path ever tells the model the brand's language:

  1. Opportunity generation — the brand query selects only id, name, description, industry; the brands.language / brands.region columns (which exist and are used by volume analysis) are never read. The system prompt contains no output-language instruction, so the model answers in the instruction's language: English.
  2. Brief generation — same gap: the brand select has no language, and the brief system prompt has no language rule. So even a manually translated opportunity would still get an English brief.

grep -c language server/src/routes/content.js returns 0 — the language is never forwarded anywhere in the content pipeline.

Evidence

Suggested fix

Symmetric ~10-line changes in the two files:

  1. Add language to both brand selects.
  2. Append an explicit instruction to both user prompts (or system prompts), e.g.:
    Output language: ${brand.language || 'en'} — write every title, description, and brief field in this language. Keep proper nouns and metric names as-is.

No migration and no re-analysis needed — the next generation cycle picks up the language. Existing English rows stay untouched.

Acceptance criteria

  • A brand with language: tr gets Turkish opportunity titles/descriptions and Turkish briefs on the next generation.
  • Brands with language: en (the default) see no change.
  • Proper nouns (brand/competitor names) are not translated.

Activity

  1. added
    bug
    good first issue
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions