Skip to content

[TAN-8649] Add demographic data to demo data authors - #14735

Open
amanda-anderson wants to merge 1 commit into
TAN-8648-mcp-tool-demo-inputsfrom
TAN-8649-demographic-data-demo-users
Open

[TAN-8649] Add demographic data to demo data authors#14735
amanda-anderson wants to merge 1 commit into
TAN-8648-mcp-tool-demo-inputsfrom
TAN-8649-demographic-data-demo-users

Conversation

@amanda-anderson

Copy link
Copy Markdown
Contributor

Demo authors from create_demo_inputs (TAN-8648) now get random answers for the enabled registration fields, populating the demographics and representativeness dashboards on demo platforms.

Extracts the answer generation from the demos:seed_native_survey_responses rake task into RandomCustomFieldValuesService; the rake task now uses it too.

Testing: specs + engine suite green, rake smoke-tested, verified live over MCP.

🤖 Generated with Claude Code.

Changelog

Added

  • [TAN-8649] Add demographic data to MCP demo data authors

Extracts the random answer generation from the seed_native_survey_responses
rake task into RandomCustomFieldValuesService, and uses it to fill the enabled
registration fields on the fake authors that create_demo_inputs builds — so
demographics and representativeness dashboards populate on demo platforms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194zd7Y2UVtWuNhcTqcsxH1
@notion-workspace

Copy link
Copy Markdown

@@ -0,0 +1,196 @@
# frozen_string_literal: true

@amanda-anderson amanda-anderson Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE: Irene's question on whether the fake demographic data follows a specific distribution:

Random, but shaped (not uniform noise), e.g.

  • Which questions: whatever registration fields the platform actually has enabled
  • Per-field distributions:
    • birthyear — uniform ages 18–80
    • domicile — 90% a random platform area, 10% "outside"
    • selects (gender, custom questions) - thes are weighted toward earlier options (so charts show a realistic skew, not a flat line), with ~10% picking "other" where it exists
    • rating/linear scales — skewed positive (more 4s and 5s than 1s)
    • ~20% of optional fields are skipped per user (so dashboards show realistic "no answer" gaps instead of 100% completion)
  • What it does NOT do: no correlations. A user's gender answer has no relationship to their Faker-generated name (you can get a "male" answer on a user named Sarah), age doesn't influence domicile, etc.

Individually inspecting a demo user can therefore look slightly off; in aggregate — which is what the demographics/representativeness dashboards show — it looks right, and that's what demos display.

The logic is shared with the survey-seeding rake task (same service), so demo survey answers follow the same shaped randomness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant