feat: add short-video simulation support and evaluation pipeline#217
feat: add short-video simulation support and evaluation pipeline#217akz142857 wants to merge 3 commits intocamel-ai:mainfrom
Conversation
…ommerce) Add TikTok as the third simulation platform alongside Twitter and Reddit. Engine changes: - ActionType: 14 new TikTok actions (upload_video, watch_video, share_video, duet, stitch, not_interested, enter/exit_livestream, livestream_comment, send_gift, start/end_livestream, view_product, add_to_cart) - RecsysType.TIKTOK: traffic pool racing algorithm with 7-level promotion/ demotion, configurable scoring weights, per-user interest personalization, and 72h time decay - DefaultPlatformType.TIKTOK with conditional DB schema (video, livestream, livestream_viewer, order tables created only for TikTok) - Platform: 14 async handler methods following existing (agent_id, message) dispatch pattern, with trace recording and pool level persistence - generate_tiktok_agent_graph: JSON profile loader with interest tags appended to bio for recsys personalization - OasisEnv: TIKTOK branch with tiktok_recsys_params passthrough for configurable algorithm parameters (14 tunable knobs) All changes are additive — existing Twitter/Reddit functionality is unchanged. Ref: MiroFish issue 666ghj/MiroFish#476
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a815818e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if pct <= promote_pct and level < max_pool_level: | ||
| v["_pool_action"] = "promote" |
There was a problem hiding this comment.
Prevent level-0 videos from being re-promoted
Videos marked traffic_pool_level = 0 are described as “previously demoted/stopped”, but this condition allows them to be promoted again on later recsys updates whenever they rank in the top percentile of pool 0. That reintroduces content that should be permanently removed from circulation and breaks the traffic-pool lifecycle semantics for TikTok experiments.
Useful? React with 👍 / 👎.
| for trace in trace_table: | ||
| if trace.get("action") == ActionType.FOLLOW.value: | ||
| uid = trace["user_id"] |
There was a problem hiding this comment.
Build follow graph from current follow state
This follow map is built only from historical follow traces and never subtracts unfollow actions, so users who unfollow someone will still keep receiving “following” recommendations from that creator. In long simulations with follow churn, this makes the recommendation mix diverge from the actual social graph stored in the follow table.
Useful? React with 👍 / 👎.
| "quality_score": 0.85, | ||
| "hook_strength": 0.90, |
There was a problem hiding this comment.
Avoid passing unsupported upload_video kwargs
This example passes quality_score and hook_strength, but SocialAction.upload_video only accepts content, duration_seconds, category, and topic_tags. When env.step() calls perform_action_by_data, Python will raise TypeError: ... unexpected keyword argument, so the example fails at its first upload step.
Useful? React with 👍 / 👎.
|
Addressed the review feedback in commit
Also added regression coverage in
Validation run: |
Summary
This PR introduces a short-video simulation capability in OASIS with supporting experiment and analysis tooling.
Core changes
oasis/analysisexamples/experiment/short_video_negative_feedbackValidation
Notes for reviewers
Linked Issue
Closes #212
Scope
This PR focuses on the short-video scenario extension and its experiment/analysis workflow, while keeping existing OASIS flows compatible.