Career Politics

Squirrel
Squirrel

Posted on

CareerPolitics Weekly Recap: Daily Quiz Community Bot Integration

Welcome to this week's update for the CareerPolitics platform! Over the past seven days, our development focus has been centered on enhancing user engagement through automated community content.

Feature Highlight: Daily Quiz Community Bot

We are excited to roll out a new capability designed to keep the community active and interacting. The platform now fully supports daily quiz posts generated automatically by a dedicated community bot.

This update introduces a few specific user-facing enhancements:

  • Support for publishing automated daily quizzes directly to the community feed
  • Introduction of fixed tags to ensure bot-generated content remains highly organized and searchable
  • Addition of an optional series categorization to seamlessly link related quizzes together

You can review the full implementation details and architectural updates for this feature here:

Support daily quiz community bot posts with fixed tags and optional series #84

Motivation

  • Make the community bot post creator suitable for a DAILY current-affairs quiz workflow and ensure the service honors a provided fixed tag list and optional series configuration.
  • Surface structured logs so runs can be traced and debugging is easier when automations generate posts.

Description

  • Updated the AI prompt in Ai::CommunityBotPostCreator to instruct the model to produce a DAILY current-affairs quiz and to treat the provided ai_context as the primary/strict instruction block.
  • Added structured info logs to Ai::CommunityBotPostCreator to log generation start and completion with context length, fixed tags, generated title, and tags.
  • Added executor-level logging for community_bot_post_creator runs and passed configured tags to the service; added support in ScheduledAutomations::Executor to attach an article to a series by mapping action_config["series"] to a Forem Collection via Collection.find_series.
  • Added regression specs covering fixed-tag prompt behavior in spec/services/ai/community_bot_post_creator_spec.rb and series assignment from automation config in spec/services/scheduled_automations/executor_spec.rb.

Testing

  • Attempted to run the targeted specs with bundle exec rspec spec/services/ai/community_bot_post_creator_spec.rb spec/services/scheduled_automations/executor_spec.rb, but the run failed in this environment because bundle was not available (bundle: command not found).
  • Regression tests were added to the repository (spec/services/ai/community_bot_post_creator_spec.rb and spec/services/scheduled_automations/executor_spec.rb) and should be executed in CI or a local environment with dependencies installed to verify green status.

Codex Task

While it was a lighter week in terms of total pull requests, this streamlined update lays excellent groundwork for more interactive, consistent, and organized community engagement going forward. See you next week for more platform updates!

Top comments (0)