A Two-Stage LLM Architecture for E-Commerce Seller Governance and Anti-Counterfeiting
This article presents a two-stage architecture for intelligent e-commerce seller governance and anti-counterfeiting enforcement. It explains how multimodal initial screening and legal-rule deep review can work together to process large volumes of heterogeneous evidence, extract structured case information, retrieve relevant rules, and support traceable human review. It also covers implementation details, cost and engineering optimization, and compliance boundaries, providing a practical reference for developers building evidence-and-rule-intensive review systems.
1. Background: Efficiency Challenges in Governance and Enforcement
Seller governance and anti-counterfeiting enforcement on e-commerce platforms are fundamentally evidence-intensive and rule-intensive business scenarios. Consumers submit videos of defective products and screenshots of chat records, brand owners file infringement complaints, and platforms must check whether seller promotional copy violates advertising regulations. These tasks have traditionally relied on manual review teams and commonly face three types of problems:
- Large and heterogeneous evidence volumes: Complaint evidence includes images, videos, text, and other formats. Reviewing each item manually is extremely time-consuming, and backlogs become severe during peak periods.
- High expertise threshold for rule-based judgments: Determining whether content constitutes “false advertising” requires understanding platform rules, advertising regulations, and the specific product context at the same time. Ordinary reviewers are prone to missed and incorrect judgments.
- Difficulty balancing cost and timeliness: Sampling reviews to reduce costs increases the risk of missed violations, while full manual review leads to uncontrolled costs.
Large language models, especially combinations of multimodal models and models enhanced for vertical-domain capabilities, provide a new technical path for addressing this challenge.
2. Overall Architecture: A Two-Stage Closed Loop of Initial Screening and Deep Review
A mature engineering solution is to adopt a two-level pipeline of “coarse screening and detailed review,” allowing models with different capabilities to perform their respective roles:
Stage 1: Multimodal Initial Screening (Breadth-First)
- Input: Defect videos uploaded by consumers, product comparison images, and complaint text.
- Task: Extract key product features (brand identifiers, appearance details, packaging information), summarize the complaint focus (quality issue / suspected counterfeit / inaccurate promotion), and output a structured summary.
- Design consideration: This stage prioritizes low cost and high throughput. A relatively lightweight multimodal model classifies all materials as “worth deeper investigation / can be routed directly,” filtering out a large number of invalid or duplicate complaints.
Stage 2: Legal-Rule Deep Review (Precision-First)
- Input: Structured evidence output from Stage 1 + seller product-page copy + platform governance rule base.
- Task: Cross-check infringement materials, determine whether the case constitutes false advertising, counterfeit sales, or intellectual property infringement, and generate compliant penalty recommendations and remediation checklists.
- Design consideration: This stage uses models enhanced on legal corpora and emphasizes explainability of conclusions—each judgment should include cited rule clauses and evidence IDs.
An illustrative pseudocode example is as follows:
# Stage 1: Multimodal initial screeningdef initial_screen(evidence):features = mmlm_extract(evidence.media) # Extract product featuresfocus = mmlm_summarize(evidence.text, features) # Summarize complaint focusreturn {"features": features, "focus": focus, "priority": classify(focus)}# Stage 2: Legal compliance deep reviewdef legal_review(case):matched_rules = retrieve_rules(case.focus) # Retrieve platform rules / legal clausesverdict = legal_llm_analyze(case, matched_rules,require_citations=True)return build_penalty_plan(verdict) # Penalty / remediation checklist
3. Implementation Details of Key Steps
1. Structured Evidence Extraction
Videos and images cannot directly participate in rule comparison. They must first be converted into machine-processable intermediate representations. In practice, models are usually required to output a strict JSON Schema, for example:
{"brand_mentioned": true,"defect_type": "packaging counterfeiting","suspected_infringement": "trademark similarity","confidence": 0.87}
Structured output is not only convenient for downstream programs to consume, but also facilitates subsequent quality sampling and model performance evaluation.
2. Retrieval Augmentation for the Rule Base
Laws and platform rules are updated frequently, so directly embedding rules into prompts is not maintainable. A more robust approach is retrieval-augmented generation (RAG): vectorize platform governance specifications and advertising-related clauses into an index, then dynamically retrieve the most relevant clauses based on case characteristics and inject them into the context during review. In this way, rule updates only require rebuilding the index and do not affect the model side.
3. Traceability of Conclusions and Human Review
Automated review does not mean fully automated execution. For high-stakes enforcement actions such as delisting, point deduction, or store suspension, it is advisable to set confidence thresholds: cases below the threshold are automatically routed to human review, together with the model’s clause citations and reasoning summary. This shifts human reviewers from “finding evidence” to “verifying conclusions,” improving efficiency by an order of magnitude.
4. Cost and Engineering Optimization Priorities
- Tiered model invocation to control costs: In the initial screening stage, choose lower-cost multimodal models to process all materials. Only suspicious cases enter the legal model for detailed review. The ratio between the two stages can be controlled at 10:1 or even higher, making the overall cost far lower than full detailed review.
- Asynchronous pipeline: Material extraction is an IO- and compute-intensive task, suitable for asynchronous consumption through message queues. Object storage can manage original evidence, and review status can be persisted to a database for tracking.
- Prompt and evaluation set accumulation: Build an evaluation set of labeled historical cases. Run regression evaluations whenever prompts are adjusted or models are changed to avoid online performance degradation.
- Compliance boundaries: Model judgments should serve only as auxiliary opinions. Final penalty decisions should retain a human sign-off step to ensure compliance with regulatory expectations for platform governance responsibilities.
5. Summary
The intelligence of seller governance and anti-counterfeiting enforcement does not depend mainly on how strong a single model is. Rather, it depends on a two-stage architecture of “multimodal initial screening + legal-domain deep review”: first turning massive heterogeneous evidence into low-cost, processable structured information, then letting more specialized models make high-precision judgments on the narrowed case set, while using retrieval augmentation to keep rules current and human review to provide a compliance fallback. This closed-loop pattern can also be transferred to other evidence-and-rule-oriented business scenarios such as content moderation and contract review, and is worth considering as a priority in new projects.
