How I Built A YouTube Feedback Loop
I run an automated YouTube channel. Every day, a pipeline generates scripts and renders videos.
For months, the system worked in a vacuum. The script generator produced content without knowing what worked or what failed. I had no feedback loop.
Last week, I fixed this with a 330-line Python script. It creates a closed loop between performance and creation.
Here is how it works:
• Data Collection: The script uses the YouTube Data API v3 to read the last 30 videos. • Classification: It uses a median-based threshold to rank videos.
- HIGH: Videos with views above 1.5x the median.
- LOW: Videos with views below 0.6x the median (only if they are over 72 hours old).
- Everything else is ignored to avoid noise. • Pattern Matching: The script connects performance to "archetypes" like tutorials or comparisons by matching title words. • Hook Analysis: It checks the first word of a script to see if it is a question, a number, or a personal statement. • Automated Updates: The results write "bias hints" into a markdown file.
The script generator reads this file before it writes the next script. It sees what patterns are winning and what patterns are losing. It uses this context to make better choices for tomorrow.
Why I chose this approach:
- Median over Mean: One viral video can ruin a mean average. The median stays stable.
- The 72-hour Rule: New videos need time. I do not label a video as a failure just because it is only one day old.
- Simple Heuristics: I use first-word detection instead of expensive LLM calls for now. It is fast and cheap.
This is not magic. It is a system that learns from its own data.
The goal is not to replace human judgment, but to give the generator better context. I am building a system that gets smarter every 24 hours.
Optional learning community: https://t.me/GyaanSetuAi
