Open-Source LLMs for Trend Scanning and Article Generation

    A practical pipeline for using open-source large language models to scan trending topics and produce articles. It covers evaluation criteria, a five-layer architecture, topic cards, retrieval-grounded facts, staged drafting, automated review, and common rollout pitfalls.

    1. Problem Definition: The Real Bottleneck Is Not “Writing”

    Many teams treat automated writing as “give the model a topic and let it emit an article.” The result is often a long piece that is technically correct but empty. The real bottlenecks sit before and after writing:

    • Topic selection: Trends are scattered across many sources. Manual scrolling produces high duplication and a short window of relevance.
    • Source material: Without a structured fact brief, the model can only invent details from parametric memory.
    • Drafting: Generating a long article in one pass easily drifts in structure and contradicts itself.
    • Review: Factual errors, wording risk, and duplication still depend on a full human read.

    The engineering goal is therefore a pipeline that is observable, rerunnable, and scorable—not a one-line prompt that produces a hit.

    2. Capability Baseline: How to Evaluate a General-Purpose Model

    Over the past one to two years, flagship open-source models have improved on several public evaluation dimensions. Those dimensions also explain content-production quality:

    Evaluation dimension (generic) Capability tested Meaning for a writing pipeline
    Real software-defect repair benchmarks Long-context understanding, localization, and rewriting Summarizing long source material and revising under constraints
    Multilingual coding benchmarks Cross-language transfer Localizing content across languages
    Terminal-command task benchmarks Multi-step action and self-correction Driving scripts and batch-processing source material
    Interactive tool-use benchmarks Function calling and state retention Web retrieval and structured extraction
    Web-browsing task benchmarks Retrieve, filter, and summarize Trend scanning and fact checking

    Method note: leaderboard scores are only for initial screening. Final choice must be validated on a small regression set from your own workload. Build 50–100 historical pairs of “input material + expected structure,” then A/B models on structural compliance rate, factual error rate, and human usability rate.

    3. Overall Architecture: A Five-Layer Pipeline

    1. [Ingestion] Multi-source intake → clean and deduplicate
    2. ↓
    3. [Topics] Clustering + heat scoring → topic card (JSON)
    4. ↓
    5. [Evidence] Retrieval augmentation → fact brief (with source and timestamp)
    6. ↓
    7. [Generation] Outline → section drafts → style unification
    8. ↓
    9. [Review] Fact check + risk scan + duplication check → human review → publish

    Design principle: every layer consumes and emits structured data. Layers are decoupled by files or a message queue, so any failed layer can be rerun on its own.

    4. Trend Scanning: From Feeds to Topic Cards

    The ingestion layer should connect multiple source types in a generic way: public web pages, vertical industry sites, internal knowledge bases, and exported user comments. Normalize them into a raw_item with title, body, source, publish time, and original link.

    Deduplication and clustering can stay lightweight: exact dedup via title normalization plus a text fingerprint, then topic clustering via embeddings and a similarity threshold.

    Topic scoring can use an interpretable formula:

    1. def topic_score(cluster, now):
    2. freshness = max(0.0, 1 - (now - cluster.latest_ts).total_seconds() / 86400)
    3. heat = min(1.0, cluster.volume / 50.0) # normalize discussion volume
    4. relevance = cluster.avg_sim_to_account_profile # similarity to the account profile
    5. risk = cluster.risk_level # 0~1, higher means more conservative
    6. return 0.35 * freshness + 0.25 * heat + 0.30 * relevance - 0.20 * risk

    Downstream stages consume a single topic-card shape:

    1. {
    2. "topic_id": "T-20260218-001",
    3. "title_hint": "Progress in tool use for a class of open-source models",
    4. "score": 0.78,
    5. "keywords": ["tool use", "automation", "evaluation"],
    6. "sources": [{"url": "...", "ts": "2026-02-18T09:00:00Z"}],
    7. "risk_level": 0.1
    8. }

    5. Evidence Layer: Retrieval Is the Main Control on Hallucination

    Do not ask the model to “recall” facts. For each topic, retrieve and trim source material into a fact brief with citations, then inject that brief as the only factual source in the prompt. Every fact in the brief carries a source and a time. At generation time, the model may cite only what is in the brief. Claims it cannot support must be left blank rather than filled in.

    6. Generation Layer: Outline First, Then Section Drafts

    Quality variance is high when a long article is generated in one shot. A three-stage flow is more stable:

    1. Outline: Emit only hierarchical headings and the key points of each section. A person or a rule can review this quickly and cheaply.
    2. Sections: Generate one section at a time from the outline. Each section receives a global summary and the text already written, which reduces repetition.
    3. Unification: Align person, glossary, sentence-length distribution, and the opening and closing.

    Keep style constraints in configuration rather than hard-coding them into the prompt:

    1. style:
    2. person: "third person"
    3. tone: "neutral technical narration"
    4. paragraph_max_chars: 220
    5. forbidden: ["absolute claims", "quantitative conclusions without a cited source"]
    6. glossary:
    7. "tool use": "the ability of a model to invoke an external operation through an agreed interface"

    Route models by stage: use a smaller model for coarse filtering, clustering, and summarization; use a flagship model for drafting and review; reuse cached output when the source material is identical. Batching plus concurrency limits can cut cost per piece of content substantially.

    7. Review Layer: Three Automated Gates

    • Fact check: Extract entities, numbers, and times from the draft and look them up in the fact brief. Anything without a source is sent back.
    • Risk scan: A compliance term list, regex rules, and a model pass produce a risk level rather than a binary verdict.
    • Duplication and style consistency: Compare the draft with the historical article library. Above a threshold, prompt a rewrite from a different angle.

    A sketch of the pipeline:

    1. for card in select_topics(load_clusters(), k=5):
    2. facts = build_evidence(card) # retrieval augmentation
    3. outline = llm(outline_prompt(card), tier="small")
    4. draft = [llm(section_prompt(s, facts), tier="large") for s in outline]
    5. report = review(draft, facts) # facts / risk / duplication
    6. if report.pass_rate > 0.9:
    7. publish(queue, merge(draft, report))
    8. else:
    9. push_review_queue(card, report) # human fallback

    8. Rollout Path and Common Pitfalls

    Suggested path: Stage one is trend scanning plus topic cards, with humans still writing. Stage two adds the evidence layer and outlines, with humans writing the body. Stage three is fully automatic drafting plus a final human review. Each stage uses “human usability rate” as the gate before scaling volume.

    Common pitfalls:

    1. Chasing full automation and skipping the fact brief, so hallucination rate cannot be controlled.
    2. Stuffing every style rule into the prompt, so the model trades one constraint off against another.
    3. Having no regression set, so a model swap collapses quality with no way to attribute the cause.
    4. Ingestion with no rate limits, so source-site throttling blocks the whole chain.
    5. No cost or latency observation, so the relevance window has already closed.

    Each stage can sit on ordinary cloud building blocks: object storage for source material and finished pieces, a message queue to decouple layers, a container platform for batch jobs, and logging plus monitoring and alerting for observability. General capabilities on platforms such as Baidu AI Cloud can serve as that base; the actual choice should still follow your own load tests.

    Conclusion: The advantage of automated writing does not come from how striking a single generation looks. It comes from a pipeline that is stable and verifiable. Split topic selection, evidence, generation, and review, and set a threshold for each. That is the path from general-purpose model capability to sustained content output.