E-Commerce Counterfeit Detection: A Two-Stage Pipeline Combining Multimodal Pre-Screening and Legal LLM Review

    This article presents a two-stage pipeline for handling counterfeit and false-advertising complaints on e-commerce platforms. A multimodal model first converts complaint images and videos into structured JSON, and a legal-domain LLM then matches the structured results against advertising regulations and platform rules to produce candidate rulings. The article covers cost estimation with real API usage logs, data privacy and desensitization requirements, a mandatory human review workflow with evidence traceability, and criteria for evaluating LLM aggregation platforms.

    Overall Architecture: Two Stages with Clear Responsibilities

    The counterfeit-detection and rights-protection workflow on an e-commerce platform can be split into two stages. In the first stage, a multimodal model processes images and videos, converting unstructured evidence into structured text. In the second stage, a legal-specialized model compares the structured output against the consumer’s complaint, advertising law provisions, and platform rules, and produces candidate determinations. Human reviewers close the loop between the two stages; penalties are never issued directly by a model.

    The inputs, outputs, and failure handling of each stage are as follows.

    Stage Input Output Failure Handling Human Intervention Point
    Multimodal pre-screening Complaint images, videos, merchant comparison images JSON of product category, features, and complaint focus Retry after timeout or parse failure; escalate to human review if retry also fails Reviewer supplements when evidence is missing or blurry
    Legal determination Pre-screening JSON, consumer claims, rule library version Potentially violated clauses, basis, and candidate penalty suggestions Resubmit once if output cannot be parsed; escalate to human review if it fails again Human confirmation required before any penalty is issued

    The benefit of this division is that the expensive legal reasoning only processes compressed text rather than raw video. The legal model receives shorter input, and its results are easier to verify.

    Controlling Costs in Multimodal Pre-Screening

    Multimodal models can read images and videos directly, eliminating the manual step of transcribing evidence. Call cost is driven by three factors: the number of files, the resolution or duration of each file, and the output length.

    Costs can be reduced in several ways. First, deduplicate by using image hashes to filter repeated uploads. Second, compress resolution, keeping only enough detail to see defects, labels, and packaging. Third, sample video frames at fixed intervals instead of feeding in the entire clip. Fourth, require the model to output JSON in a fixed structure to cap output length.

    Cost estimation should be based on real call logs, not example numbers from documentation. The table below is an estimation template.

    Item Unit Data Source
    Average daily complaints cases/day Ticket system statistics
    Average images per case images Post-deduplication count
    Average sampled frames per case frames Computed from the sampling strategy
    Average input tokens per call tokens Usage field in API responses
    Average output tokens per call tokens Usage field in API responses
    Input and output unit prices per 1,000 tokens The provider’s pricing page
    Failure retry rate % Retry count divided by total calls

    The daily cost formula is: daily cases × calls per case × (input tokens × input unit price + output tokens × output unit price) ÷ 1000 × (1 + failure retry rate). Only by comparing this result with the labor cost of the old workflow can you determine whether the savings are real.

    Consumer-submitted evidence may contain personal information such as faces, addresses, and order numbers. Data should be desensitized before being sent to the model, keeping only the regions needed for determination. The authorization basis for using this evidence should be written into the business process, for example by referencing relevant clauses in the platform’s user agreement. Retention periods should be defined by the legal team, access should be role-based, and every access should be logged.

    A legal-specialized model can compare clauses quickly, but its conclusions can still be wrong, especially regarding the scope of a clause’s applicability, the validity of evidence, and exception cases. Therefore, the system should output candidate penalty suggestions, with the final decision made by a reviewer. Model conclusions do not replace formal legal opinions.

    The basic human review workflow is as follows.

    1. The reviewer examines the pre-screening results, the original evidence, and the clauses cited by the model.
    2. The reviewer confirms that the evidence matches the complaint and verifies whether the cited clauses apply to the case.
    3. The reviewer chooses to uphold, modify, or reject the candidate suggestion.
    4. Before a penalty is enforced, the merchant is informed of the violation, the basis clauses, and the appeal channel.
    5. If the merchant appeals, a different reviewer re-examines the case. Confirmed misjudgments are reversed and recorded in a misjudgment log.

    Sampling rates can be set weekly. At launch, review every penalty suggestion. Once the system runs stably, switch to proportional sampling. Sampling results are used to estimate the model’s error rate and to tune prompts and the rule library accordingly.

    The evidence chain must be traceable. Each piece of evidence should record its hash value, capture or upload time, source account, and collection time. Each model call should record the model name, model version, prompt version, and rule library version. This way, any penalty can be traced back to the exact inputs and rules in effect at the time.

    Selecting and Integrating an LLM Aggregation Platform

    The value of an LLM aggregation platform lies in unified authentication and a unified call format. When evaluating options, compare the following: whether the platform supports the required multimodal input formats, whether it offers legal or vertical-domain models, whether billing is transparent, whether it provides call logs and usage statistics, and whether switching models requires changes to business code.