AI Coding Agents in Practice: A Data-Driven Approach to Content Topic Selection
A hands-on walkthrough of using an AI coding agent to turn the vague question of "what should I create next" into a quantifiable data-analysis project. It introduces a four-step method — self-analysis, market exploration, data analysis, and strategy generation — for extracting your strengths from historical data, scouting a platform for opportunities, defining clear metric formulas, and converting findings into a concrete topic shortlist. Along the way it includes a Python example of within-group standardization and scoring, a reusable prompt structure, engineering tips for a repeatable pipeline, and an honest assessment of where coding agents excel, where they fall short, and what data can't replace.
Many content creators know this feeling: after pivoting your account’s positioning, you don’t want to waste the audience you’ve already built, so you hesitate to take the first step. The more you think, the more afraid you become to start — until you’re stuck in a loop of overthinking and underdoing. It’s not that topic directions are scarce; the real problem is the decision criteria. Which direction is worth investing in usually comes down to a gut feeling. Every direction looks like it “has potential,” yet none can explain “how big the opportunity is” or “why I would win.”
For people with a data-analysis background, there is a better approach: use data to answer these questions, and turn the subjective question of “what should I create” into a quantifiable, executable data-analysis project. This mindset can be called “data-driven content positioning.” It is in the same vein as Vibe Marketing — the recent practice of driving marketing campaigns with generative tools — where an intelligent coding agent handles the mechanical work of collecting, computing, and visualizing, while the human focuses on judgment and decisions. This article walks through one complete hands-on project, shows how to use a four-step analysis method to run such a data-analysis project, and shares tool-usage experience and engineering lessons along the way.
1. Problem Decomposition: Why Positioning Is Hard
Before diving in, it helps to see the problem clearly. “What should I create” is hard not because options are few, but because too many decision factors are involved — and they constrain one another. It touches at least four dimensions:
- Personal strengths: the expression ability and domain knowledge built up over time;
- Audience needs: what your target audience cares about right now, and where their pain points are;
- Competitive environment: whether supply of similar content is saturated, and how much room there is to differentiate;
- Executability: whether cost, turnaround time, and monetization paths line up.
When deciding by intuition, people usually weigh only one or two dimensions at a time, which easily leads to a state where “every option seems reasonable, yet none is clearly the most worthwhile.”
From a data-analysis perspective, positioning is essentially solving a constrained optimization problem:
- Objective function: maximize the combined return of “exposure × conversion × sustainability” under constraints such as production cost and update frequency;
- Constraints: human capability and time are limited, so you can only choose among multiple candidate directions.
Actual results cannot be known precisely in advance. The best you can do is estimate each candidate’s expected return and risk using historical and market data. With this framing, “I don’t know what to make” becomes three answerable questions:
- What is my content DNA? Which topics have historically performed best, and performed consistently?
- Where are the opportunities in the market? Which demands are strong while quality supply is relatively scarce?
- What is at the intersection? Which topics combine your strengths and market opportunities, and are both feasible and differentiated?
2. The Four-Step Method: Turning Positioning into a Structured Process
Based on this breakdown, the whole analysis can be designed as four interlocking steps:
| Step | Core Question | Main Input | Key Output |
|---|---|---|---|
| ① Self-Analysis (Why) | What am I good at? | Historical content publishing and performance data | Content DNA profile |
| ② Market Exploration (What) | What is the market doing? | Public data of similar content on the platform | Hot-content dataset |
| ③ Data Analysis (How) | What content is more popular? | Structured data from the first two steps | Topic-level performance and opportunity assessment |
| ④ Strategy Generation (Action) | What should I make? | Strengths and opportunity analysis | Concrete topic list and visualization report |
These four steps map to four basic capabilities of data analysis:
- Descriptive analysis answers “what happened in the past” — this is self-analysis;
- Exploratory analysis answers “what is happening in the market” — this is market exploration;
- Diagnostic analysis answers “why this content is more popular” — this is the metrics system and comparative analysis;
- Prescriptive analysis answers “what to do next” — this is topic strategy and action recommendations.
3. Step 1 — Self-Analysis: Extracting Your “Content DNA” from Historical Data
Traditionally, creators judged their strengths only by rereading old posts or asking friends — a small and subjective sample. A more reliable approach is to first gather all the quantifiable performance data from your account’s history and hand it to the agent for structured analysis. Since I have long published article-and-image content, it made a natural testbed.
Fields worth gathering include:
- Content ID: title, publish time, topic or column;
- Exposure metrics: views or plays;
- Engagement metrics: likes, comments, saves, shares, follower gains;
- Content attributes: format (tutorial, retrospective, case breakdown, etc.), length, and whether it includes visual elements.
1. Topic Categorization
Organize content into a structured table by topic and format, making clear “which topic each piece belongs to and which format it uses.” This step looks simple but underpins all later analysis: if topics are too coarse, conclusions become too vague to be useful; if too fine, each category has too few samples and risks producing coincidental conclusions.
2. Performance Metrics and Statistical Distribution
For each piece, compute ratio metrics such as engagement rate, save rate, and comment rate, then look at their overall distribution. Content data usually has a pronounced long tail: a few hits drive most of the traffic, and averages get pulled up by these extremes. So beyond the mean, look at the median and quartiles, and distinguish “occasional hits” from “consistently strong performance.”
Take save rate as an example: it is computed as saves ÷ views × 100%. It matters especially for technical and tutorial content, because the motivation to “save now, read later” is strong. If certain topics have noticeably higher save rates than others, it means the audience treats that content as “reference material worth revisiting” — often a direction worth investing in deeply.
3. Content DNA Profile
Pull out the top 20% of content by performance, summarize common traits across topic, format, and length, and form a “content DNA profile.” For instance, you might observe that “case breakdown + quantitative data” topics consistently rank near the top, while “pure concept explainers” get decent views but low save rates. Such findings become the first layer of evidence for later topic decisions.
4. Stay Critical; Avoid Overfitting
Data only reflects “what worked in the past, on this platform, for this audience” — it cannot prove “it will work in the future too.” Avoid overfitting to historical patterns. For example, attributing a hit to a specific title word when the sample is a single piece is unreliable. A safer practice: conclusions should recur across multiple pieces, or be validated with the next piece you publish.
4. Step 2 — Market Exploration: “Scouting” Your Target Field on the Platform
Knowing “what I am good at” is not enough; you also need to know “what is happening in the market.” This step is essentially a competitor and content-supply survey — just with public content data instead of anything else.
1. Building Search Terms
Starting from your content DNA profile, distill several keyword and topic-word combinations and search each one on the target platform. Record every search term, because different keywords return different content sets and directly determine how representative your sample is.
2. Fields to Collect
Under each topic, sort by engagement and collect the top-ranking samples. Fields include:
- Title and topic tags;
- Engagement (likes, coins, saves, etc.);
- Comment count, bullet-comment count, and view count (where the platform shows them);
- Publish time;
- Video length and the author’s follower count (where obtainable).
3. Prioritize Compliance in Data Acquisition
Prefer the platform’s official open data APIs or public data pages. If you write a script to bulk-collect public data, you must respect the platform’s terms of service and robots protocol, control request frequency, and avoid collecting personal information unrelated to the topic. When you have an agent generate such a script, treat it as an engineering task to accept: is the code repeatable, does it handle exceptions, is the output format stable — not just “does it run.”
4. Storing Raw Data
Once collection is done, organize the data into structured files, record the collection time and source, and produce a traceable “data snapshot.” How large a sample you need depends on your goal:
- To spot hot trends, a few hundred pieces per topic is usually enough;
- To analyze long-tail distributions and account growth patterns, you will need a larger sample.
5. Step 3 — Data Analysis: Turning Data into Conclusions
With “my data” and “market data” in hand, the core work is designing a metrics system and letting the agent do the bulk computation.
1. Define Metric Definitions First, Then Compute
Undefined metrics are the most common and error-prone part of analysis. Before any real computation, give each metric a clear definition:
| Metric | Calculation | Meaning |
|---|---|---|
| Engagement rate | (likes + coins + saves) ÷ views × 100% | Ability to trigger active user feedback |
| Save rate | saves ÷ views × 100% | The content’s “tool value” and long-term value |
| Comment rate | comments ÷ views × 100% | How much discussion and controversy the content sparks |
| Coin-to-like ratio | coins ÷ likes | Users’ willingness to invest in content they approve of |
| Duration density | views ÷ duration (minutes) | Traffic efficiency per unit of time |
| Head concentration | top 10% content’s engagement ÷ total engagement | Strength of the head effect in a niche |
| Supply growth rate | recent new content in sample ÷ total sample | How the niche’s competitive heat is shifting |
Defining the metrics up front ensures every later step is measured “on the same scale.” The same word “popular” can rank completely differently by likes versus by views. Also watch for lagging metrics: content published recently has not accumulated its engagement data yet, so it cannot be compared on the same footing as a months-old “evergreen hit” — normalize by publish time when necessary.
2. Distribution Features and Topic Space
When analyzing a single topic, focus on a few structural features:
- Head concentration: Do a few top authors capture most of the traffic? High concentration means a new account struggles to break through in that niche;
- Content lifespan: Is the hot content “evergreen” or “trend-driven”? Evergreen content is better for accumulation;
- Differentiation space: Is content within the same topic highly homogeneous? The more homogeneous it is, the more valuable a differentiated angle becomes.
3. Quantifying Influence Factors
At the topic level, compare performance differences across topic dimensions, for example:
- Length: short videos under 3 minutes vs. in-depth long videos over 10 minutes;
- Angle: macro methodology vs. specific case breakdowns;
- Format: on-camera explanation vs. screen-recording demos vs. animated diagrams.
Grouping each content type’s engagement rate and save rate reveals which format works better for a given topic. You can hand this step straight to the agent, letting it run statistics and significance tests on the grouped data via script.
4. Correlation Analysis to Find the “Traffic Secrets”
You can go further and compute correlations between metrics — for instance, the relationship between engagement and video length, publish time, or title length. Note that correlation is not causation. A certain kind of title might appear on high-view videos simply because popular content tends to polish its titles. Treat such conclusions as “hypotheses” and validate them with subsequent content.
5. Within-Group Standardization: A Key Engineering Detail
When comparing absolute metrics across accounts and topics, the biggest trap is “incomparable scale”: an account with a million followers and one with ten thousand differ wildly in absolute engagement. A more sensible approach is to compare ratio metrics within the same tier, then use a standardization method to put different topics on the same scale.
The code below demonstrates within-group standardization and composite scoring. The numbers are illustrative only:
import statistics# Each sample: topic, theme, form, duration_min, likes, coins, favorites, comments, views, published_days_agosamples = [{"topic": "AI Tools", "theme": "Case breakdown", "form": "Screen recording","duration_min": 8, "likes": 1800, "coins": 120, "favorites": 900,"comments": 80, "views": 50000, "published_days_ago": 90},{"topic": "AI Tools", "theme": "Methodology", "form": "On-camera","duration_min": 12, "likes": 600, "coins": 30, "favorites": 200,"comments": 40, "views": 12000, "published_days_ago": 120},# More samples: public content data from different topics and different account sizes]def safe_div(a, b):return a / b if b else 0.0def zscore(values):if len(values) < 2:return [0.0] * len(values)mean = statistics.fmean(values)sd = statistics.pstdev(values)return [0.0 if sd == 0 else (v - mean) / sd for v in values]def enrich(rows):"""Compute base ratio metrics; treat missing data as 0 and flag it"""for r in rows:r["eng_rate"] = safe_div(r["likes"] + r["coins"] + r["favorites"], r["views"])r["save_rate"] = safe_div(r["favorites"], r["views"])r["cmt_rate"] = safe_div(r["comments"], r["views"])r["coin_like"] = safe_div(r["coins"], r["likes"])return rowsdef weighted_score(rows):"""Standardize within the same topic, then combine into a composite score by weights"""rows = enrich(rows)for group in {r["topic"] for r in rows}:members = [r for r in rows if r["topic"] == group]for key in ("eng_rate", "save_rate", "cmt_rate"):for r, z in zip(members, zscore([m[key] for m in members])):r.setdefault("z", {})[key] = zfor r in members:z = r["z"]# Adjust weights to your goal: prioritize eng_rate for reach, save_rate for long-tail savesr["score"] = 0.4 * z["eng_rate"] + 0.4 * z["save_rate"] + 0.2 * z["cmt_rate"]return sorted(rows, key=lambda r: r["score"], reverse=True)def opportunities(rows):"""Aggregate at the "topic x angle" granularity to find directions with stable performance and low supply"""cells = {}for r in rows:key = (r["topic"], r["theme"])cells.setdefault(key, []).append(r["score"])result = []for (topic, theme), scores in cells.items():result.append({"topic": topic,"theme": theme,"samples": len(scores),"mean_score": round(statistics.fmean(scores), 3),"median_score": round(statistics.median(scores), 3),"min_score": round(min(scores), 3), # Worst performance: reflects the lower bound of a direction"stability": round(statistics.fmean(scores) - min(scores), 3),})return sorted(result, key=lambda c: (c["stability"], c["median_score"]), reverse=True)if __name__ == "__main__":for item in opportunities(weighted_score(samples)):print(item)print("Top10 content:", [r["topic"] for r in weighted_score(samples)[:10]])
You can hand this script straight to an agent to write and modify, but a human must check three things:
- Whether zero-denominator cases are handled sensibly;
- Whether groups with too-small samples are mistakenly treated as conclusions;
- Whether the weight settings match your own goals.
For example, whether the account primarily chases follower growth or long-term save accumulation directly changes the weights.
6. Step 4 — Strategy Generation: The Strength × Opportunity Cross Matrix
Once the computation is done, the most important step is to “translate” conclusions into topics. A cross matrix works well here:
| Large Market Opportunity | Small Market Opportunity | |
|---|---|---|
| Strong Personal Strength | Main-attack zone: concentrate resources for a focused breakthrough | Base zone: update steadily, serve your existing audience |
| Weak Personal Strength | Observation zone: test cheaply at small cost, then scale up once data validates it | Avoidance zone: hold off for now |
“Market opportunity” is determined by the data from Steps 2 and 3 — for example, the median engagement rate of top content in relevant topics, head concentration, and content lifespan. “My strength” comes from the content DNA profile in Step 1. Once the two are crossed, a previously fuzzy positioning question turns into a decision problem you can rank.
At the concrete topic level, attach actionable information to each recommendation so the strategy reaches a “ready-to-shoot” level of detail:
- Target audience: who this piece speaks to;
- Core hook: what keeps viewers in the first 15 seconds;
- Content structure: overview-details-summary, comparison, case retrospective, etc.;
- Reference samples: common traits of high-engagement similar content in the market;
- Differentiation: how you differ from the mainstream approach on the same subject;
- Expected performance range: based on the historical distribution of similar content, not a guess.
This is where the agent delivers the most value: it can process large amounts of structured data at once, filter and rank by “strength × opportunity” rules, and generate topic descriptions in a consistent template. But the judgment of “is the opportunity big” must be set by a human: what counts as a big opportunity? Is it a median engagement rate above the P75 of the whole sample, or head concentration below some threshold? These criteria should be defined by the human in advance and written into the prompt.
In terms of output form, the final deliverable should not be just a text list, but a visualization report that includes at least:
- An overview of my content performance (views, engagement, saves compared across topics);
- A distribution of hot market content (a box plot showing engagement-rate distributions across topics);
- A strength × opportunity quadrant scatter plot;
- A list of recommended topic cards.
The technical approach for visualization depends on the quality of the front-end page the agent generates. A well-designed report should be “conclusion-first, data-backed, action-ready”: you see conclusions the moment you open it, every conclusion has charts as evidence, and every chart maps to a clear action recommendation.
7. Using an AI Coding Agent: Where It Shines and Where It Falls Short
The four steps above involve a lot of repetitive work: writing scripts, organizing data, computing metrics, drawing charts. This is exactly where an AI coding agent shines. From hands-on use, it is worth evaluating on five dimensions.
1. Task Decomposition: From “Vague Request” to “Clear Steps”
The first time, I simply threw it a request like “analyze my account’s historical data and find the best-performing content directions.” The agent’s first reaction was to ask back: where is the data? which metrics to analyze? what output format?
This may seem redundant, but it actually shows the agent grasping the task’s complexity. Later I learned to specify the data location, the desired analysis dimensions, and the output format in the request, and it could then break the task into an execution chain like “read data → clean → compute metrics → generate charts” fairly accurately.
2. Context Length: How Much “Background” Fits
Different agents have very different context windows. For content-analysis tasks, context length determines how much data and how many rules it can handle in one pass. A 256k context can hold tens of thousands of structured rows, a clear advantage for full-dataset analysis. But a long context does not mean it is all usable:
- Information in the middle of a long context is often overlooked more easily than at the start or end;
- The more data you feed in, the more likely the model is to “miss the point.”
In practice, a better approach is to split big tasks into small steps, giving only the necessary context at each step, rather than stuffing everything in at once.
3. Tool Calling: From “It Runs” to “Few Errors”
Where AI coding agents really separate from one another is the stability of executing tasks via tool calls. Take a collection script:
- When handling anti-scraping mechanisms, can it auto-generate retry logic?
- When it hits encoding problems, can it detect and switch decoding automatically?
- When the output format does not match expectations, can it self-correct?
These details decide whether it “needs a human watching and fixing” or “can finish on its own.”
4. Front-End Aesthetics: Reports Can Look Good Too
For the generated HTML report, whether the style is modern, the layout is clear, and the chart colors are harmonious directly affects the reading experience. Some agents produce reports that look like “piled-up data,” while others automatically add card-style layouts, responsive design, and interactive charts. This is not “flashy decoration” — it is an important factor in how efficiently information is conveyed.
5. Speed and Iteration: Balancing Efficiency and Quality
Generation speed, number of iterations, and token consumption per revision are all real costs to weigh. Fast agents suit “quick trial and error,” while agents strong at iteration suit “refining details.” The two are hard to have at once, so you pick based on the task stage.
It is worth stressing that all of the above are subjective impressions. Models differ a lot across tasks, and the same model can behave very differently under different prompts. A more reliable approach is to run a small comparison test with your own real data and tasks, rather than just looking at benchmark leaderboards.
8. Prompt Engineering: Making the Agent “Understand Your Business”
With the same tool, different prompts can produce several-fold differences in output quality. Building on the four-step method, I summarized the prompt structure for the whole workflow into five parts:
[Role]You are a content strategy analyst who specializes in data-driven content positioning decisions.[Task]Analyze my historical content data and market competitor data, and output actionable topic recommendations.[Input data]- My historical content data (CSV, containing fields such as topic, publish date, views, likes, saves)- Market competitor data (CSV, containing fields such as topic, engagement, views, publish date)[Analysis requirements]1. Compute the engagement rate, save rate, and comment rate for each topic (see definitions below);2. Compare the metric distributions across topics (mean, median, quartiles);3. Use a box plot to show distribution differences;4. Identify "main-attack zone" topics in the "my strength x market opportunity" quadrant;5. Generate 3 concrete topics for each main-attack-zone topic, including target audience, core hook, and reference samples.[Output format]- Structured JSON (containing topics, metrics, conclusions, and topic list)- HTML visualization report (containing charts and text explanations)[Constraints]- The metric calculation definitions must be stated clearly at the beginning of the report;- Topics with a sample size smaller than 30 do not participate in conclusion derivation;- Conclusions must be backed by data and must not be fabricated.
The core idea behind this prompt is “translating business logic into computational logic.” You do not need to tell the agent “what makes a good topic” — you only need to tell it “which metrics measure good vs. bad” and “what data can support a conclusion.” The rest — analysis, computation, visualization — it can complete automatically.
9. Engineering Practices: From “One-Off Analysis” to “Repeatable Pipeline”
If this analysis is a one-time use, its value drops sharply. A more valuable approach is to engineer it into a process you can rerun on a schedule. That takes three things.
1. Automate the Data Pipeline
Write each stage — collection, cleaning, analysis, visualization — as a script, and chain them with a single command. When new data comes in, the whole pipeline runs end to end without manual intervention.
2. Version the Metrics System
Metric definitions change as your business understanding evolves. For example, should “engagement rate” include shares? Should “save rate” account for un-saves? Record a version for every definition change so historical data stays comparable.
3. Make Conclusions Traceable
Every topic recommendation should trace back to its specific data basis: which pieces under which topic it comes from, and why the direction is considered a “big opportunity.” This serves not only your team but also your own later retrospectives.
10. Limitations and Reflection: What Data Can’t Replace
This method has clear limits, and it is honest to admit them:
- Sample bias: the public data visible on a platform is often just “the tip of the iceberg” — much low-engagement content never appears in search results at all;
- Difficulty of causal inference: correlation is not causation; high engagement may come from paid promotion, trending events, and other external factors;
- Timeliness limits: platform algorithms and user preferences change, so the reference value of historical data decays;
- Human factors: whether a topic’s “tone” matches your personal style, and whether your team can support it, cannot be measured by data.
So the right role for data analysis is “supporting decisions,” not “replacing them.” It helps you narrow the options and provides a basis for judgment, but the person who makes the final call is still you.
11. Conclusion: Let Data Be the Tool That Breaks the Deadlock
Back to the original question: how do you break the loop of overthinking and underdoing?
The answer this four-step method offers is: turn an emotional problem into a computable engineering problem.
- Self-analysis: use historical data to find your content DNA;
- Market exploration: use competitor data to see a niche’s opportunities and crowdedness;
- Data analysis: use quantitative metrics to find the “traffic secrets”;
- Strategy generation: use a cross matrix to derive actionable topics.
And an AI coding agent is the “engineering tool” that makes this method truly executable. It cannot decide for you, but it can shorten the path from “data to conclusion” to the extreme: analysis that once took weeks of manual work might now take just a few hours.
If you are stuck in the “I don’t know what to make” trap, give this method a try. First organize your historical content data, then collect a batch of competitor data, then run the whole flow through one AI coding agent. You might find the answer was in the data all along — you just had not used the right tool to dig it out.
