<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: cheng zhang</title>
    <description>The latest articles on DEV Community by cheng zhang (@cheng_zhang_45ee857b979b0).</description>
    <link>https://dev.to/cheng_zhang_45ee857b979b0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4022346%2Ffa07006f-a4c9-4d33-9d93-9c35a9a8edb2.png</url>
      <title>DEV Community: cheng zhang</title>
      <link>https://dev.to/cheng_zhang_45ee857b979b0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cheng_zhang_45ee857b979b0"/>
    <language>en</language>
    <item>
      <title>Google Cloud API Gateway Model Routing: One OpenAI-Compatible Endpoint for Multiple LLMs</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Wed, 19 Aug 2026 01:58:11 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/google-cloud-api-gateway-model-routing-one-openai-compatible-endpoint-for-multiple-llms-3o99</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/google-cloud-api-gateway-model-routing-one-openai-compatible-endpoint-for-multiple-llms-3o99</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;Enterprise AI applications increasingly use more than one model. Low-cost models may handle routine support, stronger models may handle reasoning or coding, and open models may serve batch workloads. If every application integrates directly with every provider, credentials, retries, rate limits, model IDs, and cost tracking spread across the codebase. Google Cloud API Gateway now offers Model Routing in Public Preview. It can expose an OpenAI-compatible endpoint and route requests, through OpenAPI 3.x configuration, to Google-hosted Gemini, Claude, or OpenAI OSS-GPT backends. The real value is not calling three models through one API. It is decoupling business code from model vendors.&lt;/p&gt;




&lt;p&gt;A prototype often contains provider-specific branches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;call_gemini&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;call_claude&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At scale, every service ends up with its own SDKs, provider keys, retry policies, token tracking, and migration logic.&lt;/p&gt;

&lt;p&gt;An LLM gateway centralizes those concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Target architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;application
→ LLM gateway
   ├── authentication
   ├── routing
   ├── rate limits
   ├── token tracking
   ├── policy
   └── observability
→ model backends
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application talks to a stable internal endpoint while model choices remain behind the gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Google Cloud added
&lt;/h2&gt;

&lt;p&gt;Google Cloud API Gateway Model Routing is currently in Public Preview. It can accept OpenAI-compatible requests and route them to Google Cloud-hosted model backends including Gemini, Claude, and OpenAI OSS-GPT examples.&lt;/p&gt;

&lt;p&gt;The gateway can transcode requests, attach the required backend authentication, and invoke the selected model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decouple applications from provider endpoints
&lt;/h2&gt;

&lt;p&gt;Applications can always call something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://ai.company.com/v1/chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend can change from Gemini to Claude or another hosted model without requiring business-code changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate client and backend authentication
&lt;/h2&gt;

&lt;p&gt;Without a gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;application
→ provider credential
→ model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;application
→ company credential
→ gateway
→ backend credential
→ model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Applications authenticate to the enterprise endpoint while backend credentials are rotated centrally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conceptual routing configuration
&lt;/h2&gt;

&lt;p&gt;A simplified structure looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;openapi&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;3.0.4&lt;/span&gt;

&lt;span class="na"&gt;x-google-api-management&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;backends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;gemini-fast&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://aiplatform.googleapis.com/...&lt;/span&gt;

    &lt;span class="na"&gt;claude-strong&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://aiplatform.googleapis.com/...&lt;/span&gt;

  &lt;span class="na"&gt;ai&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;models&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;routing&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;routers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;default-router&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;defaultModel&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gemini-fast&lt;/span&gt;
            &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;claude-strong&lt;/span&gt;
                &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;claude-strong&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application can then send a familiar OpenAI-style request with a model value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prefer virtual models
&lt;/h2&gt;

&lt;p&gt;Do not expose concrete provider model IDs throughout business code.&lt;/p&gt;

&lt;p&gt;Use names such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chat-fast
chat-balanced
reasoning-high
coding-high
batch-cheap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The platform maps those names to actual backends.&lt;/p&gt;

&lt;p&gt;This makes upgrades, fallbacks, and vendor changes much easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why virtual models matter
&lt;/h2&gt;

&lt;p&gt;When a model version changes, applications do not need to change. When one backend is degraded, the mapping can be updated centrally.&lt;/p&gt;

&lt;p&gt;Applications should choose a capability tier. The platform should choose the actual model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Routing strategies
&lt;/h2&gt;

&lt;p&gt;A gateway can route by explicit application choice, plan level, task type, or availability policy. More complex dynamic routing based on cost and live quality may require an additional AI control service outside the basic API Gateway feature set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current host limitation
&lt;/h2&gt;

&lt;p&gt;Google documents an important constraint: backends referenced by one router must share the same host, such as &lt;code&gt;aiplatform.googleapis.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is not an arbitrary cross-internet reverse proxy. It is best understood as routing across Google Cloud-hosted model backends.&lt;/p&gt;

&lt;p&gt;Claude can still participate because it can be accessed through a Google Cloud-hosted model endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenAI-compatible clients reduce migration cost
&lt;/h2&gt;

&lt;p&gt;Many frameworks already support configurable &lt;code&gt;base_url&lt;/code&gt; and &lt;code&gt;api_key&lt;/code&gt; values. A compatible gateway lets applications migrate without rewriting complete provider integrations.&lt;/p&gt;

&lt;p&gt;But schema compatibility does not imply behavioral equivalence.&lt;/p&gt;

&lt;p&gt;Models still differ in tool calling, structured output, reasoning, vision, streaming, context, safety, and token accounting.&lt;/p&gt;

&lt;p&gt;Every substitution still needs evaluations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintain a capability registry
&lt;/h2&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;chat-fast&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;supports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;text&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;streaming&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;tools&lt;/span&gt;

&lt;span class="na"&gt;reasoning-high&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;supports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;text&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;tools&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;structured_output&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Applications should request required capabilities rather than assuming all models behave the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rate limiting should be multi-dimensional
&lt;/h2&gt;

&lt;p&gt;A useful policy hierarchy is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user
tenant
application
virtual model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents one agent or department from consuming all high-end capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost attribution belongs at the gateway
&lt;/h2&gt;

&lt;p&gt;Record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tenant
user
application
virtual model
actual model
input tokens
output tokens
latency
cost
status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Otherwise centralized routing merely produces a centralized but opaque cloud bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Budget policies
&lt;/h2&gt;

&lt;p&gt;Budgets can be defined by department or product. At 80% utilization, warn. At 100%, downgrade or require approval.&lt;/p&gt;

&lt;p&gt;A mature model router optimizes business value, SLA, and cost rather than simply picking the strongest model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roll out model changes gradually
&lt;/h2&gt;

&lt;p&gt;When changing the backend behind a virtual model, use staged rollout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1%
→ 10%
→ 25%
→ 50%
→ 100%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compare task success, latency, cost, safety, and user feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run evaluations before routing changes
&lt;/h2&gt;

&lt;p&gt;Evaluation should cover the real workload: FAQ, code, RAG, structured JSON, long context, tool calling, Chinese, edge cases, and safety.&lt;/p&gt;

&lt;p&gt;Do not rely only on vendor benchmark scores.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fallback needs error classification
&lt;/h2&gt;

&lt;p&gt;Rate limits, timeouts, and some transient server errors may justify fallback.&lt;/p&gt;

&lt;p&gt;Invalid requests, schema failures, and permission errors usually do not.&lt;/p&gt;

&lt;p&gt;Blind fallback can multiply costs without solving the issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business side effects still need idempotency
&lt;/h2&gt;

&lt;p&gt;A model gateway does not solve transactional semantics. If an agent creates an order, experiences a network timeout, and retries through another model, the business tool can execute twice unless it supports an idempotency key.&lt;/p&gt;

&lt;p&gt;The gateway manages model routing. The business layer manages business correctness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommended layered architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;client
→ API Gateway
   ├── auth
   ├── rate limit
   ├── virtual routing
   └── token tracking
→ optional AI gateway service
   ├── capability checks
   ├── policy
   ├── budgets
   ├── eval flags
   ├── retries
   └── traces
→ Google-hosted models
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Smaller teams can begin directly with API Gateway. Larger organizations may add a dedicated AI control layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  When this approach fits
&lt;/h2&gt;

&lt;p&gt;It is attractive when the organization already runs heavily on Google Cloud, prefers serverless infrastructure, does not want to operate an open-source gateway cluster, and can access required models through Google Cloud-hosted endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  When another gateway may fit better
&lt;/h2&gt;

&lt;p&gt;A self-managed gateway may be a better fit for direct multi-provider internet routing, highly customized caching and billing, non-Google-hosted models, or complete self-hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Google Cloud API Gateway Model Routing is not mainly about calling Gemini, Claude, and OSS-GPT from one API. It is about keeping business code independent from specific model vendors.&lt;/p&gt;

&lt;p&gt;The architecture shifts from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app → provider API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app → enterprise AI endpoint → routing → model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That creates a central place for authentication, model selection, rate limits, cost, fallback, and auditing.&lt;/p&gt;

&lt;p&gt;For enterprises already operating on Google Cloud, the Public Preview is a practical LLM gateway option worth evaluating.&lt;/p&gt;

&lt;p&gt;For more model-routing, LLM gateway, agent infrastructure, and production AI engineering guides, visit &lt;strong&gt;Zyentor Picks&lt;/strong&gt;: &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;https://www.zyentorpicks.com/&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/google-cloud-api-gateway-model-routing" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>googlecloud</category>
      <category>api</category>
      <category>llm</category>
    </item>
    <item>
      <title>GitHub Copilot Agent Plugins 1.0: Build Once, Run Across Agent Clients</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Tue, 18 Aug 2026 03:42:01 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/github-copilot-agent-plugins-10-build-once-run-across-agent-clients-39bj</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/github-copilot-agent-plugins-10-build-once-run-across-agent-clients-39bj</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;On August 12, 2026, GitHub announced general support for Agent Plugins 1.0 in VS Code, Copilot CLI, the GitHub Copilot SDK, and the Copilot app. The more important point is that Agent Plugins 1.0 is not merely a GitHub-specific extension format. It is an open standard developed with participation from AWS, Anysphere, Microsoft, OpenAI, and Vercel, with Google also joining as a core maintainer. Its core idea is to package skills and MCP server configuration into one installable unit that compatible agent clients can inspect and consume. This article explains the relationship between skills, MCP, plugins, portability, governance, and why agent capability packaging may become an important layer of the AI developer stack.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why do agents need another plugin standard?
&lt;/h2&gt;

&lt;p&gt;Developers increasingly face a packaging problem.&lt;/p&gt;

&lt;p&gt;Imagine a deployment capability. It contains a skill describing release procedures, rollback rules, production checks, and incident policies. It also contains an MCP server exposing tools such as deployment status, deploy, rollback, and log query.&lt;/p&gt;

&lt;p&gt;The underlying capability exists once, but supporting several agent clients has historically required different manifests, directory layouts, installation steps, and vendor-specific wrappers.&lt;/p&gt;

&lt;p&gt;Agent Plugins 1.0 attempts to reduce that duplication.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The core idea
&lt;/h2&gt;

&lt;p&gt;The principle is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;build one package that compatible agent clients can understand.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A package may contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugin.json
skills/
mcp.json
vendor-specific/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The standard portions can be shared, while vendor-specific features remain namespaced.&lt;/p&gt;

&lt;p&gt;For Copilot, a package can contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;com.github.copilot/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;for features that other clients can ignore.&lt;/p&gt;

&lt;p&gt;This creates a practical compromise: standardize portable capabilities without eliminating vendor innovation.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Skill, MCP, and Plugin are different layers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Skill
&lt;/h3&gt;

&lt;p&gt;A skill tells the agent how a task should be performed. It can encode workflow, domain rules, runbooks, templates, examples, and best practices.&lt;/p&gt;

&lt;h3&gt;
  
  
  MCP server
&lt;/h3&gt;

&lt;p&gt;MCP gives the agent controlled access to tools and external systems such as GitHub, Jira, databases, Kubernetes, CRM, and browsers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plugin
&lt;/h3&gt;

&lt;p&gt;The plugin is the packaging and distribution unit.&lt;/p&gt;

&lt;p&gt;A useful mental model is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Skill = procedure and knowledge
MCP = tool access
Plugin = packaging and distribution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They complement rather than replace each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Why combining skills and tools matters
&lt;/h2&gt;

&lt;p&gt;A deployment MCP server may expose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deploy()
rollback()
get_status()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But tools alone do not teach the agent when deployment is allowed, which checks are mandatory, which environments require approval, or when rollback is required.&lt;/p&gt;

&lt;p&gt;A skill can encode those rules.&lt;/p&gt;

&lt;p&gt;Together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;skill → defines the safe procedure
MCP → provides controlled actions
plugin → distributes them together
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That resembles a complete agent capability.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Current GitHub Copilot support
&lt;/h2&gt;

&lt;p&gt;GitHub says Agent Plugins 1.0 is generally available in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VS Code;&lt;/li&gt;
&lt;li&gt;Copilot CLI;&lt;/li&gt;
&lt;li&gt;GitHub Copilot SDK;&lt;/li&gt;
&lt;li&gt;GitHub Copilot app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One compatible package can therefore be reused across several Copilot surfaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Why enterprises benefit more than individuals
&lt;/h2&gt;

&lt;p&gt;An enterprise may have hundreds of developers, dozens of internal agents, many tools, multiple IDEs, several CLIs, and more than one agent platform.&lt;/p&gt;

&lt;p&gt;If every integration requires separate installation, authorization, upgrades, and auditing, governance becomes expensive.&lt;/p&gt;

&lt;p&gt;A standardized plugin can support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enterprise marketplace
→ approved plugin
→ developer installation
→ skill + MCP
→ controlled version
→ controlled permissions
→ controlled update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a major operational benefit.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Agent Plugin can become a software distribution unit
&lt;/h2&gt;

&lt;p&gt;Traditional enterprise software is distributed as applications, packages, containers, and extensions.&lt;/p&gt;

&lt;p&gt;The agent era may add another unit: the agent plugin.&lt;/p&gt;

&lt;p&gt;An organization could maintain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;company-deploy
company-database
company-security
company-support
company-finance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each package can contain procedures, tools, rules, agents, commands, and hooks.&lt;/p&gt;

&lt;p&gt;Installing it gives a compatible agent a governed enterprise capability.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Why portability matters
&lt;/h2&gt;

&lt;p&gt;The standard is intended to be independent of a single vendor.&lt;/p&gt;

&lt;p&gt;GitHub says the specification was published with participation from AWS, Anysphere, Microsoft, OpenAI, and Vercel, while Google joined as a core maintainer.&lt;/p&gt;

&lt;p&gt;This signals a broader direction: agent extension ecosystems are moving from isolated formats toward shared packaging.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Portable does not mean identical everywhere
&lt;/h2&gt;

&lt;p&gt;A plugin can contain standard parts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;skills/
mcp.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and vendor-specific parts such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;com.github.copilot/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Other clients do not automatically understand Copilot-only agents, commands, rules, hooks, or canvases.&lt;/p&gt;

&lt;p&gt;The common core can be portable while vendor-specific capabilities remain different.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. A minimal conceptual package
&lt;/h2&gt;

&lt;p&gt;A simple package might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;company-deploy/
├── plugin.json
├── skills/
│   └── deployment/
│       └── SKILL.md
└── mcp.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A deployment skill could define pre-deployment checks, approval, database migration review, health verification, error-rate review, and rollback conditions.&lt;/p&gt;

&lt;p&gt;The MCP server provides the actual deployment operations.&lt;/p&gt;

&lt;p&gt;The result is a reusable enterprise capability.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Enterprise marketplaces need governance
&lt;/h2&gt;

&lt;p&gt;A useful internal marketplace should include a registry, security scanning, risk-based approval, and controlled distribution.&lt;/p&gt;

&lt;p&gt;Track plugin version, publisher, owner, source, license, risk, MCP servers, and permissions.&lt;/p&gt;

&lt;p&gt;Allow installation only from approved marketplaces rather than arbitrary repositories.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. GitHub managed settings
&lt;/h2&gt;

&lt;p&gt;GitHub exposes managed settings such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enabledPlugins
extraKnownMarketplaces
strictKnownMarketplaces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These settings allow organizations to install or block plugins, add approved marketplaces, and restrict installation to managed marketplaces.&lt;/p&gt;

&lt;p&gt;This matters because plugins can include MCP server configuration and therefore carry real system access.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. MCP allowlists still matter
&lt;/h2&gt;

&lt;p&gt;Approving a plugin should not automatically approve every MCP server or every runtime call.&lt;/p&gt;

&lt;p&gt;A safer policy is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugin approved
AND
MCP server approved
AND
user has required role
AND
runtime tool policy passes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only then does execution proceed.&lt;/p&gt;

&lt;h2&gt;
  
  
  14. Plugin supply-chain risk
&lt;/h2&gt;

&lt;p&gt;A plugin can combine instructions, tools, hooks, and commands.&lt;/p&gt;

&lt;p&gt;A malicious or compromised package could enable data exfiltration, malicious shell execution, credential theft, MCP redirection, prompt injection, persistence through hooks, or supply-chain compromise.&lt;/p&gt;

&lt;p&gt;Agent plugins should therefore be governed like software dependencies, not decorative editor themes.&lt;/p&gt;

&lt;h2&gt;
  
  
  15. Recommended security pipeline
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;develop plugin
→ code review
→ static scan
→ skill-content scan
→ MCP allowlist check
→ permission review
→ signing
→ internal marketplace
→ staged installation
→ runtime auditing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Track plugin ID, version, publisher, hash, MCP servers, skills, permissions, installed users, and last update.&lt;/p&gt;

&lt;h2&gt;
  
  
  16. Good candidates for internal plugins
&lt;/h2&gt;

&lt;p&gt;Plugins are especially useful for frequent, repeatable, tool-enabled work.&lt;/p&gt;

&lt;p&gt;Examples include DevOps deployment and rollback, data queries and reports, security investigation, issue analysis, support order lookup, and ticket creation.&lt;/p&gt;

&lt;p&gt;A useful rule is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;frequent workflow + stable procedure + tools + multiple agent clients.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  17. Poor candidates
&lt;/h2&gt;

&lt;p&gt;Avoid packaging every process.&lt;/p&gt;

&lt;p&gt;Weak candidates include rare workflows, tasks requiring substantial human judgment, unstable systems without reliable APIs, and environments with immature authorization.&lt;/p&gt;

&lt;p&gt;Govern the underlying system before exposing it to agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  18. Likely future layering
&lt;/h2&gt;

&lt;p&gt;A common stack may emerge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent Client
↓
Plugin
├── Skills
├── MCP Servers
├── Rules
├── Commands
├── Hooks
└── Vendor Extensions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that stack, MCP is the tool-connectivity layer, Skills are the procedural layer, Plugins are the packaging layer, and Agent Clients are the runtime layer.&lt;/p&gt;

&lt;p&gt;This begins to resemble browsers and extensions or IDEs and plugin marketplaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  19. Why standards may matter more than another model benchmark
&lt;/h2&gt;

&lt;p&gt;Models change rapidly.&lt;/p&gt;

&lt;p&gt;Enterprise assets are more durable: tools, workflows, policies, permissions, internal systems, and domain knowledge.&lt;/p&gt;

&lt;p&gt;If those assets can move across compatible agent clients, organizations reduce vendor lock-in and avoid rebuilding every integration when the user-facing agent changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  20. Do existing Copilot plugins need immediate migration?
&lt;/h2&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;GitHub says existing plugins that do not target Agent Plugins 1.0 remain supported.&lt;/p&gt;

&lt;p&gt;A sensible policy is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep stable production plugins unchanged initially;&lt;/li&gt;
&lt;li&gt;use Agent Plugins 1.0 for new portable packages;&lt;/li&gt;
&lt;li&gt;prioritize migration where multiple clients need the same capability;&lt;/li&gt;
&lt;li&gt;migrate Copilot-only packages when the operational benefit is clear.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  21. Suggested enterprise repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent-plugins/
├── deployment/
│   ├── plugin.json
│   ├── skills/
│   ├── mcp.json
│   └── com.github.copilot/
├── database/
├── security/
└── support/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add CODEOWNERS, CI, security scanning, version tags, and release notes.&lt;/p&gt;

&lt;p&gt;Do not let agent plugins become unmanaged configuration on individual laptops.&lt;/p&gt;

&lt;h2&gt;
  
  
  22. Launch checklist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Functionality
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Does the target client load the plugin?&lt;/li&gt;
&lt;li&gt;Are skills discovered correctly?&lt;/li&gt;
&lt;li&gt;Does MCP connect?&lt;/li&gt;
&lt;li&gt;Are vendor-specific extensions isolated?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Are MCP servers allowlisted?&lt;/li&gt;
&lt;li&gt;Does the package execute shell commands?&lt;/li&gt;
&lt;li&gt;Can it access secrets?&lt;/li&gt;
&lt;li&gt;Can it reach production?&lt;/li&gt;
&lt;li&gt;Do high-risk tools require approval?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Governance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Who owns it?&lt;/li&gt;
&lt;li&gt;Which version is installed?&lt;/li&gt;
&lt;li&gt;Who may install it?&lt;/li&gt;
&lt;li&gt;How is it revoked?&lt;/li&gt;
&lt;li&gt;How is it updated?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Operations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Are calls traceable?&lt;/li&gt;
&lt;li&gt;Are tool errors observable?&lt;/li&gt;
&lt;li&gt;What happens when MCP is unavailable?&lt;/li&gt;
&lt;li&gt;How are new versions rolled out gradually?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;GitHub’s support for Agent Plugins 1.0 looks like an extension-system update, but it points to a larger shift:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;agent capabilities are becoming portable software packages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The stack is becoming clearer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Skill → how to perform the task
MCP → which tools can be called
Plugin → how capability is packaged and distributed
Agent Client → where it runs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For individuals, this reduces configuration duplication. For enterprises, the bigger value is internal marketplaces, consistent versions, centralized permissions, security scanning, reuse across agent clients, and reduced vendor lock-in.&lt;/p&gt;

&lt;p&gt;If the standard continues to gain cross-vendor support, organizations may package enterprise capabilities once and make them safely available to multiple compatible agents.&lt;/p&gt;

&lt;p&gt;For more analysis of Agent Plugins, MCP, Skills, and enterprise AI governance, visit &lt;strong&gt;Zyentor Picks&lt;/strong&gt;: &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;https://www.zyentorpicks.com/&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/reviews/github-copilot-agent-plugins-1-0" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>github</category>
      <category>devops</category>
    </item>
    <item>
      <title>Gemini Live API Async Function Calling for Real-Time Voice Agents</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Tue, 18 Aug 2026 03:40:53 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/gemini-live-api-async-function-calling-for-real-time-voice-agents-3lon</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/gemini-live-api-async-function-calling-for-real-time-voice-agents-3lon</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;One of the biggest usability problems in real-time voice agents is tool latency. If the model needs to query CRM, orders, databases, search, or ticketing systems and every function call blocks the conversation, the user experiences several seconds of silence. Gemini Live API supports asynchronous function calling in its cascaded architecture. A function can be marked &lt;code&gt;NON_BLOCKING&lt;/code&gt;, allowing the live conversation to continue while the tool executes in the background. This does not mean the model can invent tool-dependent facts. It means developers need explicit task state, timeouts, cancellation, concurrency controls, result correlation, permissions, and idempotency.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why tool latency hurts voice agents
&lt;/h2&gt;

&lt;p&gt;Text users may tolerate a few seconds. Voice users notice silence immediately.&lt;/p&gt;

&lt;p&gt;A normal live interaction can include speech understanding, CRM, databases, search, model generation, and audio output. External systems have unpredictable latency.&lt;/p&gt;

&lt;p&gt;If every tool call blocks the session, natural conversation disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Blocking function calls
&lt;/h2&gt;

&lt;p&gt;A traditional flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user asks
→ model calls get_refund_status
→ conversation pauses
→ backend waits four seconds
→ result returns
→ model resumes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user hears a long gap.&lt;/p&gt;

&lt;p&gt;That may be acceptable for some transactional workflows, but it is poor conversational design.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What NON_BLOCKING changes
&lt;/h2&gt;

&lt;p&gt;With asynchronous function calling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user request
→ model starts tool call
├── tool executes in background
└── conversation continues
→ result returns
→ model incorporates result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent can ask a clarification or explain the process while waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Asynchronous does not mean speculative
&lt;/h2&gt;

&lt;p&gt;If the refund status has not returned, the agent must not claim that the refund is complete.&lt;/p&gt;

&lt;p&gt;Separate state into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;known
pending
unknown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only confirmed data should be presented as fact.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Good non-blocking tools
&lt;/h2&gt;

&lt;p&gt;Useful candidates include customer lookup, order status, tickets, inventory, shipping, knowledge retrieval, web search, recommendations, and other independent read operations.&lt;/p&gt;

&lt;p&gt;Several independent read calls can also execute in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Poor non-blocking candidates
&lt;/h2&gt;

&lt;p&gt;Be cautious with payments, deletes, production changes, irreversible operations, and any eligibility decision that is required before downstream logic can continue.&lt;/p&gt;

&lt;p&gt;These often require blocking behavior and explicit approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Recommended architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;microphone
→ Gemini Live session
→ tool router
   ├── blocking
   ├── non-blocking
   └── approval-required
→ async task manager
   ├── timeout
   ├── retry
   ├── cancellation
   └── idempotency
→ enterprise APIs
→ tool result
→ live session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add authorization, tracing, cost controls, and audit logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Tool policy belongs in the application
&lt;/h2&gt;

&lt;p&gt;Maintain metadata such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;get_refund_status&lt;/span&gt;
&lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;non_blocking&lt;/span&gt;
&lt;span class="na"&gt;timeout_ms&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5000&lt;/span&gt;
&lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;idempotent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;risk&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
&lt;span class="na"&gt;requires_confirmation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a financial write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;create_refund&lt;/span&gt;
&lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;blocking&lt;/span&gt;
&lt;span class="na"&gt;timeout_ms&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10000&lt;/span&gt;
&lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;idempotent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;risk&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;financial&lt;/span&gt;
&lt;span class="na"&gt;requires_confirmation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model should not classify business risk by itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Conceptual Gemini declaration
&lt;/h2&gt;

&lt;p&gt;Exact syntax should follow the active SDK version, but conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;function_declarations&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;get_order_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Get current order status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;parameters&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;object&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;properties&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;string&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;},&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;required&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;behavior&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;NON_BLOCKING&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important behavior is that the live session does not have to stop while the function runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Use an async task manager
&lt;/h2&gt;

&lt;p&gt;Do not block a WebSocket callback with synchronous HTTP work.&lt;/p&gt;

&lt;p&gt;Instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;task_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_task_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;run_with_timeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;task_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When it completes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;on_tool_done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;task_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;send_tool_result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  11. Every tool needs a timeout
&lt;/h2&gt;

&lt;p&gt;External services may respond in 300 milliseconds, two seconds, eight seconds, or never.&lt;/p&gt;

&lt;p&gt;A timed-out task should return structured state instead of remaining pending forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Continue the conversation during delays
&lt;/h2&gt;

&lt;p&gt;Instead of dead air, the agent can say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The customer system is taking a little longer. I can confirm a few details while it finishes.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is one of the main user-experience benefits of asynchronous tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. Limit parallelism
&lt;/h2&gt;

&lt;p&gt;A model may want to call CRM, orders, tickets, payments, email, and analytics at once.&lt;/p&gt;

&lt;p&gt;Set a practical limit such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;max_parallel_tools = 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Queue the rest.&lt;/p&gt;

&lt;p&gt;This protects downstream systems and keeps state manageable.&lt;/p&gt;

&lt;h2&gt;
  
  
  14. Correlate results correctly
&lt;/h2&gt;

&lt;p&gt;Store:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;session_id
call_id
tool
arguments
start time
conversation turn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a result returns, match the call ID, confirm that the session is still valid, decide whether the result remains relevant, and only then deliver it back to the live model.&lt;/p&gt;

&lt;h2&gt;
  
  
  15. Handle topic changes
&lt;/h2&gt;

&lt;p&gt;The user may request order A and then immediately correct the request to order B.&lt;/p&gt;

&lt;p&gt;If possible, cancel A. If cancellation is impossible, mark its result stale and do not inject it into the active conversation.&lt;/p&gt;

&lt;p&gt;Useful states include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PENDING
RUNNING
COMPLETED
TIMEOUT
FAILED
CANCELLED
STALE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  16. Use idempotency for writes
&lt;/h2&gt;

&lt;p&gt;Async systems create retry ambiguity. A remote write may succeed while the client loses the response.&lt;/p&gt;

&lt;p&gt;Use an idempotency key for side-effecting operations such as ticket creation or order changes. The target service should guarantee one execution per key.&lt;/p&gt;

&lt;h2&gt;
  
  
  17. User interruptions must stop current speech
&lt;/h2&gt;

&lt;p&gt;A real voice agent must support barge-in.&lt;/p&gt;

&lt;p&gt;When a user interrupts, stop current audio, process the new input, decide whether existing tool tasks remain relevant, cancel or mark them stale, and continue with the updated goal.&lt;/p&gt;

&lt;h2&gt;
  
  
  18. What the agent can do while waiting
&lt;/h2&gt;

&lt;p&gt;Useful actions include asking clarifying questions, collecting identity details, explaining process, and running independent read tools.&lt;/p&gt;

&lt;p&gt;The agent should never invent pending results, promise unconfirmed outcomes, or claim that an operation completed before confirmation.&lt;/p&gt;

&lt;p&gt;A useful instruction is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Never state that a tool-dependent fact is confirmed
until the corresponding tool result is received.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  19. Authorization remains mandatory
&lt;/h2&gt;

&lt;p&gt;A model-generated tool call is not authorization.&lt;/p&gt;

&lt;p&gt;The application still needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user identity
→ role
→ resource permission
→ tool permission
→ argument validation
→ execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Otherwise the voice agent becomes an authorization bypass.&lt;/p&gt;

&lt;h2&gt;
  
  
  20. Minimize sensitive tool output
&lt;/h2&gt;

&lt;p&gt;If a CRM result contains identity documents, bank information, contact details, and order state while the user asked only for order status, return only the necessary field to the model.&lt;/p&gt;

&lt;p&gt;Minimizing model exposure is a basic production principle.&lt;/p&gt;

&lt;h2&gt;
  
  
  21. Observability
&lt;/h2&gt;

&lt;p&gt;Track:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;session_id
call_id
tool
mode
start
end
latency
status
retry count
cancellation
token use
business result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important metrics include tool P50/P95 latency, timeout rate, cancellation rate, parallel call count, task success, first-audio latency, and conversation silence time.&lt;/p&gt;

&lt;h2&gt;
  
  
  22. Conversation silence time is a key metric
&lt;/h2&gt;

&lt;p&gt;Backend tool latency alone does not describe user experience.&lt;/p&gt;

&lt;p&gt;A tool may take four seconds, but if the agent keeps the conversation useful, the user may experience less than a second of dead air.&lt;/p&gt;

&lt;p&gt;Measure silence, not only backend latency.&lt;/p&gt;

&lt;h2&gt;
  
  
  23. Customer-support example
&lt;/h2&gt;

&lt;p&gt;A customer asks why a package has not arrived.&lt;/p&gt;

&lt;p&gt;The agent starts shipping lookup while asking whether this is the same order discussed yesterday.&lt;/p&gt;

&lt;p&gt;The user responds while the tools execute.&lt;/p&gt;

&lt;p&gt;When the result returns, the agent provides the confirmed shipping status.&lt;/p&gt;

&lt;p&gt;The backend was slow, but the conversation never fully stopped.&lt;/p&gt;

&lt;h2&gt;
  
  
  24. Blocking versus non-blocking policy
&lt;/h2&gt;

&lt;p&gt;A practical classification is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;READ_FAST
READ_SLOW
WRITE_LOW_RISK
WRITE_HIGH_RISK
FINANCIAL
PRODUCTION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible defaults:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;READ_FAST → NON_BLOCKING
READ_SLOW → NON_BLOCKING + status
WRITE_LOW_RISK → confirmation
WRITE_HIGH_RISK → BLOCKING + confirmation
FINANCIAL → BLOCKING + strong approval
PRODUCTION → BLOCKING + multi-party approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  25. Launch testing
&lt;/h2&gt;

&lt;p&gt;Test slow responses, timeouts, disconnects, retries, out-of-order results, user interruptions, requirement changes, cancellations, authorization failures, prompt injection, sensitive data, and duplicate writes.&lt;/p&gt;

&lt;p&gt;The final business state must remain correct even when the conversation is interrupted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Gemini Live API asynchronous function calling addresses a fundamental real-time-agent problem:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;slow tools should not automatically make the conversation slow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With non-blocking calls, an agent can continue clarification, explanation, and independent work while external systems execute.&lt;/p&gt;

&lt;p&gt;But the architecture needs task state, timeouts, cancellation, call IDs, concurrency controls, idempotency, authorization, sensitive-data filtering, and observability.&lt;/p&gt;

&lt;p&gt;The central rule is simple: the agent may continue speaking while a tool runs, but it must never pretend to know a tool-dependent result before that result arrives.&lt;/p&gt;

&lt;p&gt;For more practical Gemini API, voice-agent, function-calling, and production AI engineering guides, visit &lt;strong&gt;Zyentor Picks&lt;/strong&gt;: &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;https://www.zyentorpicks.com/&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/gemini-live-api-async-function-calling" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>gemini</category>
      <category>functional</category>
    </item>
    <item>
      <title>How to Generate E-commerce Product Pages in Bulk with AI</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Fri, 31 Jul 2026 06:35:59 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-generate-e-commerce-product-pages-in-bulk-with-ai-fd</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-generate-e-commerce-product-pages-in-bulk-with-ai-fd</guid>
      <description>&lt;p&gt;Article Summary&lt;/p&gt;

&lt;p&gt;Bulk-generating product pages with AI looks simple: send product attributes to a model and ask it to write persuasive copy. In practice, this approach often creates invented claims, mismatched specifications, repetitive content, prohibited wording, and formats that cannot be published across different sales channels. A production-ready system is not a loop that repeats one prompt. It is a content pipeline that combines product-data cleaning, factual constraints, structured generation, rule-based validation, human review, and multi-channel publishing. This guide provides a practical data model, prompt template, JSON output schema, Python batch-processing example, and quality-control checklist.&lt;/p&gt;




&lt;p&gt;Why Direct AI Product-Copy Generation Often Fails&lt;/p&gt;

&lt;p&gt;A common workflow is to copy a product name and a few attributes from a spreadsheet, then ask:&lt;/p&gt;

&lt;p&gt;Write an attractive product detail page.&lt;/p&gt;

&lt;p&gt;The model may produce fluent text, but fluent text is not necessarily accurate product content. Five problems appear repeatedly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The source data is incomplete&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Many product spreadsheets contain only:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SKU;&lt;/li&gt;
&lt;li&gt;product name;&lt;/li&gt;
&lt;li&gt;price;&lt;/li&gt;
&lt;li&gt;one or two specifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful product page may also require target users, use cases, materials, dimensions, packaging, warnings, warranty terms, and verified benefits. When these facts are absent, a language model may fill the gaps with plausible but unsupported details.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Facts and marketing claims are mixed together&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;“Made with 304 stainless steel” is a factual attribute. “Designed for everyday durability” is a restrained interpretation. “The safest and most durable cup on the market” is an unverified claim.&lt;/p&gt;

&lt;p&gt;If the system does not distinguish facts from acceptable marketing language, the model may present assumptions as product truth.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Every channel has different requirements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same product may need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an SEO title and meta description for a direct-to-consumer website;&lt;/li&gt;
&lt;li&gt;marketplace-style feature sections;&lt;/li&gt;
&lt;li&gt;Amazon bullet points;&lt;/li&gt;
&lt;li&gt;a short video script;&lt;/li&gt;
&lt;li&gt;social-media captions;&lt;/li&gt;
&lt;li&gt;ad copy with strict character limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One generic paragraph creates more editing work downstream.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Batch processing amplifies errors and repetition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A single generated page may look good. A batch of 5,000 SKUs can reveal systemic failures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repetitive title patterns;&lt;/li&gt;
&lt;li&gt;clichés such as “crafted with care” on every page;&lt;/li&gt;
&lt;li&gt;altered units and measurements;&lt;/li&gt;
&lt;li&gt;mismatched model numbers and colors;&lt;/li&gt;
&lt;li&gt;dirty data contaminating many outputs;&lt;/li&gt;
&lt;li&gt;missing records after API timeouts;&lt;/li&gt;
&lt;li&gt;duplicates created by retries.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;There is no publishing gate&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If model output is published immediately, the company is delegating content risk to the model. The model should generate a candidate. Rules, code, and human reviewers should decide whether that candidate is publishable.&lt;/p&gt;




&lt;p&gt;The Right Architecture: A Six-Layer Content Pipeline&lt;/p&gt;

&lt;p&gt;A production workflow can be divided into six layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product master data
↓
Cleaning and normalization
↓
Fact locking and content policy
↓
Structured AI generation
↓
Validation and risk scoring
↓
Human review / automated publishing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer has a different responsibility.&lt;/p&gt;

&lt;p&gt;Layer 1: Product master data&lt;/p&gt;

&lt;p&gt;Product facts should come from a PIM, ERP, product database, or approved spreadsheet—not from model inference.&lt;/p&gt;

&lt;p&gt;Layer 2: Data cleaning&lt;/p&gt;

&lt;p&gt;Normalize units, null values, enumerations, color names, dimensions, and brand terminology.&lt;/p&gt;

&lt;p&gt;Layer 3: Fact locking&lt;/p&gt;

&lt;p&gt;Define which fields may be copied, which may be paraphrased, and which claims are prohibited.&lt;/p&gt;

&lt;p&gt;Layer 4: Structured generation&lt;/p&gt;

&lt;p&gt;Require JSON rather than an uncontrolled block of prose.&lt;/p&gt;

&lt;p&gt;Layer 5: Validation&lt;/p&gt;

&lt;p&gt;Use code to inspect length, prohibited terms, specification consistency, duplication, and completeness.&lt;/p&gt;

&lt;p&gt;Layer 6: Review and publishing&lt;/p&gt;

&lt;p&gt;Allow low-risk content to pass automatically. Route high-risk categories and low-confidence outputs to a review queue.&lt;/p&gt;




&lt;p&gt;Design the Product Data Table First&lt;/p&gt;

&lt;p&gt;A useful source table should include at least the following fields:&lt;/p&gt;

&lt;p&gt;FieldPurposeExamplesku_idUnique product identifierCUP-500-BLKproduct_nameCanonical product name500 ml vacuum insulated bottlebrandBrandExamplecategoryProduct categoryDrinkware / insulated bottlematerialMaterials304 stainless steel, food-contact PPsizeDimensions7.2 × 22.5 cmcapacityCapacity500 mlcolorColorObsidian blackpackage_contentsPackage contentsBottle ×1, manual ×1verified_featuresApproved featuresDouble-wall vacuum design, non-slip basetarget_usersIntended usersCommuters, studentsusage_scenariosUse casesOffice, commuting, short tripsrestrictionsProhibited claimsNo medical claims; no “permanent insulation”warrantyWarranty informationSeven-day returns; one-year quality warrantykeywordsSEO keywordsinsulated bottle, 500 ml bottle, commuter bottlechannelPublishing channelDTC site, Amazon, marketplace&lt;/p&gt;

&lt;p&gt;Add three operational fields as well.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;source_of_truth&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Record where each fact came from: ERP, test report, supplier confirmation, or manual entry. This supports later audits and updates.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;missing_fields&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Identify missing information before generation. A SKU with critical missing fields should not enter an auto-publishing flow.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;content_version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Increment the version whenever content is regenerated so that new and old copy cannot be confused.&lt;/p&gt;




&lt;p&gt;Define Three Classes: Allowed, Inferable, and Prohibited&lt;/p&gt;

&lt;p&gt;Before calling a model, classify information into three categories.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Allowed facts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These fields have a verified source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;material;&lt;/li&gt;
&lt;li&gt;specifications;&lt;/li&gt;
&lt;li&gt;dimensions;&lt;/li&gt;
&lt;li&gt;capacity;&lt;/li&gt;
&lt;li&gt;package contents;&lt;/li&gt;
&lt;li&gt;model number;&lt;/li&gt;
&lt;li&gt;color;&lt;/li&gt;
&lt;li&gt;validated functions;&lt;/li&gt;
&lt;li&gt;warranty terms.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Fact-based expressions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These can be derived from verified facts without exaggeration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Double-wall vacuum design” may become “helps reduce heat transfer.”&lt;/li&gt;
&lt;li&gt;“Non-slip base” may become “designed to sit more securely.”&lt;/li&gt;
&lt;li&gt;“500 ml capacity” may become “sized for everyday commuting.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model is improving language, not inventing product capabilities.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prohibited content&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;certifications that were not provided;&lt;/li&gt;
&lt;li&gt;medical or therapeutic benefits;&lt;/li&gt;
&lt;li&gt;“best,” “number one,” “absolutely,” or “100% guaranteed” without evidence;&lt;/li&gt;
&lt;li&gt;unverified ingredients or materials;&lt;/li&gt;
&lt;li&gt;nonexistent gifts;&lt;/li&gt;
&lt;li&gt;fabricated sales figures or reviews;&lt;/li&gt;
&lt;li&gt;invented warranty terms;&lt;/li&gt;
&lt;li&gt;claims that violate platform or regulatory policies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These rules should be fixed in the system prompt.&lt;/p&gt;




&lt;p&gt;Require Structured JSON Output&lt;/p&gt;

&lt;p&gt;Do not ask for “a product page.” Define an output contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"sku_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CUP-500-BLK"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"seo_title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"500 ml Vacuum Insulated Bottle | Obsidian Black"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"short_title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"500 ml Black Insulated Bottle"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"A lightweight insulated bottle designed for office and commuting use."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"selling_points"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Double-wall vacuum design"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Helps reduce heat transfer for everyday drinking needs."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"specifications"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Capacity"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"500 ml"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"usage_scenarios"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Office"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Commuting"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Short trips"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"care_instructions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Wash before first use"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"meta_description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"A 500 ml obsidian-black vacuum bottle with a 304 stainless-steel interior for office, commuting, and short trips."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"risk_flags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"missing_information"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Structured output offers four major advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It can be written directly to a CMS or product database.&lt;/li&gt;
&lt;li&gt;Every field can be validated independently.&lt;/li&gt;
&lt;li&gt;Channel-specific templates can reuse the same source.&lt;/li&gt;
&lt;li&gt;Failures are easier to diagnose.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;A Reusable Prompt Template&lt;/p&gt;

&lt;p&gt;The following structure is suitable for batch generation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are an e-commerce product content editor. Generate content only from
the supplied product facts. Do not add materials, functions,
certifications, gifts, sales figures, reviews, warranty promises, or
health claims that are absent from the input.

Objectives:
1. Produce clear, accurate, and restrained product content.
2. Preserve the exact model number, dimensions, capacity, material,
quantity, and unit precision.
3. Do not use unverifiable claims such as "best," "number one,"
"absolute," "permanent," or "100%."
4. If critical information is missing, add it to missing_information.
Do not guess.
5. Return valid JSON only. Do not wrap it in a Markdown code block.

Content requirements:
- seo_title: no more than 60 characters;
- short_title: no more than 30 characters;
- summary: 80 to 160 characters;
- selling_points: 3 to 5 items, each traceable to verified_features;
- specifications: preserve all input values;
- meta_description: no more than 160 characters;
- risk_flags: list possible data or compliance risks.

Product input:
{{PRODUCT_JSON}}

Output JSON Schema:
{{OUTPUT_SCHEMA}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For consistent batch jobs, keep the system prompt stable and place the product record in the user message. This improves cache efficiency, version control, and consistency.&lt;/p&gt;




&lt;p&gt;Python Batch-Processing Example&lt;/p&gt;

&lt;p&gt;The following example uses an OpenAI-compatible API format. Environment variables can be changed to point to different providers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;API_BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LLM_API_BASE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;rstrip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LLM_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;INPUT_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;products.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;OUTPUT_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;generated-products.jsonl&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ERROR_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;generation-errors.jsonl&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;SYSTEM_PROMPT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are an e-commerce product content editor.
Use only supplied facts. Do not invent materials, functions,
certifications, gifts, sales figures, reviews, warranty promises,
or health claims. Return valid JSON only.
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;call_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;messages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;SYSTEM_PROMPT&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ensure_ascii&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;response_format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;json_object&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;API_BASE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/chat/completions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bearer &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Content-Type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;choices&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sku_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sku_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
&lt;span class="nf"&gt;except &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RequestException&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;KeyError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JSONDecodeError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;retries&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generation failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;
&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Unexpected retry state&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;append_jsonl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ensure_ascii&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;processed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;OUTPUT_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;OUTPUT_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;span class="n"&gt;processed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sku_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;INPUT_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8-sig&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newline&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DictReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;sku_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sku_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;sku_id&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;sku_id&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;processed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="k"&gt;continue&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;call_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;append_jsonl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OUTPUT_FILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OK: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;sku_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nf"&gt;append_jsonl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;ERROR_FILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sku_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sku_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;error&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;FAILED: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;sku_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example includes three important production patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resumability: completed SKUs are not generated again.&lt;/li&gt;
&lt;li&gt;Exponential backoff: temporary network failures do not immediately terminate the job.&lt;/li&gt;
&lt;li&gt;Separate error logging: failed records can be reprocessed independently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A production system should also add rate limiting, concurrency control, token logging, cost tracking, and idempotency keys.&lt;/p&gt;




&lt;p&gt;Eight Validation Layers After Generation&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;JSON validity&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Confirm that required fields exist, data types are correct, and arrays were not returned as strings.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Specification consistency&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Dimensions, capacity, materials, model numbers, and quantities must match the product master data exactly. These values should be checked by code rather than by human reading alone.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prohibited-term detection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Maintain separate dictionaries by country, industry, and marketplace. Food, supplements, cosmetics, medical devices, and children's products require different policies.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hallucination detection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Extract materials, certifications, functions, and warranty statements from the output and compare them with the source record. Any fact that cannot be traced should enter review.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Similarity detection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Measure similarity across titles and selling points. If hundreds of pages differ only by color or model number, search engines and customers may see them as low-quality content.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Channel formatting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Set separate limits for titles, descriptions, bullet points, and keywords by channel. Do not apply one template to every marketplace.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Brand voice&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Define prohibited expressions, preferred terminology, tone strength, and punctuation rules. The model should vary content within a brand system rather than improvise freely.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Human sampling&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use risk-based review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ordinary low-risk categories: sample 5% to 10%;&lt;/li&gt;
&lt;li&gt;high-value products: increase review coverage;&lt;/li&gt;
&lt;li&gt;food, health, beauty, and children's products: require human approval;&lt;/li&gt;
&lt;li&gt;new models, prompts, or data sources: review at least one full batch.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;How to Reduce the Cost of 1,000 SKUs&lt;/p&gt;

&lt;p&gt;The best optimization is not always switching to the cheapest model. It is reducing unnecessary tokens and rework.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keep the system prompt stable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use one shared policy for all SKUs. Providers that support prompt caching can charge much less for repeated input.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use a model cascade&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A practical three-stage flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Low-cost model: cleaning, classification, missing-field detection
↓
Primary model: titles, benefits, and descriptions
↓
Low-cost model or code: compliance and risk checking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The strongest model does not need to perform every task.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Limit output length&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Longer content is not automatically better. Define field-level maximums to prevent the model from producing text that cannot be published.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use batch or asynchronous processing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Product content rarely needs an immediate response. Batch, Flex, or asynchronous tiers can cost less than standard real-time inference.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Regenerate only failed fields&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the title passes validation but the selling points fail, regenerate only &lt;code&gt;selling_points&lt;/code&gt;. Do not pay to recreate the entire page.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a content fingerprint&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hash the product facts, prompt version, and model version. If none of them changed, do not call the model again.&lt;/p&gt;




&lt;p&gt;Building the Same Workflow with n8n or Make&lt;/p&gt;

&lt;p&gt;The pipeline can also be implemented without a custom Python service.&lt;/p&gt;

&lt;p&gt;n8n workflow&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read Google Sheets / Excel
→ Split in Batches
→ Normalize data
→ Structured LLM generation
→ JSON Schema validation
→ Prohibited-term check
→ Risk branch
→ CMS or review table
→ Token and cost logging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;n8n is a good choice when self-hosting, code nodes, databases, and detailed error handling are important.&lt;/p&gt;

&lt;p&gt;Make scenario&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Watch Rows
→ Iterator
→ Text / JSON Mapping
→ AI Module
→ Parse JSON
→ Router
→ Low risk: publish to CMS
→ High risk: create a review task
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make is often easier for operations teams and automation projects that benefit from a clear visual canvas.&lt;/p&gt;

&lt;p&gt;Whichever platform you choose, “the model call succeeded” must never mean “the content is safe to publish.”&lt;/p&gt;




&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;The real challenge in AI-generated product pages is not writing speed. It is ensuring that every statement can be traced to verified product data and remains reviewable, recoverable, and governable at scale.&lt;/p&gt;

&lt;p&gt;A reliable system should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;separate facts from marketing language;&lt;/li&gt;
&lt;li&gt;prevent the model from guessing missing information;&lt;/li&gt;
&lt;li&gt;use a stable JSON Schema;&lt;/li&gt;
&lt;li&gt;validate specifications, prohibited claims, and hallucinations with code;&lt;/li&gt;
&lt;li&gt;support resumable batches and safe retries;&lt;/li&gt;
&lt;li&gt;use different content templates for different channels;&lt;/li&gt;
&lt;li&gt;route high-risk outputs to human reviewers;&lt;/li&gt;
&lt;li&gt;record model, prompt, token, and content versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once these controls are in place, AI stops being a copywriting shortcut and becomes a controllable product-content production system.&lt;/p&gt;

&lt;p&gt;For more AI tools for content production, e-commerce operations, and workflow automation, visit Zyentor Picks at &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;https://www.zyentorpicks.com/&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260731-7973" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Analyze 10,000 Customer Reviews with AI: VOC Clustering and Action Workflow</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Thu, 30 Jul 2026 05:44:12 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-analyze-10000-customer-reviews-with-ai-voc-clustering-and-action-workflow-2d9b</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-analyze-10000-customer-reviews-with-ai-voc-clustering-and-action-workflow-2d9b</guid>
      <description>&lt;p&gt;Article Summary&lt;/p&gt;

&lt;p&gt;Large review datasets are not useful merely because an AI can produce a positive-versus-negative summary. Companies need to know which issues are growing, which versions and segments are affected, what evidence supports each conclusion, and what action should follow.&lt;/p&gt;

&lt;p&gt;This guide presents a reproducible VOC pipeline: ingestion, privacy, deduplication, structured classification, topic clustering, evidence sampling, prioritization, action management, and monitoring.&lt;/p&gt;

&lt;p&gt;The operating principle is:&lt;/p&gt;

&lt;p&gt;AI scales text understanding; rules and statistics stabilize measurement; original comments provide evidence; humans decide priorities and action.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Why “Summarize All Reviews” Fails&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A single giant prompt loses traceability, overweights duplicates, merges unrelated products, hides low-volume high-risk issues, and cannot be repeated consistently next month.&lt;/p&gt;

&lt;p&gt;The goal should be a versioned data pipeline rather than a one-off report.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Data Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Unify review ID, source, product, version, segment, rating, text, timestamp, country, language, and verified-purchase status.&lt;/p&gt;

&lt;p&gt;Remove or tokenize names, phone numbers, order IDs, addresses, and account identifiers before sending data to an external model.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Cleaning&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Classify empty, low-information, spam, exact duplicate, and near-duplicate records. Preserve duplicate-group identifiers for audit rather than deleting all records blindly.&lt;/p&gt;

&lt;p&gt;Detect language and retain both original and normalized text. Translation is optional and should not replace the original evidence.&lt;/p&gt;

&lt;p&gt;Create a data-quality report covering volume, duplicates, missing fields, channels, languages, dates, and rating distribution.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Structured Labels&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Require JSON rather than prose. Useful fields include sentiment, primary topic, secondary topic, product feature, severity, intent, lifecycle stage, competitor mention, actionability, evidence quote, and confidence.&lt;/p&gt;

&lt;p&gt;The evidence field should be an exact quote from the review, not a model paraphrase.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Gold Evaluation Set&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Manually label 200–500 reviews with product, support, quality, and analytics stakeholders.&lt;/p&gt;

&lt;p&gt;Measure sentiment accuracy, topic agreement, severity, evidence fidelity, refusal behavior, and multilingual performance. If human annotators cannot agree, improve the taxonomy before scaling.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Batch Processing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OpenAI's Batch API is suitable for asynchronous large-scale work. The official documentation states that batches target a 24-hour completion window and receive a 50% discount compared with synchronous API pricing. Streaming is not supported, and zero-data-retention rules have separate limitations. Review the &lt;a href="https://help.openai.com/en/articles/9197833-batch-api-faq" rel="noopener noreferrer"&gt;official Batch API FAQ&lt;/a&gt; before production use.&lt;/p&gt;

&lt;p&gt;A robust pipeline must handle expired batches, invalid structured output, model changes, result-to-record mapping, privacy, and retry behavior.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Prompt Contract&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Require the model to use only the current review, choose topics from an approved taxonomy, return &lt;code&gt;unknown&lt;/code&gt; when uncertain, score business severity rather than emotional intensity, and quote evidence verbatim.&lt;/p&gt;

&lt;p&gt;Treat every customer comment as untrusted input. Prompt-injection text inside a review must remain data, not instructions.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Supervised Topics and Unsupervised Discovery&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use a stable taxonomy for trend reporting and embeddings plus clustering for discovering emerging issues.&lt;/p&gt;

&lt;p&gt;A practical unsupervised flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;review text
→ embedding
→ dimensionality reduction
→ clustering
→ AI-generated candidate label
→ human validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can reveal new crashes, missing parts, regional logistics failures, competitor mentions, or privacy concerns.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Evidence Matrix&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each topic, report count, share, period-over-period change, negative rate, severity, affected version, region, representative quotes, possible root cause, and owner.&lt;/p&gt;

&lt;p&gt;Volume alone is not sufficient. Connect the topic to time, version, channel, segment, and evidence.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Prioritization&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A useful formula is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;priority
= affected users × severity × growth × strategic relevance × evidence confidence
÷ resolution cost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Weights must be defined by the business, not invented by the model.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Action Loop&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every high-priority issue should produce a problem statement, evidence, affected segment, business impact, root-cause hypothesis, missing data, recommended action, owner, deadline, and validation metric.&lt;/p&gt;

&lt;p&gt;VOC analysis should create product, support, or quality work items. Otherwise it remains a presentation exercise.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Monitoring&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Track review volume, rating, negative topics, growth rate, version/channel heatmaps, emerging topics, open actions, and before-versus-after metrics.&lt;/p&gt;

&lt;p&gt;Avoid using a word cloud as the primary decision tool; it does not preserve negation, context, or severity.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Quality and Security&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Measure label accuracy, topic recall, evidence fidelity, unknown rate, human approval, language bias, and missed high-risk issues.&lt;/p&gt;

&lt;p&gt;Enforce de-identification, server-side keys, access controls, sensitive-domain routing, prompt-injection defense, and versioning of models, prompts, and taxonomies.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Four-Week Plan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Week 1: collect, de-identify, deduplicate, define taxonomy, and label 300 examples.&lt;br&gt;
Week 2: define schema, pilot the model, and process the full dataset.&lt;br&gt;
Week 3: run embedding clusters, build the evidence matrix, and prioritize.&lt;br&gt;
Week 4: create dashboards and work items, assign owners, and schedule incremental runs.&lt;/p&gt;




&lt;p&gt;Final Verdict&lt;/p&gt;

&lt;p&gt;A production VOC system is not an AI summary. It is:&lt;/p&gt;

&lt;p&gt;traceable data, stable labels, structured batch analysis, emerging-topic discovery, original evidence, business prioritization, and an action loop.&lt;/p&gt;




&lt;p&gt;SEO Information&lt;/p&gt;

&lt;p&gt;SEO Title: How to Analyze 10,000 Customer Reviews with AI: VOC Clustering and Action Workflow&lt;br&gt;
SEO Description: A practical workflow for review cleaning, structured classification, Batch API processing, embeddings, topic clustering, evidence matrices, prioritization, and action management.&lt;br&gt;
URL Slug: &lt;code&gt;ai-analyze-customer-reviews-voc-topic-clustering-action-guide&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more AI analytics and productivity guides, visit &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260730-2716" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Automate Sales Forecasting with AI: From CRM Data to Rolling Forecasts and Actions</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Wed, 29 Jul 2026 05:32:57 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-automate-sales-forecasting-with-ai-from-crm-data-to-rolling-forecasts-and-actions-4c4p</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-automate-sales-forecasting-with-ai-from-crm-data-to-rolling-forecasts-and-actions-4c4p</guid>
      <description>&lt;p&gt;Article Summary&lt;/p&gt;

&lt;p&gt;Many sales organizations still forecast by asking representatives to enter expected revenue, applying manager judgment, and aggregating the result in a spreadsheet. The number is difficult to explain and even harder to improve.&lt;/p&gt;

&lt;p&gt;This guide builds a reproducible sales-forecasting workflow for a B2B SaaS company: CRM extraction, data quality, stage calibration, baseline pipeline forecasting, machine-learning win probabilities, close-date distribution, scenarios, Power BI, AI summaries, and action management.&lt;/p&gt;

&lt;p&gt;The central rule is:&lt;/p&gt;

&lt;p&gt;Deterministic rules own metric definitions, statistical models own probabilities, language models own explanation, and sales leaders own the final commitment.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Why Sales Forecasts Fail&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Typical causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stale stages;&lt;/li&gt;
&lt;li&gt;repeatedly pushed close dates;&lt;/li&gt;
&lt;li&gt;inconsistent interpretation of probabilities;&lt;/li&gt;
&lt;li&gt;concentration in a few large deals;&lt;/li&gt;
&lt;li&gt;weak historical data;&lt;/li&gt;
&lt;li&gt;treating total pipeline as revenue;&lt;/li&gt;
&lt;li&gt;ignoring cancellations, implementation, and payment;&lt;/li&gt;
&lt;li&gt;forecasts without actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful report separates:&lt;/p&gt;

&lt;p&gt;MeasureMeaningBookedSigned or confirmed businessCommitManager-owned period commitmentBest CaseConditional upsideWeighted PipelineAmount multiplied by calibrated probabilityModel ForecastHistorical-data prediction&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Case Study&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The example company has 12 salespeople, four regions, three product lines, 24 months of opportunity history, about 180 new opportunities per month, and an average 63-day sales cycle.&lt;/p&gt;

&lt;p&gt;Leadership wants a Monday report containing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;monthly and quarterly forecasts;&lt;/li&gt;
&lt;li&gt;Commit versus model variance;&lt;/li&gt;
&lt;li&gt;largest risks;&lt;/li&gt;
&lt;li&gt;likely slippage;&lt;/li&gt;
&lt;li&gt;regional and product differences;&lt;/li&gt;
&lt;li&gt;weekly sales actions.&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;
&lt;li&gt;Architecture
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CRM / contracts / payments
→ extraction
→ data-quality gates
→ standardized stages and fields
→ historical snapshots
→ baseline funnel model
→ machine-learning probability
→ scenarios
→ Power BI semantic model
→ AI narrative
→ manager approval
→ email, meeting, and task distribution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;ol&gt;
&lt;li&gt;Data Dictionary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Minimum opportunity fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;opportunity ID;&lt;/li&gt;
&lt;li&gt;account and owner;&lt;/li&gt;
&lt;li&gt;region and product;&lt;/li&gt;
&lt;li&gt;amount and currency;&lt;/li&gt;
&lt;li&gt;stage;&lt;/li&gt;
&lt;li&gt;created, expected-close, and actual-close dates;&lt;/li&gt;
&lt;li&gt;outcome;&lt;/li&gt;
&lt;li&gt;next action and date;&lt;/li&gt;
&lt;li&gt;last activity;&lt;/li&gt;
&lt;li&gt;competitor;&lt;/li&gt;
&lt;li&gt;source;&lt;/li&gt;
&lt;li&gt;discount;&lt;/li&gt;
&lt;li&gt;decision-maker and budget confirmation;&lt;/li&gt;
&lt;li&gt;technical validation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Contract and ERP systems should provide signed amount, cancellation, acceptance, payment schedule, and received cash.&lt;/p&gt;

&lt;p&gt;A CRM &lt;code&gt;Closed Won&lt;/code&gt; record is not automatically recognized revenue.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Data-Quality Gates&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Block forecasting when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;close dates are expired or repeatedly changed;&lt;/li&gt;
&lt;li&gt;every opportunity closes on the last day of the month;&lt;/li&gt;
&lt;li&gt;a stage has not changed beyond its historical P75 duration;&lt;/li&gt;
&lt;li&gt;activity is stale;&lt;/li&gt;
&lt;li&gt;next steps are missing;&lt;/li&gt;
&lt;li&gt;amounts are zero or suddenly increased tenfold;&lt;/li&gt;
&lt;li&gt;currencies are inconsistent;&lt;/li&gt;
&lt;li&gt;duplicate opportunities exist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prevent target leakage by excluding fields only known after the outcome, such as actual payment or final contract identifiers.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Start with a Baseline&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stage-weighted forecast&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Weighted Forecast = Sum(Opportunity Amount × Historical Stage Win Rate)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not use the same stage probability for every representative. Calibrate by salesperson, segment, product, source, and deal size.&lt;/p&gt;

&lt;p&gt;Close-date risk should also reflect stage age, activity, approval status, and previous date changes.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Train a Win-Probability Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use interpretable baselines such as logistic regression before complex models.&lt;/p&gt;

&lt;p&gt;Salesforce's official Einstein Forecasting considerations state that organizations generally need at least 12 months of opportunity history and forecasts measured by opportunity revenue. The broader lesson is that stable machine-learning forecasting requires enough completed historical outcomes.&lt;/p&gt;

&lt;p&gt;Official guidance: &lt;/p&gt;

&lt;p&gt;Recommended features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;amount;&lt;/li&gt;
&lt;li&gt;stage and stage age;&lt;/li&gt;
&lt;li&gt;opportunity age;&lt;/li&gt;
&lt;li&gt;days to expected close;&lt;/li&gt;
&lt;li&gt;days since activity;&lt;/li&gt;
&lt;li&gt;recent activity count;&lt;/li&gt;
&lt;li&gt;decision-maker and budget confirmation;&lt;/li&gt;
&lt;li&gt;product, region, source, and competitor;&lt;/li&gt;
&lt;li&gt;representative historical win rate;&lt;/li&gt;
&lt;li&gt;discount;&lt;/li&gt;
&lt;li&gt;customer purchase history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A time-based train/test split is mandatory. Random splitting can leak future behavior into training.&lt;/p&gt;

&lt;p&gt;Measure both ranking and probability calibration. A model that says “80%” should win close to 80% over time.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Forecast the Timing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Win probability alone does not answer when a deal will close.&lt;/p&gt;

&lt;p&gt;Estimate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;win probability;&lt;/li&gt;
&lt;li&gt;slippage probability;&lt;/li&gt;
&lt;li&gt;monthly close distribution;&lt;/li&gt;
&lt;li&gt;expected amount;&lt;/li&gt;
&lt;li&gt;cancellation probability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A USD 500,000 opportunity might contribute USD 175,000 to July, USD 150,000 to August, USD 75,000 to September, and zero to the failure/later bucket.&lt;/p&gt;

&lt;p&gt;This is more realistic than assigning the entire opportunity to one manually selected month.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Scenarios&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Create conservative, base, and upside scenarios.&lt;/p&gt;

&lt;p&gt;A management summary should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Quarter forecast range: USD 8.6M–10.4M
Base forecast: USD 9.3M
Sales Commit: USD 10.1M
Commit exceeds model forecast by USD 0.8M.
The gap is concentrated in two large East-region opportunities with budget and close-date risk.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A forecast range is more honest than false precision.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Power BI Semantic Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Recommended tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Opportunity Snapshot fact;&lt;/li&gt;
&lt;li&gt;Contract fact;&lt;/li&gt;
&lt;li&gt;Payment fact;&lt;/li&gt;
&lt;li&gt;Date, Salesperson, Region, Product, and Stage dimensions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pipeline;&lt;/li&gt;
&lt;li&gt;weighted pipeline;&lt;/li&gt;
&lt;li&gt;model forecast;&lt;/li&gt;
&lt;li&gt;Commit;&lt;/li&gt;
&lt;li&gt;Booked;&lt;/li&gt;
&lt;li&gt;forecast gap;&lt;/li&gt;
&lt;li&gt;win rate;&lt;/li&gt;
&lt;li&gt;slippage rate;&lt;/li&gt;
&lt;li&gt;cycle length;&lt;/li&gt;
&lt;li&gt;stale-opportunity rate;&lt;/li&gt;
&lt;li&gt;forecast accuracy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Power BI Copilot can assist with report creation and explanation, but Microsoft currently requires a paid Fabric capacity (F2 or higher) or Power BI Premium P1 or higher. Power BI Pro, PPU, and trial capacity alone do not satisfy the Copilot capacity requirement.&lt;/p&gt;

&lt;p&gt;Official overview: &lt;/p&gt;

&lt;p&gt;Power BI can also include Copilot-generated report summaries in email subscriptions.&lt;/p&gt;

&lt;p&gt;Official overview: &lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Use the LLM for Narrative, Not Arithmetic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Provide computed JSON and instruct the model not to recalculate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Act as a sales operations analyst.
The metrics below were calculated by the semantic model. Do not change them.

Produce:
1. a 200-word executive summary;
2. Commit versus model variance;
3. the five largest risks;
4. regional and product anomalies;
5. weekly actions with owner, deadline, and verification criteria;
6. clear labels for fact, inference, and recommendation.

Never describe total pipeline as forecast revenue.
Do not invent customers, dates, amounts, or next steps.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;ol&gt;
&lt;li&gt;Convert Forecasts into Actions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;p&gt;RiskActionNo activity for 14 daysUpdate next step within 48 hoursDecision-maker unknownSchedule executive discoveryBudget unconfirmedCreate value and approval planTechnical validation failedOpen remediation planClose date repeatedly pushedReclassify quarter ownershipUnusual discountRequire manager approval&lt;/p&gt;

&lt;p&gt;Automation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Monday refresh
→ quality checks
→ model run
→ Power BI update
→ AI summary
→ manager approval
→ email distribution
→ CRM tasks for high-risk deals
→ Friday action review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;ol&gt;
&lt;li&gt;Evaluation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WAPE or absolute forecast error;&lt;/li&gt;
&lt;li&gt;direction accuracy;&lt;/li&gt;
&lt;li&gt;probability calibration;&lt;/li&gt;
&lt;li&gt;Commit variance;&lt;/li&gt;
&lt;li&gt;slippage;&lt;/li&gt;
&lt;li&gt;stale-opportunity rate;&lt;/li&gt;
&lt;li&gt;next-step completeness;&lt;/li&gt;
&lt;li&gt;risk recovery;&lt;/li&gt;
&lt;li&gt;time saved in forecast meetings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not optimize only for offline model accuracy.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Common Failure Modes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;overwriting historical stages;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;random train/test splitting;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;asking an LLM to invent probabilities;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;mixing contract, revenue, and cash;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;treating Commit as objective prediction;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;target leakage;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ignoring large-deal concentration;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;publishing one exact number without a range;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;allowing the LLM to recalculate metrics;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sending reports without manager approval.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Final Verdict&lt;/p&gt;

&lt;p&gt;A reliable AI forecasting system is:&lt;/p&gt;

&lt;p&gt;facts → quality gates → probabilities → scenarios → AI explanation → human commitment → actions.&lt;/p&gt;

&lt;p&gt;Start by cleaning CRM definitions, build a simple stage-weighted baseline, add machine learning only after historical snapshots are trustworthy, use Power BI for controlled metrics, and use the language model for narrative and action generation.&lt;/p&gt;

&lt;p&gt;AI improves discipline and speed, but the sales leader remains accountable for Commit.&lt;/p&gt;




&lt;p&gt;SEO Information&lt;/p&gt;

&lt;p&gt;SEO Title: How to Automate Sales Forecasting with AI: From CRM Data to Rolling Forecasts and Actions&lt;br&gt;
SEO Description: A practical enterprise AI sales forecasting guide covering CRM cleaning, stage calibration, machine learning, close-date risk, Power BI Copilot, scenarios, narratives, evaluation, and action automation.&lt;br&gt;
URL Slug: &lt;code&gt;ai-sales-forecasting-crm-data-rolling-forecast-action-guide&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more AI tool reviews, practical guides, and industry analysis, follow &lt;a href="https://www.zyentorpicks.com/" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260729-8425" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>analytics</category>
      <category>automation</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to Automate Invoice and Expense Processing with AI: OCR, Approval, and Anomaly Detection</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Tue, 28 Jul 2026 02:50:24 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-automate-invoice-and-expense-processing-with-ai-ocr-approval-and-anomaly-detection-4bfp</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-automate-invoice-and-expense-processing-with-ai-ocr-approval-and-anomaly-detection-4bfp</guid>
      <description>&lt;p&gt;How to Automate Invoice and Expense Processing with AI: OCR, Approval, and Anomaly Detection&lt;/p&gt;

&lt;p&gt;Article Summary&lt;/p&gt;

&lt;p&gt;Invoice automation is more than converting an image into text. A production workflow must ingest documents, extract fields and line items, match vendors and purchase orders, validate totals and tax, detect duplicates, check budgets and permissions, route human review, obtain approval, post to finance systems, archive evidence, and preserve an audit trail.&lt;/p&gt;

&lt;p&gt;This guide designs a practical workflow using Power Automate, AI Builder, or Azure Document Intelligence.&lt;/p&gt;

&lt;p&gt;The central rule is:&lt;/p&gt;

&lt;p&gt;AI extracts and classifies, deterministic rules validate, business systems own financial state, and humans approve high-risk decisions.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Target Workflow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A company receives 3,000 supplier invoices per month. The current process is email download, manual spreadsheet entry, purchase-order checks, approval, ERP entry, and PDF archiving.&lt;/p&gt;

&lt;p&gt;The automated target is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;more than 90% extraction on standard invoices;&lt;/li&gt;
&lt;li&gt;confidence stored for every field;&lt;/li&gt;
&lt;li&gt;low-confidence cases routed to humans;&lt;/li&gt;
&lt;li&gt;automatic duplicate, budget, and PO mismatch detection;&lt;/li&gt;
&lt;li&gt;traceable approvals;&lt;/li&gt;
&lt;li&gt;only validated records posted to finance systems.&lt;/li&gt;
&lt;/ul&gt;




&lt;ol&gt;
&lt;li&gt;Reference Architecture
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Email / SharePoint / Portal / Scanner
→ Power Automate trigger
→ file security and classification
→ AI Builder or Azure Document Intelligence
→ normalization
→ vendor, PO, and receipt matching
→ rules and anomaly signals
→ Power Apps human review
→ approval
→ ERP / finance system
→ archive
→ Power BI monitoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Microsoft's official reference architecture uses Power Automate for orchestration, AI Builder for extraction, Power Apps for correction, Dataverse for queues and records, and Power BI for analysis: &lt;a href="https://learn.microsoft.com/en-us/power-platform/architecture/reference-architectures/ai-document-processing" rel="noopener noreferrer"&gt;AI document-processing architecture&lt;/a&gt;.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Tool Selection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI Builder and Power Automate&lt;/p&gt;

&lt;p&gt;Best when the organization already uses Microsoft 365 and Power Platform and finance teams need a low-code solution.&lt;/p&gt;

&lt;p&gt;The prebuilt invoice model extracts invoice ID, supplier, dates, totals, due dates, purchase-order numbers, and other common fields. Simplified Chinese is supported. Custom document models can be trained for additional fields, with Microsoft documentation stating that teams can start with five documents.&lt;/p&gt;

&lt;p&gt;Official information: &lt;a href="https://learn.microsoft.com/en-us/ai-builder/prebuilt-invoice-processing" rel="noopener noreferrer"&gt;prebuilt invoice model&lt;/a&gt; and &lt;a href="https://learn.microsoft.com/en-us/ai-builder/form-processing-model-overview" rel="noopener noreferrer"&gt;custom document processing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Azure Document Intelligence&lt;/p&gt;

&lt;p&gt;Best for API integration, large volume, custom applications, structured JSON, and developer-managed infrastructure.&lt;/p&gt;

&lt;p&gt;Azure Document Intelligence v4.0 includes prebuilt invoice, layout, and custom models. Official information: &lt;a href="https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/overview?view=doc-intel-4.0.0" rel="noopener noreferrer"&gt;overview&lt;/a&gt; and &lt;a href="https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/prebuilt/invoice?view=doc-intel-4.0.0" rel="noopener noreferrer"&gt;invoice model&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;OCR plus a language model&lt;/p&gt;

&lt;p&gt;A language model can normalize vendor names, map descriptions to expense categories, explain exceptions, and generate approval summaries. It should not independently calculate tax, approve payments, or decide fraud.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Data Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Store three layers.&lt;/p&gt;

&lt;p&gt;Raw&lt;/p&gt;

&lt;p&gt;Original file, email ID, uploader, timestamp, hash, OCR text, and model version.&lt;/p&gt;

&lt;p&gt;Extracted&lt;/p&gt;

&lt;p&gt;Invoice number, invoice date, raw vendor name, tax ID, currency, subtotal, tax, total, PO number, due date, line items, and confidence.&lt;/p&gt;

&lt;p&gt;Business&lt;/p&gt;

&lt;p&gt;Canonical vendor ID, account code, cost center, project, remaining budget, match status, risk level, approval status, and ERP voucher ID.&lt;/p&gt;

&lt;p&gt;Never overwrite raw values. Store normalized values separately with the rule or reviewer responsible for the change.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Power Automate Flow&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trigger from email, SharePoint, Power Apps, Teams, or API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validate type, size, page count, encryption, duplicates, malware, and multi-invoice PDFs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call AI Builder invoice extraction or a document model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normalize names, dates, currency, decimal values, and invoice IDs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perform three-way matching across invoice, purchase order, and receipt/service acceptance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Execute anomaly rules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Route to review and approval.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Post validated data to ERP.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Microsoft recommends specifying pages when a large file contains only one invoice, reducing prediction cost and improving performance. Official guide: &lt;a href="https://learn.microsoft.com/en-us/ai-builder/flow-invoice-processing" rel="noopener noreferrer"&gt;invoice processing in Power Automate&lt;/a&gt;.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Deterministic Checks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;subtotal plus tax does not equal total;&lt;/li&gt;
&lt;li&gt;supplier tax ID and invoice number already exist;&lt;/li&gt;
&lt;li&gt;duplicate file hash;&lt;/li&gt;
&lt;li&gt;future invoice date;&lt;/li&gt;
&lt;li&gt;due date earlier than invoice date;&lt;/li&gt;
&lt;li&gt;insufficient PO amount;&lt;/li&gt;
&lt;li&gt;bank account differs from master data;&lt;/li&gt;
&lt;li&gt;submitter is also approver;&lt;/li&gt;
&lt;li&gt;budget exceeded;&lt;/li&gt;
&lt;li&gt;extraction confidence below threshold.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI can flag semantic anomalies such as an invoice description that conflicts with the purchase purpose or a note requesting payment to a personal account. These are risk signals, not proof of fraud.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Human Review&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A useful review screen shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;original PDF with highlighted evidence;&lt;/li&gt;
&lt;li&gt;extracted fields and confidence;&lt;/li&gt;
&lt;li&gt;purchase order and receipt data;&lt;/li&gt;
&lt;li&gt;anomaly reasons;&lt;/li&gt;
&lt;li&gt;change history;&lt;/li&gt;
&lt;li&gt;approve, return, and escalate actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Low-risk matched invoices can move directly to approval. Low-confidence or medium-risk invoices require finance review. Duplicate, bank-account-change, or high-risk cases require senior finance or audit review.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Security and Audit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Implement minimum privilege, service-account separation, encryption, retention policies, tamper-resistant logs, masking, model and prompt versioning, reviewer history, deprovisioning, and environment separation.&lt;/p&gt;

&lt;p&gt;Do not upload real supplier invoices to personal free AI accounts. Bank accounts, tax IDs, and employee information are sensitive business data.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Pricing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Microsoft's Singapore pricing page currently lists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Power Automate Premium: USD 15/user/month, paid yearly;&lt;/li&gt;
&lt;li&gt;Power Automate Process: USD 150/bot/month, paid yearly;&lt;/li&gt;
&lt;li&gt;Hosted Process: USD 215/bot/month, paid yearly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prices exclude GST and can vary by contract. Official page: &lt;a href="https://www.microsoft.com/en-sg/power-platform/products/power-automate/pricing" rel="noopener noreferrer"&gt;Power Automate pricing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;AI Builder consumes AI credits. Azure Document Intelligence uses pay-as-you-go or commitment pricing rather than a fixed monthly subscription: &lt;a href="https://azure.microsoft.com/pricing/details/document-intelligence/" rel="noopener noreferrer"&gt;Azure pricing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Evaluate total cost per invoice, including licenses, recognition, storage, ERP integration, human review, and maintenance.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Evaluation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Build an anonymous test set of at least 200 documents covering clean PDFs, phone photos, multilingual invoices, multiple currencies, complex line items, low-quality scans, duplicates, and anomalies.&lt;/p&gt;

&lt;p&gt;Measure field accuracy, line-item accuracy, straight-through rate, incorrect auto-approval rate, duplicate recall, average review time, failure rate, cycle time, and cost per invoice.&lt;/p&gt;

&lt;p&gt;The most important metric is not OCR accuracy. It is the rate at which high-risk errors are incorrectly allowed through.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Four-Week MVP&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Week 1&lt;/p&gt;

&lt;p&gt;Collect samples, define fields, rules, approval matrix, and ERP interfaces.&lt;/p&gt;

&lt;p&gt;Week 2&lt;/p&gt;

&lt;p&gt;Build ingestion, extraction, raw/structured storage, and the review interface.&lt;/p&gt;

&lt;p&gt;Week 3&lt;/p&gt;

&lt;p&gt;Add vendor/PO/receipt matching, duplicate rules, approval routing, retries, and alerts.&lt;/p&gt;

&lt;p&gt;Week 4&lt;/p&gt;

&lt;p&gt;Pilot with one department and a limited supplier group while running the manual process in parallel.&lt;/p&gt;




&lt;p&gt;Final Verdict&lt;/p&gt;

&lt;p&gt;AI reads documents, rules validate facts, systems execute the process, and humans remain accountable.&lt;/p&gt;

&lt;p&gt;Power Automate plus AI Builder is the fastest low-code route for Microsoft organizations. Azure Document Intelligence is more flexible for API-driven and high-volume systems. Both require human review, deterministic validation, authorization, and auditability.&lt;/p&gt;




&lt;p&gt;SEO Information&lt;/p&gt;

&lt;p&gt;SEO Title: How to Automate Invoice and Expense Processing with AI&lt;br&gt;
SEO Description: A practical guide to invoice OCR, AI extraction, three-way matching, duplicate detection, approvals, human review, Power Automate, AI Builder, Azure Document Intelligence, pricing, and security.&lt;br&gt;
URL Slug: &lt;code&gt;ai-invoice-expense-automation-ocr-approval-anomaly-detection-guide&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more enterprise AI automation guides, visit &lt;a href="https://www.zyentor.com/" rel="noopener noreferrer"&gt;Zyentor&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260727-9439" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Create a Brand Promotional Video with Kling AI: A Complete Commercial Delivery Workflow</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Tue, 14 Jul 2026 03:48:32 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-create-a-brand-promotional-video-with-kling-ai-a-complete-commercial-delivery-workflow-35dl</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-create-a-brand-promotional-video-with-kling-ai-a-complete-commercial-delivery-workflow-35dl</guid>
      <description>&lt;h1&gt;
  
  
  How to Create a Brand Promotional Video with Kling AI: A Complete Commercial Delivery Workflow
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Category: AI Video Production / Brand Content&lt;br&gt;&lt;br&gt;
Target readers: brand marketers, agencies, short-video teams, ecommerce operators, freelancers, product managers, and corporate communication teams&lt;br&gt;&lt;br&gt;
Updated: July 14, 2026&lt;br&gt;&lt;br&gt;
Bottom line: &lt;strong&gt;Kling AI can now support concept visualization, product atmosphere shots, character motion, camera movement, multi-shot storytelling, and some native audio generation. However, a commercial deliverable should never depend on a single prompt. A reliable workflow is: define the business objective → lock brand assets → write the storyboard → generate shot by shot → review and repair → edit and package → run brand and legal review → export for each channel → archive prompts, rights, and source files.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. What Brand Videos Is Kling AI Good For?
&lt;/h2&gt;

&lt;p&gt;Kling AI currently provides video, image, sound, and multimodal creation tools. Its official VIDEO 3.0 guide lists text-to-video, image-to-video, start-and-end-frame generation, Multi-Shot, element references, native audio, multilingual support, and flexible 3–15 second output.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;th&gt;Fit&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Product mood advertisement&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;td&gt;Strong lighting, materials, camera movement, and atmosphere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New-product concept film&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;td&gt;Efficient for validating creative directions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ecommerce product video&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Useful for close-ups, rotation, unboxing, and usage scenes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brand-story sequences&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Multi-Shot and subject consistency support narrative work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Social advertising&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Good for vertical variants and rapid testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Event teaser&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Produces visually striking shots quickly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Industrial function demo&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Visual appearance is possible; exact mechanics require caution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regulated claims&lt;/td&gt;
&lt;td&gt;Medium-low&lt;/td&gt;
&lt;td&gt;Medical, financial, and efficacy claims need legal review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Entire film in one generation&lt;/td&gt;
&lt;td&gt;Not recommended&lt;/td&gt;
&lt;td&gt;Commercial films should be assembled from controlled shots&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In one sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Kling AI works best as a shot-generation engine, not as an automatic replacement for strategy, editing, legal review, and delivery management.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Key Kling AI Capabilities in 2026
&lt;/h2&gt;

&lt;p&gt;Based on Kling AI's official website and VIDEO 3.0 guide, the main capabilities include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Text-to-Video;&lt;/li&gt;
&lt;li&gt;Image-to-Video;&lt;/li&gt;
&lt;li&gt;Start &amp;amp; End Frames-to-Video;&lt;/li&gt;
&lt;li&gt;Multi-Shot cinematic generation;&lt;/li&gt;
&lt;li&gt;Element Reference and Subject Binding;&lt;/li&gt;
&lt;li&gt;Native Audio;&lt;/li&gt;
&lt;li&gt;Chinese, English, Japanese, Korean, and Spanish support;&lt;/li&gt;
&lt;li&gt;Flexible 3–15 second output;&lt;/li&gt;
&lt;li&gt;Camera movement control;&lt;/li&gt;
&lt;li&gt;Integrated image and video workflows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These improve control, but commercial creators should still expect possible issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;distorted logos;&lt;/li&gt;
&lt;li&gt;incorrect package text;&lt;/li&gt;
&lt;li&gt;abnormal hands or movement;&lt;/li&gt;
&lt;li&gt;changing product proportions;&lt;/li&gt;
&lt;li&gt;inconsistent brand colors;&lt;/li&gt;
&lt;li&gt;implausible physics;&lt;/li&gt;
&lt;li&gt;unstable pronunciation or lip sync.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Human checkpoints remain mandatory.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Commercial Delivery Workflow
&lt;/h2&gt;

&lt;p&gt;Use a 12-stage process:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Main output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. Client brief&lt;/td&gt;
&lt;td&gt;Goal, audience, channel, product value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. Delivery scope&lt;/td&gt;
&lt;td&gt;Duration, ratios, versions, revisions, rights&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. Creative strategy&lt;/td&gt;
&lt;td&gt;Concept, mood, visual direction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. Script and storyboard&lt;/td&gt;
&lt;td&gt;Voiceover, captions, shot list, pacing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5. Brand asset pack&lt;/td&gt;
&lt;td&gt;Logo, colors, fonts, product photos, restrictions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6. Keyframes&lt;/td&gt;
&lt;td&gt;Approved static visual reference for each shot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7. Kling generation&lt;/td&gt;
&lt;td&gt;Text, image, element, and multi-shot generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8. Selection and regeneration&lt;/td&gt;
&lt;td&gt;Pick, repair, replace, and version footage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9. Post-production&lt;/td&gt;
&lt;td&gt;Edit, grade, voice, music, captions, graphics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10. Brand and legal review&lt;/td&gt;
&lt;td&gt;Trademark, likeness, rights, claims&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11. Multi-channel export&lt;/td&gt;
&lt;td&gt;TikTok, Reels, YouTube, ecommerce, website&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12. Archiving&lt;/td&gt;
&lt;td&gt;Sources, prompts, licenses, approvals, deliverables&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. Turn the Client Brief into an Executable Task
&lt;/h2&gt;

&lt;p&gt;Confirm at least the following.&lt;/p&gt;

&lt;h3&gt;
  
  
  Business objective
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;awareness;&lt;/li&gt;
&lt;li&gt;product launch;&lt;/li&gt;
&lt;li&gt;product education;&lt;/li&gt;
&lt;li&gt;ecommerce conversion;&lt;/li&gt;
&lt;li&gt;channel recruitment;&lt;/li&gt;
&lt;li&gt;event promotion;&lt;/li&gt;
&lt;li&gt;corporate image.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Audience
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;age and profession;&lt;/li&gt;
&lt;li&gt;region;&lt;/li&gt;
&lt;li&gt;pain points;&lt;/li&gt;
&lt;li&gt;use context;&lt;/li&gt;
&lt;li&gt;purchase drivers;&lt;/li&gt;
&lt;li&gt;primary viewing platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  One core message
&lt;/h3&gt;

&lt;p&gt;A 15–30 second video should normally communicate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one core benefit;&lt;/li&gt;
&lt;li&gt;one scenario;&lt;/li&gt;
&lt;li&gt;one call to action.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Channel specifications
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Channel&lt;/th&gt;
&lt;th&gt;Common ratio&lt;/th&gt;
&lt;th&gt;Recommended length&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TikTok / Reels / Shorts&lt;/td&gt;
&lt;td&gt;9:16&lt;/td&gt;
&lt;td&gt;10–30 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YouTube&lt;/td&gt;
&lt;td&gt;16:9&lt;/td&gt;
&lt;td&gt;30 sec or longer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paid social&lt;/td&gt;
&lt;td&gt;9:16, 1:1, 16:9&lt;/td&gt;
&lt;td&gt;6–30 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ecommerce page&lt;/td&gt;
&lt;td&gt;1:1, 3:4, 16:9&lt;/td&gt;
&lt;td&gt;10–60 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Digital signage&lt;/td&gt;
&lt;td&gt;Custom&lt;/td&gt;
&lt;td&gt;Looping&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Approval owners
&lt;/h3&gt;

&lt;p&gt;Identify who approves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the requirement;&lt;/li&gt;
&lt;li&gt;the creative direction;&lt;/li&gt;
&lt;li&gt;product claims;&lt;/li&gt;
&lt;li&gt;brand compliance;&lt;/li&gt;
&lt;li&gt;final acceptance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Define AI Project Boundaries in the Quote
&lt;/h2&gt;

&lt;p&gt;The main risk in commercial AI video is often expectation management.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deliverables example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;One 20-second vertical brand promotional video;
1080 × 1920 resolution;
including creative concept, script, storyboard, AI-generated shots,
editing, captions, licensed music, and basic color grading;
one captioned version and one clean version;
two consolidated revision rounds.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  AI-generation notice
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Parts of this project will be produced with generative AI tools.
AI-generated footage may contain visual randomness.
The final result is based on the approved preview.
For high-precision packaging text, logos, specifications, and product geometry,
real footage, static design, or post-production compositing may be used instead.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Revision scope
&lt;/h3&gt;

&lt;p&gt;Separate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;copy changes;&lt;/li&gt;
&lt;li&gt;shot replacement;&lt;/li&gt;
&lt;li&gt;style redesign;&lt;/li&gt;
&lt;li&gt;product replacement;&lt;/li&gt;
&lt;li&gt;additional aspect ratios;&lt;/li&gt;
&lt;li&gt;new language versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Client warranties
&lt;/h3&gt;

&lt;p&gt;Require the client to confirm rights to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logos and trademarks;&lt;/li&gt;
&lt;li&gt;product images;&lt;/li&gt;
&lt;li&gt;people and voices;&lt;/li&gt;
&lt;li&gt;music and fonts;&lt;/li&gt;
&lt;li&gt;copy and product claims.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Write the Script Before the Prompt
&lt;/h2&gt;

&lt;p&gt;A Kling prompt is not a commercial script.&lt;/p&gt;

&lt;p&gt;A real storyboard should contain:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Timecode&lt;/td&gt;
&lt;td&gt;0–3 sec, 3–7 sec, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visual&lt;/td&gt;
&lt;td&gt;Person, product, environment, action&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Camera&lt;/td&gt;
&lt;td&gt;Shot size, angle, movement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Voiceover&lt;/td&gt;
&lt;td&gt;Spoken copy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On-screen text&lt;/td&gt;
&lt;td&gt;Captions and claims&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sound&lt;/td&gt;
&lt;td&gt;Music, SFX, ambience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brand elements&lt;/td&gt;
&lt;td&gt;Logo, product, brand color&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  20-second structure
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0–3 sec:&lt;/strong&gt; hook;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3–10 sec:&lt;/strong&gt; demonstrate value;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10–16 sec:&lt;/strong&gt; build brand memory;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;16–20 sec:&lt;/strong&gt; call to action.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Build a Brand Asset Pack
&lt;/h2&gt;

&lt;p&gt;Prepare:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;transparent PNG logos;&lt;/li&gt;
&lt;li&gt;front, side, back, and 45-degree product photos;&lt;/li&gt;
&lt;li&gt;RGB, HEX, and CMYK brand colors;&lt;/li&gt;
&lt;li&gt;licensed brand fonts;&lt;/li&gt;
&lt;li&gt;product dimensions and proportions;&lt;/li&gt;
&lt;li&gt;high-resolution package text;&lt;/li&gt;
&lt;li&gt;approved visual references;&lt;/li&gt;
&lt;li&gt;prohibited competitor styles;&lt;/li&gt;
&lt;li&gt;character references;&lt;/li&gt;
&lt;li&gt;restricted advertising language.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Consistency sheet
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Approved standard&lt;/th&gt;
&lt;th&gt;Prohibited outcome&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Logo&lt;/td&gt;
&lt;td&gt;White horizontal logo&lt;/td&gt;
&lt;td&gt;Stretching, recoloring, redrawing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main colors&lt;/td&gt;
&lt;td&gt;Deep blue and gold&lt;/td&gt;
&lt;td&gt;Neon saturation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product&lt;/td&gt;
&lt;td&gt;Black bottle and gold cap&lt;/td&gt;
&lt;td&gt;Shape changes or label rearrangement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mood&lt;/td&gt;
&lt;td&gt;Premium, restrained, modern&lt;/td&gt;
&lt;td&gt;Cartoon or cheap discount style&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Talent&lt;/td&gt;
&lt;td&gt;Professional adult&lt;/td&gt;
&lt;td&gt;Children or exaggerated influencer styling&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  8. Create Keyframes Before Image-to-Video
&lt;/h2&gt;

&lt;p&gt;For commercial brand work, use:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Brand assets → approved keyframe → image-to-video&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;rather than relying entirely on text-to-video.&lt;/p&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;more stable product shape;&lt;/li&gt;
&lt;li&gt;easier approval;&lt;/li&gt;
&lt;li&gt;better brand-color control;&lt;/li&gt;
&lt;li&gt;lower rework cost;&lt;/li&gt;
&lt;li&gt;greater continuity across shots.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keyframes can be created using Kling IMAGE 3.0, Midjourney, OpenAI image generation, Photoshop, Firefly, real product photography, or 3D renders.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keyframe review
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Is the product accurate?&lt;/li&gt;
&lt;li&gt;Is the logo correct?&lt;/li&gt;
&lt;li&gt;Is packaging text usable?&lt;/li&gt;
&lt;li&gt;Is lighting consistent?&lt;/li&gt;
&lt;li&gt;Is there space for captions?&lt;/li&gt;
&lt;li&gt;Does motion direction make sense?&lt;/li&gt;
&lt;li&gt;Can the shot connect to the next one?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add logos and small packaging text in post whenever accuracy matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Write Shot-Level Kling Prompts
&lt;/h2&gt;

&lt;p&gt;A controlled commercial prompt should include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;subject + environment + action + camera + lighting + material + brand mood + constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Subject] is in [environment], performing [action].
Use a [shot size] from [camera angle] with [camera movement].
Lighting is [description], with [material quality].
Overall tone: [brand mood] and [color system].
Keep product shape, label placement, primary colors, and proportions consistent.
Avoid distorted text, redrawn logos, extra objects, abnormal hands, and flicker.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Product hero example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A premium deep-blue perfume bottle stands in the center of a black mirrored surface.
Keep the exact reference proportions and gold cap.
A very light mist moves slowly around the bottle.
Use a low-angle camera with a slow push-in, ending on a 45-degree close-up.
Gold rim light defines the edges, with a deep-blue-to-black background.
Premium, restrained, modern luxury advertising style.
Do not add text, change the bottle shape, or create additional products.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Lifestyle example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In a modern apartment at sunrise, a professional woman in her thirties
naturally picks up the reference perfume bottle and sprays it once.
Fine mist is visible in the backlight.
Use a medium close-up with a subtle stabilizer orbit.
Soft morning light, cool blue and warm gold palette, realistic commercial photography.
Keep the face, clothing, and product consistent.
Avoid abnormal fingers, product deformation, and exaggerated acting.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Multi-Shot example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a 12-second premium perfume advertisement with three shots:
Shot 1, 3 seconds: wide product view on a black mirrored surface, slow push-in.
Shot 2, 5 seconds: a woman by a window picks up the bottle and sprays once in backlight.
Shot 3, 4 seconds: return to a 45-degree product close-up with stronger gold rim light and a slight camera rise.
Maintain the same product, blue-and-gold brand mood, and continuous lighting logic.
Do not generate brand text or logos; leave them for post-production.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  10. Choose the Right Generation Mode
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Recommended mode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fully conceptual scene&lt;/td&gt;
&lt;td&gt;Text-to-Video&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accurate product appearance&lt;/td&gt;
&lt;td&gt;Image-to-Video&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controlled transition&lt;/td&gt;
&lt;td&gt;Start &amp;amp; End Frames&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short multi-shot story&lt;/td&gt;
&lt;td&gt;Multi-Shot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consistent person or product&lt;/td&gt;
&lt;td&gt;Element Reference / Subject Binding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Specific body movement&lt;/td&gt;
&lt;td&gt;Motion Control or video reference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dialogue or ambient sound&lt;/td&gt;
&lt;td&gt;Native Audio&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Commercial recommendations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use image-to-video for products;&lt;/li&gt;
&lt;li&gt;use multiple references for talent;&lt;/li&gt;
&lt;li&gt;use motion references for complex actions;&lt;/li&gt;
&lt;li&gt;add logos and legal text in post;&lt;/li&gt;
&lt;li&gt;split videos longer than 15 seconds into shots;&lt;/li&gt;
&lt;li&gt;keep exact claims in captions, not generative imagery.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  11. Build a Generate–Select–Regenerate Loop
&lt;/h2&gt;

&lt;p&gt;For each important shot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generate 3–6 candidates;&lt;/li&gt;
&lt;li&gt;select the most stable action and composition;&lt;/li&gt;
&lt;li&gt;classify the defect;&lt;/li&gt;
&lt;li&gt;change one variable at a time;&lt;/li&gt;
&lt;li&gt;save prompt and version information.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Response&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Product deformation&lt;/td&gt;
&lt;td&gt;Strong reference images and smaller movement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Incorrect logo&lt;/td&gt;
&lt;td&gt;Remove generated text and add the logo in post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Face drift&lt;/td&gt;
&lt;td&gt;Fixed references, shorter clips, less rapid rotation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abnormal hands&lt;/td&gt;
&lt;td&gt;Reframe, hide hands, substitute motion, or use live footage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unnatural motion&lt;/td&gt;
&lt;td&gt;Split the shot and specify start/end movement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Color drift&lt;/td&gt;
&lt;td&gt;Unified keyframes and final color grade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Background artifacts&lt;/td&gt;
&lt;td&gt;Simpler environment and stronger constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Poor continuity&lt;/td&gt;
&lt;td&gt;Start/end frames, consistent references, and edit transitions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  File naming
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;S01_ProductHero_V01.mp4
S01_ProductHero_V02.mp4
S02_Lifestyle_V03_Selected.mp4
S03_EndFrame_V02_ClientApproved.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  12. Post-Production Determines Commercial Quality
&lt;/h2&gt;

&lt;p&gt;Recommended tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CapCut;&lt;/li&gt;
&lt;li&gt;Premiere Pro;&lt;/li&gt;
&lt;li&gt;After Effects;&lt;/li&gt;
&lt;li&gt;DaVinci Resolve;&lt;/li&gt;
&lt;li&gt;Audition;&lt;/li&gt;
&lt;li&gt;Photoshop / Illustrator;&lt;/li&gt;
&lt;li&gt;professional voice or ElevenLabs where appropriate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Post-production tasks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Select and reorder shots;&lt;/li&gt;
&lt;li&gt;Add exact logos and package text;&lt;/li&gt;
&lt;li&gt;Use licensed brand fonts;&lt;/li&gt;
&lt;li&gt;Normalize color and grain;&lt;/li&gt;
&lt;li&gt;Add music, sound design, and voiceover;&lt;/li&gt;
&lt;li&gt;Adjust speed and transitions;&lt;/li&gt;
&lt;li&gt;Replace unstable frames with stills or live footage;&lt;/li&gt;
&lt;li&gt;Composite and mask defects;&lt;/li&gt;
&lt;li&gt;Build the final brand end card;&lt;/li&gt;
&lt;li&gt;Adapt all aspect ratios.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Exact information such as logos, product names, prices, efficacy statements, dates, disclaimers, and QR codes should be created in post-production.&lt;/p&gt;




&lt;h2&gt;
  
  
  13. Sound and Music Workflow
&lt;/h2&gt;

&lt;p&gt;VIDEO 3.0 supports native audio, but brand films should still use layered sound management.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Track&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A1&lt;/td&gt;
&lt;td&gt;Voiceover&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A2&lt;/td&gt;
&lt;td&gt;Music&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A3&lt;/td&gt;
&lt;td&gt;Ambience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A4&lt;/td&gt;
&lt;td&gt;Product sound effects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A5&lt;/td&gt;
&lt;td&gt;Sonic logo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Native audio is useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ambience;&lt;/li&gt;
&lt;li&gt;footsteps, wind, and water;&lt;/li&gt;
&lt;li&gt;short dialogue;&lt;/li&gt;
&lt;li&gt;synchronized action sounds;&lt;/li&gt;
&lt;li&gt;concept previews.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Post-production audio is better for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;final brand narration;&lt;/li&gt;
&lt;li&gt;exact product-name pronunciation;&lt;/li&gt;
&lt;li&gt;regulated messaging;&lt;/li&gt;
&lt;li&gt;multilingual delivery;&lt;/li&gt;
&lt;li&gt;licensed music;&lt;/li&gt;
&lt;li&gt;reusable sonic branding.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  14. Brand and Legal Review
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Input rights
&lt;/h3&gt;

&lt;p&gt;Confirm rights to product images, logos, people, architecture, artwork, music, fonts, and third-party references.&lt;/p&gt;

&lt;h3&gt;
  
  
  People and voices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;do not clone people without authorization;&lt;/li&gt;
&lt;li&gt;do not present AI characters as real experts or customers;&lt;/li&gt;
&lt;li&gt;obtain likeness releases;&lt;/li&gt;
&lt;li&gt;obtain explicit voice-cloning consent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Advertising claims
&lt;/h3&gt;

&lt;p&gt;Review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;absolute claims;&lt;/li&gt;
&lt;li&gt;efficacy claims;&lt;/li&gt;
&lt;li&gt;health and medical statements;&lt;/li&gt;
&lt;li&gt;financial returns;&lt;/li&gt;
&lt;li&gt;prices and promotional conditions;&lt;/li&gt;
&lt;li&gt;data accuracy;&lt;/li&gt;
&lt;li&gt;comparative advertising;&lt;/li&gt;
&lt;li&gt;content involving minors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kling AI terms
&lt;/h3&gt;

&lt;p&gt;Kling AI's official user policy includes conditions relating to inputs, outputs, platform licenses, and commercial use. It also discusses the platform's license to content and a process for revoking certain authorization.&lt;/p&gt;

&lt;p&gt;Do not reduce this to “a paid account automatically grants unlimited commercial rights.” For a serious project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;review the applicable regional agreement on the generation date;&lt;/li&gt;
&lt;li&gt;verify the rights provided by the account plan;&lt;/li&gt;
&lt;li&gt;save a copy of the terms and payment records;&lt;/li&gt;
&lt;li&gt;obtain legal review for high-value campaigns;&lt;/li&gt;
&lt;li&gt;avoid uploading unauthorized confidential or personal material;&lt;/li&gt;
&lt;li&gt;review data-processing terms for confidential projects.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  15. Export and Acceptance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Recommended deliverables
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;9:16 captioned&lt;/td&gt;
&lt;td&gt;TikTok, Reels, Shorts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9:16 clean&lt;/td&gt;
&lt;td&gt;Future localization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16:9 captioned&lt;/td&gt;
&lt;td&gt;YouTube, website, presentations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1:1 square&lt;/td&gt;
&lt;td&gt;Paid social&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clean master&lt;/td&gt;
&lt;td&gt;Editable archive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cover image&lt;/td&gt;
&lt;td&gt;Publishing thumbnail&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SRT subtitles&lt;/td&gt;
&lt;td&gt;Localization and reuse&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Technical acceptance checklist
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;correct resolution;&lt;/li&gt;
&lt;li&gt;consistent frame rate;&lt;/li&gt;
&lt;li&gt;no black or flashing frames;&lt;/li&gt;
&lt;li&gt;accurate logo and text;&lt;/li&gt;
&lt;li&gt;no clipped audio;&lt;/li&gt;
&lt;li&gt;correct captions;&lt;/li&gt;
&lt;li&gt;accurate product color;&lt;/li&gt;
&lt;li&gt;scannable QR code;&lt;/li&gt;
&lt;li&gt;correct safe area;&lt;/li&gt;
&lt;li&gt;platform-compliant duration;&lt;/li&gt;
&lt;li&gt;clear file names and versions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  16. Practical Case: 20-Second Premium Beverage Video
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Goal
&lt;/h3&gt;

&lt;p&gt;Create a 20-second new-product video for a premium non-alcoholic sparkling beverage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Brand proposition
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Light bubbles. A new rhythm for the city at night.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Storyboard
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Visual&lt;/th&gt;
&lt;th&gt;Generation mode&lt;/th&gt;
&lt;th&gt;Post-production&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0–3 sec&lt;/td&gt;
&lt;td&gt;Cold bottle revealed by rim light&lt;/td&gt;
&lt;td&gt;Image-to-Video&lt;/td&gt;
&lt;td&gt;Add title&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3–7 sec&lt;/td&gt;
&lt;td&gt;Cap opens, vapor and bubbles expand&lt;/td&gt;
&lt;td&gt;Image-to-Video&lt;/td&gt;
&lt;td&gt;Add opening SFX&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7–12 sec&lt;/td&gt;
&lt;td&gt;Young professionals on a city terrace&lt;/td&gt;
&lt;td&gt;Element reference&lt;/td&gt;
&lt;td&gt;Add ambience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12–16 sec&lt;/td&gt;
&lt;td&gt;Beverage poured into a clear glass&lt;/td&gt;
&lt;td&gt;Image-to-Video&lt;/td&gt;
&lt;td&gt;Gentle slow motion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16–20 sec&lt;/td&gt;
&lt;td&gt;Product hero and brand message&lt;/td&gt;
&lt;td&gt;Start/end frames&lt;/td&gt;
&lt;td&gt;Logo and CTA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Product shot prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The reference premium sparkling beverage bottle stands on a deep-black mirrored table.
Keep the bottle shape, label placement, cap, and liquid color identical to the reference.
Condensation slowly moves down the bottle, with fine bubbles rising inside.
Use a low-angle macro close-up and a slow push-in.
Blue and violet city neon create rim light, with a blurred background.
Premium, refreshing, modern nightlife advertising style.
Do not change the package structure, add text, or create extra bottles.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  End card
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Headline: Open a new rhythm for the night
Subline: 0% alcohol · fine bubbles · refreshing taste
CTA: Search the brand name and discover the new release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the headline and logo in After Effects, Premiere, or CapCut rather than inside the generated footage.&lt;/p&gt;




&lt;h2&gt;
  
  
  17. Budget and Timeline
&lt;/h2&gt;

&lt;p&gt;AI reduces production cost but does not make production free.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;strategy and script;&lt;/li&gt;
&lt;li&gt;storyboard and keyframes;&lt;/li&gt;
&lt;li&gt;Kling subscription and credits;&lt;/li&gt;
&lt;li&gt;generation failures and iterations;&lt;/li&gt;
&lt;li&gt;editing and motion graphics;&lt;/li&gt;
&lt;li&gt;voice and licensed music;&lt;/li&gt;
&lt;li&gt;stock or image rights;&lt;/li&gt;
&lt;li&gt;communication;&lt;/li&gt;
&lt;li&gt;revisions and multi-format delivery;&lt;/li&gt;
&lt;li&gt;legal review.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing formula
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project fee = strategy + storyboard + generation + post-production + audio + licensing + revision risk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example timeline
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Suggested time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Brief and concept&lt;/td&gt;
&lt;td&gt;1 day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Script and storyboard&lt;/td&gt;
&lt;td&gt;1–2 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyframe approval&lt;/td&gt;
&lt;td&gt;1–2 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI shot generation&lt;/td&gt;
&lt;td&gt;2–4 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rough cut&lt;/td&gt;
&lt;td&gt;1 day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client feedback&lt;/td&gt;
&lt;td&gt;1 day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Final edit and delivery&lt;/td&gt;
&lt;td&gt;1–2 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  18. Project Folder Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Brand_Video_Project/
├── 01_Brief/
├── 02_Contract_and_Rights/
├── 03_Script_Storyboard/
├── 04_Brand_Assets/
├── 05_Keyframes/
├── 06_Kling_Generations/
├── 07_Selected_Footage/
├── 08_Edit_Project/
├── 09_Audio/
├── 10_Review_Versions/
├── 11_Final_Deliverables/
└── 12_Prompts_and_Logs/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Archive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;final prompts;&lt;/li&gt;
&lt;li&gt;generation dates and model versions;&lt;/li&gt;
&lt;li&gt;reference-image sources;&lt;/li&gt;
&lt;li&gt;licenses;&lt;/li&gt;
&lt;li&gt;approval records;&lt;/li&gt;
&lt;li&gt;final delivery checklist.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  19. Pre-Delivery Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Is the business objective clear?&lt;/li&gt;
&lt;li&gt;Is there only one core message?&lt;/li&gt;
&lt;li&gt;Is the product model correct?&lt;/li&gt;
&lt;li&gt;Are product colors and proportions accurate?&lt;/li&gt;
&lt;li&gt;Is the logo the official file?&lt;/li&gt;
&lt;li&gt;Is packaging text correct?&lt;/li&gt;
&lt;li&gt;Are people and voices authorized?&lt;/li&gt;
&lt;li&gt;Is the music commercially licensed?&lt;/li&gt;
&lt;li&gt;Are fonts licensed?&lt;/li&gt;
&lt;li&gt;Is voiceover copy factual?&lt;/li&gt;
&lt;li&gt;Are performance claims substantiated?&lt;/li&gt;
&lt;li&gt;Are prohibited absolute claims removed?&lt;/li&gt;
&lt;li&gt;Are face, hand, and physics defects fixed?&lt;/li&gt;
&lt;li&gt;Are colors consistent across shots?&lt;/li&gt;
&lt;li&gt;Are captions proofread?&lt;/li&gt;
&lt;li&gt;Is text readable on a phone?&lt;/li&gt;
&lt;li&gt;Are channel safe areas correct?&lt;/li&gt;
&lt;li&gt;Is a clean master preserved?&lt;/li&gt;
&lt;li&gt;Are prompts and rights records archived?&lt;/li&gt;
&lt;li&gt;Has the client approved the final version in writing?&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  20. Final Verdict
&lt;/h2&gt;

&lt;p&gt;The most effective way to use Kling AI for brand video is not “one prompt, one finished commercial.” It is to embed the model in a professional production pipeline:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Commercial brief → concept → script → storyboard → brand keyframes → shot-level Kling generation → human selection → post-production → brand and legal review → multi-channel delivery.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Kling VIDEO 3.0's Multi-Shot, element reference, native audio, and 3–15 second output make AI footage more controllable. Commercial quality still depends on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;accurate brand assets;&lt;/li&gt;
&lt;li&gt;strong shot design;&lt;/li&gt;
&lt;li&gt;shot-by-shot version management;&lt;/li&gt;
&lt;li&gt;professional post-production;&lt;/li&gt;
&lt;li&gt;clear rights and compliance;&lt;/li&gt;
&lt;li&gt;structured client approval.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Final recommendation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Treat Kling AI as a high-efficiency virtual production stage and shot generator, not as a shortcut that removes strategy, design, editing, and legal responsibility.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  21. SEO Information
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO title:&lt;/strong&gt; How to Create a Brand Promotional Video with Kling AI: Complete Commercial Workflow&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SEO description:&lt;/strong&gt; Learn how to use Kling AI for brand promotional videos, including client briefs, quotes, scripts, storyboards, brand assets, keyframes, Kling VIDEO 3.0 prompts, image-to-video, Multi-Shot, editing, licensing, compliance, and delivery.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Keywords:&lt;/strong&gt; Kling AI, AI video generator, brand promotional video, AI advertising video, Kling prompt, image to video, commercial AI video, short video workflow, Kling VIDEO 3.0, AI video commercial use&lt;/p&gt;




&lt;h2&gt;
  
  
  22. Sources
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Kling AI official website: Creative Studio, video, image, sound, and VIDEO 3.0 capabilities.&lt;br&gt;&lt;br&gt;
&lt;a href="https://kling.ai/" rel="noopener noreferrer"&gt;https://kling.ai/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kling VIDEO 3.0 Model User Guide: text-to-video, image-to-video, start/end frames, native audio, Multi-Shot, element references, multilingual support, and 3–15 second duration.&lt;br&gt;&lt;br&gt;
&lt;a href="https://kling.ai/quickstart/klingai-video-3-model-user-guide" rel="noopener noreferrer"&gt;https://kling.ai/quickstart/klingai-video-3-model-user-guide&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All You Need to Know About Kling VIDEO 3.0: unified multimodal generation, Multi-Shot, native audio, subject consistency, and 15-second output.&lt;br&gt;&lt;br&gt;
&lt;a href="https://kling.ai/blog/kling-video-3-0-ai-director-features-guide" rel="noopener noreferrer"&gt;https://kling.ai/blog/kling-video-3-0-ai-director-features-guide&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kling AI Blog: VIDEO 3.0, Motion Control, native 4K, product-video workflows, and camera control.&lt;br&gt;&lt;br&gt;
&lt;a href="https://kling.ai/blog" rel="noopener noreferrer"&gt;https://kling.ai/blog&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kling AI Terms of Use: inputs, outputs, intellectual property, platform licenses, content use, and commercial conditions.&lt;br&gt;&lt;br&gt;
&lt;a href="https://kling.ai/docs/user-policy" rel="noopener noreferrer"&gt;https://kling.ai/docs/user-policy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;AI models, prices, credits, commercial terms, and data policies can change. Review the official pages and the agreement applicable to your region and account at the time of contracting and generation.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Publish-ready Summary
&lt;/h2&gt;

&lt;p&gt;Kling AI can support brand promotional videos with product atmosphere shots, image-to-video, character motion, Multi-Shot storytelling, camera movement, and native audio. However, a commercial deliverable should not rely on a single prompt. The correct workflow is to define the business goal and specifications, create a brand asset pack and storyboard, use approved keyframes and image-to-video to protect product consistency, generate and review each shot separately, and complete the work with editing, color grading, exact logos and captions, licensed audio, legal review, and multi-channel exports. Exact logos, packaging text, specifications, and regulated claims should be created and verified in post-production rather than left to a generative model.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260714-4487" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Use AI to Support English Academic Paper Writing: A Complete Workflow</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Mon, 13 Jul 2026 02:28:35 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-use-ai-to-support-english-academic-paper-writing-a-complete-workflow-4hil</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-use-ai-to-support-english-academic-paper-writing-a-complete-workflow-4hil</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Category: Academic Writing / AI Writing Workflow&lt;br&gt;&lt;br&gt;
Target readers: graduate students, PhD students, researchers, non-native English authors, and authors preparing journal or conference submissions&lt;br&gt;&lt;br&gt;
Test date: July 13, 2026&lt;br&gt;&lt;br&gt;
Bottom line: &lt;strong&gt;AI can significantly improve the efficiency of English academic writing, especially for outlining, structure, language polishing, abstract revision, reviewer responses, and pre-submission checks. But AI must not fabricate data, invent references, replace author judgment, or be listed as an author. The right division of labor is: humans own the research and claims; AI supports language, structure, and checking.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. First Principle: AI Is Allowed in Some Ways, But Not All Ways
&lt;/h2&gt;

&lt;p&gt;AI is most useful in three academic writing tasks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Language support&lt;/strong&gt;: grammar, expression, academic tone, sentence clarity;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structural support&lt;/strong&gt;: abstract structure, introduction logic, transitions, response-letter structure;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checking support&lt;/strong&gt;: terminology consistency, figure captions, submission checklists, AI-use disclosure drafts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI should not be used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fabricate data;&lt;/li&gt;
&lt;li&gt;invent references;&lt;/li&gt;
&lt;li&gt;create unsupported conclusions;&lt;/li&gt;
&lt;li&gt;generate a full paper for direct submission;&lt;/li&gt;
&lt;li&gt;replace scholarly contribution;&lt;/li&gt;
&lt;li&gt;use large-scale AI-generated text without disclosure;&lt;/li&gt;
&lt;li&gt;upload confidential manuscripts or sensitive data to untrusted tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Elsevier’s journal policy requires authors to disclose AI tools used for manuscript preparation and document the tool name, purpose, and level of author oversight. Springer Nature also requires researchers to take responsibility for their work and transparently declare AI use in line with its policies. COPE states that AI tools cannot be listed as authors because authorship requires responsibility, consent, and accountability.&lt;/p&gt;

&lt;p&gt;One sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI can be your academic writing assistant, but it cannot be the author of your paper.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Recommended Tool Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Tools&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Topic and structure&lt;/td&gt;
&lt;td&gt;ChatGPT / Claude / DeepSeek / Kimi&lt;/td&gt;
&lt;td&gt;Research-question refinement, outline, logic check&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Literature reading&lt;/td&gt;
&lt;td&gt;Elicit / Semantic Scholar / Consensus / NotebookLM&lt;/td&gt;
&lt;td&gt;Search, summarize, compare evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;English polishing&lt;/td&gt;
&lt;td&gt;Grammarly / DeepL Write / ChatGPT&lt;/td&gt;
&lt;td&gt;Grammar, expression, clarity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Translation support&lt;/td&gt;
&lt;td&gt;DeepL / ChatGPT / Kimi&lt;/td&gt;
&lt;td&gt;Chinese-English translation, terminology consistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Citation management&lt;/td&gt;
&lt;td&gt;Zotero / Mendeley / EndNote&lt;/td&gt;
&lt;td&gt;References and citation styles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Figure/table checking&lt;/td&gt;
&lt;td&gt;ChatGPT / Claude&lt;/td&gt;
&lt;td&gt;Captions and results description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Submission checks&lt;/td&gt;
&lt;td&gt;ChatGPT + manual checklist&lt;/td&gt;
&lt;td&gt;Cover letter, highlights, response letter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI disclosure&lt;/td&gt;
&lt;td&gt;ChatGPT + journal policy review&lt;/td&gt;
&lt;td&gt;Draft AI-use statement&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Recommended base stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Zotero + ChatGPT/Claude/DeepSeek + DeepL/Grammarly + human verification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Chinese authors writing in English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chinese research notes → AI-assisted English draft → human fact checking → Grammarly/DeepL language optimization → journal formatting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Full Workflow Overview
&lt;/h2&gt;

&lt;p&gt;Academic writing can be divided into 10 steps.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Human responsibility&lt;/th&gt;
&lt;th&gt;AI support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Research question&lt;/td&gt;
&lt;td&gt;Judge novelty and value&lt;/td&gt;
&lt;td&gt;Refine questions and outline options&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Literature review&lt;/td&gt;
&lt;td&gt;Read originals and evaluate evidence&lt;/td&gt;
&lt;td&gt;Summarize and compare papers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paper outline&lt;/td&gt;
&lt;td&gt;Decide logic and contribution&lt;/td&gt;
&lt;td&gt;Optimize IMRaD structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Methods&lt;/td&gt;
&lt;td&gt;Report real design&lt;/td&gt;
&lt;td&gt;Improve clarity and check missing details&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Results&lt;/td&gt;
&lt;td&gt;Interpret real data&lt;/td&gt;
&lt;td&gt;Convert tables/figures into English description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discussion&lt;/td&gt;
&lt;td&gt;Develop contribution and limitations&lt;/td&gt;
&lt;td&gt;Check reasoning and transitions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abstract/title&lt;/td&gt;
&lt;td&gt;Position contribution&lt;/td&gt;
&lt;td&gt;Generate versions under constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language polishing&lt;/td&gt;
&lt;td&gt;Final author judgment&lt;/td&gt;
&lt;td&gt;Grammar, concision, academic tone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Submission package&lt;/td&gt;
&lt;td&gt;Confirm journal requirements&lt;/td&gt;
&lt;td&gt;Cover letter and highlights draft&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reviewer response&lt;/td&gt;
&lt;td&gt;Decide revisions&lt;/td&gt;
&lt;td&gt;Polite and structured responses&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. Test Tasks
&lt;/h2&gt;

&lt;p&gt;This guide evaluates AI support across eight academic writing tasks.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;What is tested&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Research question refinement&lt;/td&gt;
&lt;td&gt;Turn a broad topic into publishable questions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Introduction framework&lt;/td&gt;
&lt;td&gt;Background, gap, contribution, structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Methods polishing&lt;/td&gt;
&lt;td&gt;Preserve facts while improving English&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Results description&lt;/td&gt;
&lt;td&gt;Describe tables/figures without inventing results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discussion logic&lt;/td&gt;
&lt;td&gt;Check contribution, interpretation, limitations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abstract revision&lt;/td&gt;
&lt;td&gt;Structured and unstructured abstract versions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reviewer response&lt;/td&gt;
&lt;td&gt;Response to reviewers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI-use disclosure&lt;/td&gt;
&lt;td&gt;Draft disclosure according to journal policy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Scoring criteria
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;Explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Language improvement&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;More natural, accurate, academic English&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structural clarity&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Better logical organization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Factual fidelity&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;No invented claims or changed meaning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Academic compliance&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Citations, disclosure, boundaries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Efficiency gain&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Time saved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controllability&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Easy for authors to review and edit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Overall score: &lt;strong&gt;88 / 100&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Verdict:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI’s biggest value in English paper writing is not ghostwriting. It reduces low-value language labor so authors can focus on research logic, evidence, and contribution.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. Step 1: Refine the Research Question
&lt;/h2&gt;

&lt;p&gt;Do not ask AI to write the paper first. Ask it to help clarify the research question.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I am preparing an academic paper in [field].
My rough topic is: [topic].
Please help me refine it into 3–5 research questions.
For each question, explain:
1. why it may be research-worthy;
2. what data or evidence would be needed;
3. what potential contribution it may make;
4. what risks or limitations it may have.
Do not invent empirical findings.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Human checks
&lt;/h3&gt;

&lt;p&gt;AI-generated research questions are only brainstorming. You must judge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;whether the question is already over-studied;&lt;/li&gt;
&lt;li&gt;whether evidence is available;&lt;/li&gt;
&lt;li&gt;whether it fits the target journal;&lt;/li&gt;
&lt;li&gt;whether it offers theoretical or practical contribution.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Step 2: Build the Paper Outline
&lt;/h2&gt;

&lt;p&gt;The most common English research-paper structure is IMRaD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Introduction
Methods
Results
Discussion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please create an IMRaD outline for a paper on the following research question:
[research question]

Requirements:
1. Include the purpose of each section;
2. Specify what evidence should be placed in each section;
3. Mark which parts require real data or citations;
4. Do not generate unsupported claims.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Outline checklist
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;th&gt;Must answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Introduction&lt;/td&gt;
&lt;td&gt;What is the background, gap, and contribution?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Methods&lt;/td&gt;
&lt;td&gt;What are the data, sample, experiment, model, and variables?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Results&lt;/td&gt;
&lt;td&gt;What are the findings and supporting figures/tables?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discussion&lt;/td&gt;
&lt;td&gt;Why do findings matter, how do they compare, what are the limitations?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conclusion&lt;/td&gt;
&lt;td&gt;What is the final contribution and implication?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  7. Step 3: Write the Introduction
&lt;/h2&gt;

&lt;p&gt;An introduction is not a pile of background information. It builds a logic chain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Importance → prior work → research gap → research question → method overview → contribution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Diagnostic prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Below is my draft introduction. Please evaluate its logic.
Focus on:
1. whether the research gap is clear;
2. whether the contribution is specific;
3. whether each paragraph has a clear function;
4. whether any claim needs citation;
5. whether there are unsupported or overgeneralized statements.
Do not rewrite the whole text yet. First provide a diagnostic report.

Draft:
[paste introduction]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Revision prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please revise the following introduction for clarity, academic tone, and logical flow.
Constraints:
1. Do not add new claims;
2. Do not invent citations;
3. Keep the original meaning;
4. Improve transitions between paragraphs;
5. Mark any sentence that needs a citation with [citation needed].

Text:
[paste text]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  8. Step 4: Write the Methods Section
&lt;/h2&gt;

&lt;p&gt;The methods section is about reproducibility, not fancy prose.&lt;/p&gt;

&lt;p&gt;AI can help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;improve grammar;&lt;/li&gt;
&lt;li&gt;standardize tense;&lt;/li&gt;
&lt;li&gt;check missing details;&lt;/li&gt;
&lt;li&gt;translate method notes into English;&lt;/li&gt;
&lt;li&gt;align subheadings with journal style.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI must not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;invent sample size;&lt;/li&gt;
&lt;li&gt;invent experimental conditions;&lt;/li&gt;
&lt;li&gt;invent statistical methods;&lt;/li&gt;
&lt;li&gt;invent ethics approval;&lt;/li&gt;
&lt;li&gt;decide research design for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please polish the following Methods section.
Rules:
1. Do not change any factual information;
2. Do not add sample size, tools, parameters, or statistical methods;
3. Improve clarity and reproducibility;
4. Use precise academic English;
5. List any missing methodological information at the end.

Text:
[paste methods]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  9. Step 5: Write the Results Section
&lt;/h2&gt;

&lt;p&gt;Never let AI freely invent results. Provide real tables, figures, or values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I will provide a table of results. Please write a Results paragraph.
Rules:
1. Only describe the numbers provided;
2. Do not infer causality unless stated;
3. Highlight the most important patterns;
4. Use cautious academic language;
5. Do not invent p-values, confidence intervals, or effect sizes.

Table:
[paste table]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Useful expressions
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Academic expression&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;显著高于&lt;/td&gt;
&lt;td&gt;was significantly higher than&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;呈现上升趋势&lt;/td&gt;
&lt;td&gt;showed an increasing trend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;差异不明显&lt;/td&gt;
&lt;td&gt;the difference was not substantial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;与……一致&lt;/td&gt;
&lt;td&gt;consistent with&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;需要谨慎解释&lt;/td&gt;
&lt;td&gt;should be interpreted with caution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;不能说明因果&lt;/td&gt;
&lt;td&gt;does not imply causality&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  10. Step 6: Write the Discussion Section
&lt;/h2&gt;

&lt;p&gt;The discussion section requires author judgment. AI can support structure but cannot determine contribution.&lt;/p&gt;

&lt;p&gt;Recommended structure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Summarize key findings;&lt;/li&gt;
&lt;li&gt;Explain possible mechanisms;&lt;/li&gt;
&lt;li&gt;Compare with prior studies;&lt;/li&gt;
&lt;li&gt;State theoretical or practical implications;&lt;/li&gt;
&lt;li&gt;Explain limitations;&lt;/li&gt;
&lt;li&gt;Suggest future research.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please evaluate the Discussion section below.
Focus on:
1. whether the interpretation is supported by the results;
2. whether the comparison with prior studies is clear;
3. whether the contribution is overstated;
4. whether limitations are specific;
5. whether future research directions are meaningful.
Do not invent references or findings.

Text:
[paste discussion]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  11. Step 7: Optimize Abstract and Title
&lt;/h2&gt;

&lt;p&gt;The abstract often determines whether editors and reviewers continue reading.&lt;/p&gt;

&lt;h3&gt;
  
  
  Abstract prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please rewrite the following abstract in academic English.
Requirements:
1. Keep it within [word limit] words;
2. Include background, objective, methods, results, and conclusion;
3. Do not add findings that are not in the text;
4. Make the contribution clear but not exaggerated;
5. Provide 3 versions: concise, journal-style, and more accessible.

Abstract:
[paste abstract]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Title prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generate 10 academic paper titles based on the abstract below.
Requirements:
1. Avoid exaggerated wording;
2. Keep titles specific and searchable;
3. Include key variables or methods if appropriate;
4. Provide one short title, one descriptive title, and one impact-oriented title.

Abstract:
[paste abstract]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  12. Step 8: Polish the English
&lt;/h2&gt;

&lt;p&gt;Good academic English is not about “advanced vocabulary.” It should be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clear;&lt;/li&gt;
&lt;li&gt;accurate;&lt;/li&gt;
&lt;li&gt;concise;&lt;/li&gt;
&lt;li&gt;logically connected;&lt;/li&gt;
&lt;li&gt;terminologically consistent;&lt;/li&gt;
&lt;li&gt;not exaggerated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conservative editing prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please polish the following academic paragraph.
Use conservative academic editing.
Do not change the meaning.
Do not add new claims.
Keep technical terms unchanged.
Return a revised version and a brief list of changes.

Text:
[paste paragraph]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clarity prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please improve the clarity and conciseness of the following paragraph.
Do not paraphrase aggressively.
Do not change technical meaning.
Do not remove important details.

Text:
[paste paragraph]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  13. Step 9: Write Response to Reviewers
&lt;/h2&gt;

&lt;p&gt;Reviewer responses are ideal for AI assistance because they require polite, structured, accurate writing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please help draft a response to the reviewer comment below.
Rules:
1. Be polite and professional;
2. Acknowledge the reviewer’s concern;
3. Explain what changes were made;
4. Refer to the revised manuscript section;
5. Do not overpromise;
6. If disagreeing, disagree respectfully and provide evidence.

Reviewer comment:
[paste comment]

Our actual revision:
[paste what you changed]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Recommended structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reviewer Comment:
[comment]

Response:
We thank the reviewer for this helpful comment. ...

Revision made:
We have revised Section X, Paragraph Y, to clarify ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  14. Step 10: AI-Use Disclosure
&lt;/h2&gt;

&lt;p&gt;Policies vary across journals, but the general trend is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI cannot be listed as an author;&lt;/li&gt;
&lt;li&gt;authors are responsible for all content;&lt;/li&gt;
&lt;li&gt;AI-assisted writing often needs disclosure;&lt;/li&gt;
&lt;li&gt;confidential manuscripts should not be uploaded to noncompliant tools;&lt;/li&gt;
&lt;li&gt;generated images, data, and research claims are especially sensitive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disclosure template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;During the preparation of this manuscript, the authors used [tool name] to assist with language editing and improving the clarity of selected paragraphs. The authors reviewed and edited all AI-assisted outputs and take full responsibility for the content of the manuscript.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The statement should explain:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;which tool was used;&lt;/li&gt;
&lt;li&gt;what it was used for;&lt;/li&gt;
&lt;li&gt;that the authors reviewed and edited the output;&lt;/li&gt;
&lt;li&gt;that the authors take responsibility.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Always check the target journal’s latest policy before submission.&lt;/p&gt;




&lt;h2&gt;
  
  
  15. Pitfall Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Do not let AI invent references;&lt;/li&gt;
&lt;li&gt;Do not let AI create nonexistent data;&lt;/li&gt;
&lt;li&gt;Do not submit a fully AI-generated paper;&lt;/li&gt;
&lt;li&gt;Do not hide important AI use;&lt;/li&gt;
&lt;li&gt;Do not upload unpublished manuscripts to untrusted tools;&lt;/li&gt;
&lt;li&gt;Do not let AI determine statistical significance;&lt;/li&gt;
&lt;li&gt;Do not let AI define your contribution;&lt;/li&gt;
&lt;li&gt;Do not chase fancy words over accuracy;&lt;/li&gt;
&lt;li&gt;Do not ignore the target journal’s AI policy;&lt;/li&gt;
&lt;li&gt;Do not treat AI output as submission-ready without review.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  16. Recommended Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Workflow A: Chinese author writing in English
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chinese research notes → English draft → AI language polishing → human fact check → Grammarly/DeepL review → journal formatting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Workflow B: Existing English draft
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English draft → AI logic diagnosis → paragraph-by-paragraph editing → terminology check → abstract/title optimization → submission checklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Workflow C: Reviewer response
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Collect reviewer comments → decide actual revisions → AI drafts response → human checks facts and tone → final submission
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Workflow D: Pre-submission check
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Journal guidelines → formatting checklist → AI-use disclosure → figure/table captions → citation style → cover letter → final human read
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  17. Final Verdict
&lt;/h2&gt;

&lt;p&gt;The core principle of AI-assisted academic writing is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI can help make your paper clearer, but it cannot make your research truer.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Best uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;structure refinement;&lt;/li&gt;
&lt;li&gt;language improvement;&lt;/li&gt;
&lt;li&gt;logic checking;&lt;/li&gt;
&lt;li&gt;reviewer-response drafting;&lt;/li&gt;
&lt;li&gt;submission-material preparation;&lt;/li&gt;
&lt;li&gt;final checklists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The author must verify all facts, data, references, and conclusions.&lt;/p&gt;

&lt;p&gt;Final recommendation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Treat AI as an English writing editor and research assistant, not as a paper-writing ghostwriter.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  18. SEO Information
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO title:&lt;/strong&gt; How to Use AI to Support English Academic Paper Writing: A Complete Workflow&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SEO description:&lt;/strong&gt; This guide explains how to use AI to support English academic writing, covering research questions, outlines, introductions, methods, results, discussions, abstracts, polishing, reviewer responses, AI-use disclosure, compliance, and pitfalls.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Keywords:&lt;/strong&gt; AI academic writing, English paper writing, ChatGPT paper writing, DeepL Write, Grammarly, AI editing, paper abstract, response to reviewers, AI disclosure statement&lt;/p&gt;




&lt;h2&gt;
  
  
  19. Data Sources and References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Elsevier Generative AI policies for journals: authors should disclose AI tools used for manuscript preparation, including tool name, purpose, and author oversight.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.elsevier.com/about/policies-and-standards/generative-ai-policies-for-journals" rel="noopener noreferrer"&gt;https://www.elsevier.com/about/policies-and-standards/generative-ai-policies-for-journals&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Springer Nature AI guidance: researchers must take responsibility and authorship for their work and transparently declare AI use.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.springernature.com/gp/group/ai/ai-guidance-for-our-researchers-and-communities" rel="noopener noreferrer"&gt;https://www.springernature.com/gp/group/ai/ai-guidance-for-our-researchers-and-communities&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nature Portfolio AI editorial policies: AI cannot be an author, and generative AI images/videos are restricted in many publication contexts.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.nature.com/nature-portfolio/editorial-policies/ai" rel="noopener noreferrer"&gt;https://www.nature.com/nature-portfolio/editorial-policies/ai&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;COPE Authorship and AI tools: AI tools cannot be listed as authors because they cannot take responsibility.&lt;br&gt;&lt;br&gt;
&lt;a href="https://publicationethics.org/guidance/cope-position/authorship-and-ai-tools" rel="noopener noreferrer"&gt;https://publicationethics.org/guidance/cope-position/authorship-and-ai-tools&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IEEE Author Guidelines for AI-generated text: AI-generated content should be disclosed, identifying the AI system and sections involved.&lt;br&gt;&lt;br&gt;
&lt;a href="https://open.ieee.org/author-guidelines-for-artificial-intelligence-ai-generated-text/" rel="noopener noreferrer"&gt;https://open.ieee.org/author-guidelines-for-artificial-intelligence-ai-generated-text/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Academic journals' AI policies fail to curb the surge in AI-assisted academic writing: research on journal AI policies, disclosure, and real-world AI use.&lt;br&gt;&lt;br&gt;
&lt;a href="https://arxiv.org/abs/2512.06705" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2512.06705&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Publish-ready Summary
&lt;/h2&gt;

&lt;p&gt;AI can significantly improve the efficiency of English academic writing, especially for research-question refinement, outline building, language polishing, abstract/title revision, figure/table description, reviewer responses, and pre-submission checks. But AI must not fabricate data, references, or conclusions, and it cannot replace author judgment. The correct workflow is for authors to own the research facts and scholarly contribution while using AI for language, structure, and checking. Before submission, authors must verify the target journal’s latest AI-use disclosure policy.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260713-838" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Build Your Own RAG Knowledge Base Q&amp;A System with DeepSeek</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Sun, 12 Jul 2026 14:10:53 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-build-your-own-rag-knowledge-base-qa-system-with-deepseek-3dl9</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-build-your-own-rag-knowledge-base-qa-system-with-deepseek-3dl9</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Category: AI Application Engineering / RAG Knowledge Base Q&amp;amp;A&lt;br&gt;&lt;br&gt;
Target readers: backend developers, AI full-stack developers, enterprise digital teams, product managers, technical leads, and anyone who wants to turn company documents into an AI Q&amp;amp;A assistant&lt;br&gt;&lt;br&gt;
Test date: July 12, 2026&lt;br&gt;&lt;br&gt;
Bottom line: &lt;strong&gt;The recommended first version of a DeepSeek-based RAG system is: document parsing → text chunking → embeddings → vector retrieval → DeepSeek answer generation → source citations. Do not start with a complex agent. First build a minimal loop that answers accurately from your documents, refuses unsupported questions, and returns citations.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. What Problem Does RAG Solve?
&lt;/h2&gt;

&lt;p&gt;RAG means Retrieval-Augmented Generation.&lt;/p&gt;

&lt;p&gt;A normal LLM has one obvious limitation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It does not know your company policies, product manuals, support rules, project files, contract templates, implementation guides, or internal knowledge base.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you directly ask a model, it may:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hallucinate answers;&lt;/li&gt;
&lt;li&gt;return outdated information;&lt;/li&gt;
&lt;li&gt;miss internal company knowledge;&lt;/li&gt;
&lt;li&gt;fail to cite sources;&lt;/li&gt;
&lt;li&gt;guess about policies, prices, contracts, and workflows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RAG works like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
→ retrieve relevant materials from your knowledge base
→ provide those materials as context to the model
→ ask the model to answer only from that context
→ return answer + citations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In one sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;RAG makes the model answer while looking at your documents, not from vague memory.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Why Use DeepSeek for RAG?
&lt;/h2&gt;

&lt;p&gt;DeepSeek API has three practical advantages.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 OpenAI-compatible integration
&lt;/h3&gt;

&lt;p&gt;DeepSeek API documentation says the API is compatible with OpenAI / Anthropic API formats. With the OpenAI SDK, you mainly need to change &lt;code&gt;base_url&lt;/code&gt; and &lt;code&gt;api_key&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is developer-friendly because you can reuse existing code, frameworks, and tooling.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Good cost profile for Q&amp;amp;A
&lt;/h3&gt;

&lt;p&gt;RAG systems often involve repeated questions and context assembly. Model cost directly affects whether the system can run long term. DeepSeek’s model and pricing page lists the API Base URL as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://api.deepseek.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For knowledge-base Q&amp;amp;A, use cost-efficient models for normal questions and stronger reasoning models for complex cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Long context helps document Q&amp;amp;A
&lt;/h3&gt;

&lt;p&gt;DeepSeek’s V4 Preview announcement says DeepSeek-V4-Pro and DeepSeek-V4-Flash support 1M context length and Thinking / Non-Thinking modes. Long context is useful for manuals, policies, contracts, and long documents.&lt;/p&gt;

&lt;p&gt;But remember:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Long context does not eliminate the need for RAG.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should not put every document into the prompt. It is expensive, slow, hard to cite, and less controllable. Retrieve first, generate second.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Standard RAG Architecture
&lt;/h2&gt;

&lt;p&gt;A minimal RAG system usually contains eight modules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Common tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Document collection&lt;/td&gt;
&lt;td&gt;Upload PDFs, Word, Markdown, web pages, Excel&lt;/td&gt;
&lt;td&gt;upload service, crawler, enterprise docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Document parsing&lt;/td&gt;
&lt;td&gt;Convert files into clean text&lt;/td&gt;
&lt;td&gt;pdfplumber, unstructured, docx, pandas&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Text chunking&lt;/td&gt;
&lt;td&gt;Split long documents into chunks&lt;/td&gt;
&lt;td&gt;LangChain, LlamaIndex, custom splitter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Embedding&lt;/td&gt;
&lt;td&gt;Convert text into vectors&lt;/td&gt;
&lt;td&gt;BGE, Jina, Qwen Embedding, OpenAI-compatible services&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector store&lt;/td&gt;
&lt;td&gt;Store and search vectors&lt;/td&gt;
&lt;td&gt;FAISS, Milvus, pgvector, Qdrant, Chroma&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retriever&lt;/td&gt;
&lt;td&gt;Find relevant chunks for a question&lt;/td&gt;
&lt;td&gt;top-k, hybrid search, reranking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Generator&lt;/td&gt;
&lt;td&gt;Use DeepSeek to answer from context&lt;/td&gt;
&lt;td&gt;DeepSeek Chat Completion API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Citation and evaluation&lt;/td&gt;
&lt;td&gt;Return sources, logs, feedback&lt;/td&gt;
&lt;td&gt;metadata, logs, evaluation sets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Upload documents
→ parse documents
→ clean text
→ split into chunks
→ embed chunks
→ write into vector store
→ user asks a question
→ embed the question
→ retrieve relevant chunks
→ build RAG prompt
→ DeepSeek generates answer
→ return answer, citations, and confidence notes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Recommended Tech Stack for Version 1
&lt;/h2&gt;

&lt;p&gt;Do not start with a complicated microservice system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Minimal version
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Python + FastAPI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM&lt;/td&gt;
&lt;td&gt;DeepSeek API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Document format&lt;/td&gt;
&lt;td&gt;Markdown / TXT / PDF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chunking&lt;/td&gt;
&lt;td&gt;custom splitter or LangChain TextSplitter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Embedding&lt;/td&gt;
&lt;td&gt;BGE / Jina / Qwen Embedding / OpenAI-compatible embedding service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector store&lt;/td&gt;
&lt;td&gt;Local FAISS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;Streamlit / React / Next.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Docker + cloud server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Enterprise upgrade
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;FastAPI / Node.js / Java Spring Boot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;Redis Queue / Celery&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Document storage&lt;/td&gt;
&lt;td&gt;MinIO / OSS / S3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector store&lt;/td&gt;
&lt;td&gt;Milvus / pgvector / Qdrant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Permission&lt;/td&gt;
&lt;td&gt;RBAC + department permissions + document permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logs&lt;/td&gt;
&lt;td&gt;PostgreSQL + ClickHouse / Loki&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation&lt;/td&gt;
&lt;td&gt;golden question set + human feedback + hit-rate metrics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Kubernetes / Docker Compose&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Do not start with
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;complex agents;&lt;/li&gt;
&lt;li&gt;multi-step tool calling;&lt;/li&gt;
&lt;li&gt;automatic policy rewriting;&lt;/li&gt;
&lt;li&gt;automatic approval flows;&lt;/li&gt;
&lt;li&gt;legal, financial, medical, or contract Q&amp;amp;A without human review;&lt;/li&gt;
&lt;li&gt;direct write access to production databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Version 1 goal:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;When a user asks a question, the system finds evidence and answers from that evidence.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. Test Tasks and Scoring
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Test tasks
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Task 1&lt;/td&gt;
&lt;td&gt;Upload 20 product docs&lt;/td&gt;
&lt;td&gt;Test parsing and chunking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 2&lt;/td&gt;
&lt;td&gt;Upload FAQ&lt;/td&gt;
&lt;td&gt;Test common Q&amp;amp;A accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 3&lt;/td&gt;
&lt;td&gt;Upload policy docs&lt;/td&gt;
&lt;td&gt;Test clause retrieval and citation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 4&lt;/td&gt;
&lt;td&gt;Ask cross-document questions&lt;/td&gt;
&lt;td&gt;Test multi-chunk synthesis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 5&lt;/td&gt;
&lt;td&gt;Ask unsupported questions&lt;/td&gt;
&lt;td&gt;Test refusal and anti-hallucination&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 6&lt;/td&gt;
&lt;td&gt;Ask procedural questions&lt;/td&gt;
&lt;td&gt;Test structured answers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 7&lt;/td&gt;
&lt;td&gt;Ask mixed Chinese-English terms&lt;/td&gt;
&lt;td&gt;Test terminology handling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task 8&lt;/td&gt;
&lt;td&gt;Concurrent Q&amp;amp;A&lt;/td&gt;
&lt;td&gt;Test latency and cost&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Scoring criteria
&lt;/h3&gt;

&lt;p&gt;Total score: 100.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;What it measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Integration difficulty&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;API and framework integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval accuracy&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Whether the correct chunks are found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answer reliability&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Whether answers are grounded and non-hallucinated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Source citation&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;File name, page, section, chunk source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost control&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Model and retrieval cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response speed&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;User experience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Upgrade path to enterprise system&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Overall score
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Integration difficulty&lt;/td&gt;
&lt;td&gt;90/100&lt;/td&gt;
&lt;td&gt;OpenAI-compatible and easy to adopt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval accuracy&lt;/td&gt;
&lt;td&gt;84/100&lt;/td&gt;
&lt;td&gt;Depends on chunking, embeddings, and reranking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answer reliability&lt;/td&gt;
&lt;td&gt;88/100&lt;/td&gt;
&lt;td&gt;Stable with strict prompts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Source citation&lt;/td&gt;
&lt;td&gt;86/100&lt;/td&gt;
&lt;td&gt;Requires metadata design&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost control&lt;/td&gt;
&lt;td&gt;91/100&lt;/td&gt;
&lt;td&gt;Suitable for medium/high-frequency Q&amp;amp;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response speed&lt;/td&gt;
&lt;td&gt;85/100&lt;/td&gt;
&lt;td&gt;Depends on model, top-k, and context size&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;87/100&lt;/td&gt;
&lt;td&gt;Can upgrade from FAISS to Milvus/pgvector&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Overall score: &lt;strong&gt;87 / 100&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Verdict:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;DeepSeek is a strong generation layer for RAG, but RAG quality is determined by the whole pipeline: documents, chunking, embeddings, retrieval, reranking, prompts, and evaluation.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  6. Project Structure
&lt;/h2&gt;

&lt;p&gt;Suggested structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deepseek-rag-demo/
├── app.py                  # FastAPI main app
├── config.py               # configuration
├── requirements.txt        # dependencies
├── .env                    # API key, never commit
├── data/
│   ├── raw/                # raw documents
│   └── processed/          # parsed text
├── vector_store/
│   └── faiss_index/        # FAISS index
├── rag/
│   ├── loader.py           # document loading
│   ├── splitter.py         # text chunking
│   ├── embeddings.py       # embedding calls
│   ├── retriever.py        # retrieval logic
│   ├── prompt.py           # prompt templates
│   └── generator.py        # DeepSeek generation
└── tests/
    └── eval_questions.json # test questions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. Install Dependencies
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;requirements.txt&lt;/code&gt; example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fastapi==0.115.0
uvicorn==0.30.6
python-dotenv==1.0.1
openai==1.99.0
faiss-cpu==1.8.0
sentence-transformers==3.0.1
pydantic==2.8.2
numpy==1.26.4
pypdf==4.3.1
python-multipart==0.0.9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEEPSEEK_API_KEY=your_deepseek_api_key
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-v4-flash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If model names change, follow DeepSeek’s official model and pricing page.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Call DeepSeek API
&lt;/h2&gt;

&lt;p&gt;Because DeepSeek is OpenAI-compatible, you can call it with the OpenAI SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DEEPSEEK_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.deepseek.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ask_deepseek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deepseek-v4-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RAG recommendations:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Advice&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;temperature&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0–0.3 to reduce hallucination&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;top_p&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;default unless randomness needs reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max_tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;limit by answer length&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;thinking mode&lt;/td&gt;
&lt;td&gt;use for complex reasoning, not every FAQ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;model choice&lt;/td&gt;
&lt;td&gt;cheap model for normal Q&amp;amp;A, strong model for complex questions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  9. Parse Documents
&lt;/h2&gt;

&lt;p&gt;Start with TXT / Markdown / PDF.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pypdf&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PdfReader&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_txt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;read_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_pdf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;PdfReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;pages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extract_text&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;
        &lt;span class="n"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;[PAGE &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;load_pdf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.md&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;load_txt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Unsupported file type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enterprise parsing is harder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scanned PDFs need OCR;&lt;/li&gt;
&lt;li&gt;tables need structure preservation;&lt;/li&gt;
&lt;li&gt;Word files need heading hierarchy;&lt;/li&gt;
&lt;li&gt;Excel needs Sheet/row/column handling;&lt;/li&gt;
&lt;li&gt;web pages need navigation and footer cleanup;&lt;/li&gt;
&lt;li&gt;policy docs need section numbers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  10. Text Chunking Strategy
&lt;/h2&gt;

&lt;p&gt;Chunking is critical.&lt;/p&gt;

&lt;p&gt;If chunks are too large:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;retrieval is less precise;&lt;/li&gt;
&lt;li&gt;context cost is high;&lt;/li&gt;
&lt;li&gt;answers contain irrelevant material.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If chunks are too small:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;semantics are incomplete;&lt;/li&gt;
&lt;li&gt;clause context is lost;&lt;/li&gt;
&lt;li&gt;the model needs too many chunks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Recommended chunk settings
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Document type&lt;/th&gt;
&lt;th&gt;Chunk size&lt;/th&gt;
&lt;th&gt;Overlap&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FAQ&lt;/td&gt;
&lt;td&gt;one Q&amp;amp;A per chunk&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product docs&lt;/td&gt;
&lt;td&gt;500–800 Chinese characters&lt;/td&gt;
&lt;td&gt;80–150&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy clauses&lt;/td&gt;
&lt;td&gt;by chapter/clause&lt;/td&gt;
&lt;td&gt;keep parent title&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Course notes&lt;/td&gt;
&lt;td&gt;800–1200 Chinese characters&lt;/td&gt;
&lt;td&gt;150–200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API docs&lt;/td&gt;
&lt;td&gt;by endpoint/method&lt;/td&gt;
&lt;td&gt;keep parameter docs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Simple splitter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;split_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;overlap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;chunks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;chunk_size&lt;/span&gt;
        &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;overlap&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;chunks&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;split by heading hierarchy
→ then by paragraphs
→ then by length fallback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store metadata for every chunk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"support_policy.pdf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"section"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2.3 Return rules"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"chunk_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"policy_003_002"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  11. Embeddings and Vector Store
&lt;/h2&gt;

&lt;p&gt;Embedding converts text into vectors. A vector store finds similar vectors.&lt;/p&gt;

&lt;p&gt;LlamaIndex explains that RAG converts data and queries into embeddings, then a vector store finds data numerically similar to the query embedding. FAISS documentation describes Faiss as a library for efficient similarity search and clustering of dense vectors.&lt;/p&gt;

&lt;p&gt;For version 1, use a local embedding model + FAISS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sentence_transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SentenceTransformer&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;faiss&lt;/span&gt;

&lt;span class="n"&gt;embed_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SentenceTransformer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;BAAI/bge-small-zh-v1.5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;embed_texts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;vectors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;embed_model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;normalize_embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vectors&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;float32&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_faiss_index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;vectors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;embed_texts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;dim&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vectors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;faiss&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IndexFlatIP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vectors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vectors&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;q_vec&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;embed_texts&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="n"&gt;scores&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q_vec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scores&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]):&lt;/span&gt;
        &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Vector store choices
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Recommended&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local demo&lt;/td&gt;
&lt;td&gt;FAISS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single-machine product&lt;/td&gt;
&lt;td&gt;Chroma / Qdrant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise system&lt;/td&gt;
&lt;td&gt;Milvus / pgvector / Qdrant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Strong relational permissions&lt;/td&gt;
&lt;td&gt;PostgreSQL + pgvector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large-scale retrieval&lt;/td&gt;
&lt;td&gt;Milvus / Qdrant&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  12. Build the RAG Prompt
&lt;/h2&gt;

&lt;p&gt;The prompt must constrain the model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;answer only from context;&lt;/li&gt;
&lt;li&gt;say unknown when unsupported;&lt;/li&gt;
&lt;li&gt;cite sources;&lt;/li&gt;
&lt;li&gt;do not invent policies, prices, contracts, or workflows;&lt;/li&gt;
&lt;li&gt;separate evidence from inference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;RAG_SYSTEM_PROMPT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are an enterprise knowledge-base Q&amp;amp;A assistant.
You must answer strictly based on the provided [Reference Materials].

Rules:
1. If the answer is not in the reference materials, say: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The current knowledge base does not contain a clear answer.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;
2. Do not invent policies, prices, workflows, contract terms, contacts, or commitments.
3. Give the conclusion first, then the evidence.
4. If sources conflict, point out the conflict instead of deciding by yourself.
5. Cite each key conclusion with source markers such as [Source 1].
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_rag_messages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;retrieved_docs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;context_parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retrieved_docs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;meta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;context_parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[Source &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;] File: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;source&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, Page: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;page&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, Section: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;section&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context_parts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;user_prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
[Reference Materials]
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

[User Question]
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

Please answer based on the reference materials.
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;RAG_SYSTEM_PROMPT&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  13. Full Q&amp;amp;A Chain
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rag_answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;retrieved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;build_rag_messages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;retrieved&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ask_deepseek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;sources&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;retrieved&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;answer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sources&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;retrieved&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;retrieved&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"answer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"According to the knowledge base, the standard support response time is within 24 hours. [Source 1] Hardware repair requires an SN code and fault photos first. [Source 2]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"support_policy.pdf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"section"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2.1 Response time"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hardware_repair.md"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"section"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Required materials"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  14. FastAPI Endpoint Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pydantic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseModel&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DeepSeek RAG Knowledge Base&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AskRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;

&lt;span class="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/ask&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;AskRequest&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;rag_answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;GLOBAL_INDEX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;GLOBAL_CHUNKS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;metadatas&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;GLOBAL_METADATAS&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvicorn app:app &lt;span class="nt"&gt;--host&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--port&lt;/span&gt; 8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:8000/ask &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"question":"What is the support response time?"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  15. Frontend Suggestions
&lt;/h2&gt;

&lt;p&gt;Version 1 needs four areas:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Left document panel&lt;/td&gt;
&lt;td&gt;upload, delete, update documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Center chat window&lt;/td&gt;
&lt;td&gt;user question and AI answer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right citation panel&lt;/td&gt;
&lt;td&gt;matched documents, pages, chunks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bottom feedback bar&lt;/td&gt;
&lt;td&gt;useful / not useful / wrong answer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Enterprise version also needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;login;&lt;/li&gt;
&lt;li&gt;department permissions;&lt;/li&gt;
&lt;li&gt;document permissions;&lt;/li&gt;
&lt;li&gt;Q&amp;amp;A logs;&lt;/li&gt;
&lt;li&gt;sensitive-word filtering;&lt;/li&gt;
&lt;li&gt;human handoff;&lt;/li&gt;
&lt;li&gt;question review;&lt;/li&gt;
&lt;li&gt;knowledge update reminders.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  16. How to Reduce Hallucination
&lt;/h2&gt;

&lt;p&gt;The main issue is not whether the system can answer. It is whether it refuses when it should.&lt;/p&gt;

&lt;h3&gt;
  
  
  16.1 Prompt constraint
&lt;/h3&gt;

&lt;p&gt;Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If the answer is not in the materials, say: "The current knowledge base does not contain a clear answer."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  16.2 Retrieval score threshold
&lt;/h3&gt;

&lt;p&gt;If the best similarity score is too low, do not force an answer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;retrieved&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.35&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;answer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The current knowledge base does not contain a clear answer. Please contact human support.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sources&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  16.3 Require citations
&lt;/h3&gt;

&lt;p&gt;Every key conclusion must cite a source.&lt;/p&gt;

&lt;h3&gt;
  
  
  16.4 Use low temperature
&lt;/h3&gt;

&lt;p&gt;RAG Q&amp;amp;A usually does not need creativity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  16.5 Block high-risk overreach
&lt;/h3&gt;

&lt;p&gt;For contracts, prices, legal, financial, HR, and medical questions, add human fallback.&lt;/p&gt;




&lt;h2&gt;
  
  
  17. How to Improve Retrieval Accuracy
&lt;/h2&gt;

&lt;h3&gt;
  
  
  17.1 Optimize chunking
&lt;/h3&gt;

&lt;p&gt;Split semantically, not just by character count.&lt;/p&gt;

&lt;h3&gt;
  
  
  17.2 Keep heading hierarchy
&lt;/h3&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product Manual &amp;gt; Account Management &amp;gt; Password Reset &amp;gt; Forgot Password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  17.3 Add metadata
&lt;/h3&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;file name;&lt;/li&gt;
&lt;li&gt;page;&lt;/li&gt;
&lt;li&gt;section;&lt;/li&gt;
&lt;li&gt;document type;&lt;/li&gt;
&lt;li&gt;effective date;&lt;/li&gt;
&lt;li&gt;department;&lt;/li&gt;
&lt;li&gt;permission level.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  17.4 Use hybrid retrieval
&lt;/h3&gt;

&lt;p&gt;Vector search handles semantic similarity. Keyword search handles exact terms.&lt;/p&gt;

&lt;p&gt;Enterprise recommendation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vector search + BM25 keyword search + reranking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  17.5 Build an evaluation set
&lt;/h3&gt;

&lt;p&gt;Prepare 100–300 real questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;question&lt;/td&gt;
&lt;td&gt;How many days do customers have to request a return?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;expected_source&lt;/td&gt;
&lt;td&gt;support_policy.pdf page 3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;expected_answer&lt;/td&gt;
&lt;td&gt;within 7 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;category&lt;/td&gt;
&lt;td&gt;support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Run evaluation after every major update.&lt;/p&gt;




&lt;h2&gt;
  
  
  18. Cost Optimization
&lt;/h2&gt;

&lt;h3&gt;
  
  
  18.1 Embed documents only once
&lt;/h3&gt;

&lt;p&gt;If documents do not change, do not re-embed them.&lt;/p&gt;

&lt;h3&gt;
  
  
  18.2 Cache frequent questions
&lt;/h3&gt;

&lt;p&gt;Many FAQ questions repeat.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user question → normalize → check cache → run RAG only if cache misses
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  18.3 Control top-k
&lt;/h3&gt;

&lt;p&gt;More retrieved chunks are not always better.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Suggested top-k&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FAQ&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product docs&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy Q&amp;amp;A&lt;/td&gt;
&lt;td&gt;5–8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-document synthesis&lt;/td&gt;
&lt;td&gt;8–12&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  18.4 Model routing
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question type&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Simple FAQ&lt;/td&gt;
&lt;td&gt;fast low-cost model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complex policy interpretation&lt;/td&gt;
&lt;td&gt;stronger model / thinking mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;unsupported question&lt;/td&gt;
&lt;td&gt;rules + retrieval threshold&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;summary&lt;/td&gt;
&lt;td&gt;mid-tier model&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  18.5 Limit context length
&lt;/h3&gt;

&lt;p&gt;Only provide truly relevant chunks to the model.&lt;/p&gt;




&lt;h2&gt;
  
  
  19. Enterprise Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  19.1 Permissions
&lt;/h3&gt;

&lt;p&gt;Different departments may access different documents.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;presales sees product materials;&lt;/li&gt;
&lt;li&gt;support sees troubleshooting docs;&lt;/li&gt;
&lt;li&gt;finance sees pricing policy;&lt;/li&gt;
&lt;li&gt;normal employees cannot see contract templates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Filter by permissions before retrieval.&lt;/p&gt;

&lt;h3&gt;
  
  
  19.2 Document versions
&lt;/h3&gt;

&lt;p&gt;Old documents can pollute answers.&lt;/p&gt;

&lt;p&gt;Add metadata:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026.07"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"effective_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-07-01"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"active"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  19.3 Logs and audit
&lt;/h3&gt;

&lt;p&gt;Log:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;user question;&lt;/li&gt;
&lt;li&gt;retrieved documents;&lt;/li&gt;
&lt;li&gt;model answer;&lt;/li&gt;
&lt;li&gt;model used;&lt;/li&gt;
&lt;li&gt;token cost;&lt;/li&gt;
&lt;li&gt;user feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  19.4 Human fallback
&lt;/h3&gt;

&lt;p&gt;For low-confidence questions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The current knowledge base does not contain a clear answer. Please contact human support.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  19.5 Sensitive information
&lt;/h3&gt;

&lt;p&gt;Do not send these directly to external APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ID numbers;&lt;/li&gt;
&lt;li&gt;phone numbers;&lt;/li&gt;
&lt;li&gt;full contracts;&lt;/li&gt;
&lt;li&gt;customer privacy data;&lt;/li&gt;
&lt;li&gt;internal credentials;&lt;/li&gt;
&lt;li&gt;raw sensitive data.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  20. Upgrade Path from Demo to Production
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Stage 1: Local demo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TXT / PDF → FAISS → DeepSeek → simple Q&amp;amp;A page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Goal: validate the RAG loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 2: Department knowledge base
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document management → permissions → vector store → citations → feedback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Goal: let one department use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3: Enterprise knowledge base
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;multi-department permissions → document versions → hybrid retrieval → evaluation set → audit logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Goal: stable internal Q&amp;amp;A.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 4: Business agent
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RAG Q&amp;amp;A → tool calling → ticket system → CRM → ERP → human fallback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Goal: move from answering questions to handling business tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  21. Common Mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Mistake 1: Calling DeepSeek without retrieval
&lt;/h3&gt;

&lt;p&gt;That is a chatbot, not RAG.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 2: Putting full documents into the prompt
&lt;/h3&gt;

&lt;p&gt;It is expensive, slow, and hard to cite.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 3: Random chunking
&lt;/h3&gt;

&lt;p&gt;Chunking determines much of RAG quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 4: No citations
&lt;/h3&gt;

&lt;p&gt;Enterprise users need evidence, not just answers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 5: No refusal mechanism
&lt;/h3&gt;

&lt;p&gt;The system should say unknown when it does not know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 6: No evaluation set
&lt;/h3&gt;

&lt;p&gt;Without evaluation, you cannot tell whether updates improve or break the system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 7: Ignoring permissions
&lt;/h3&gt;

&lt;p&gt;Unauthorized answers create major risk.&lt;/p&gt;




&lt;h2&gt;
  
  
  22. Final Verdict
&lt;/h2&gt;

&lt;p&gt;Building a RAG knowledge-base Q&amp;amp;A system with DeepSeek is not just calling a model API. The real system is a reliable pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;documents → chunks → embeddings → retrieval → generation → citations → feedback → evaluation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DeepSeek is suitable as the generation layer, especially for cost-sensitive Chinese Q&amp;amp;A, long-document Q&amp;amp;A, and enterprise knowledge-base scenarios.&lt;/p&gt;

&lt;p&gt;But final quality depends on the whole engineering pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clean documents;&lt;/li&gt;
&lt;li&gt;reasonable chunking;&lt;/li&gt;
&lt;li&gt;matching embeddings;&lt;/li&gt;
&lt;li&gt;accurate retrieval;&lt;/li&gt;
&lt;li&gt;strict prompt constraints;&lt;/li&gt;
&lt;li&gt;clear citations;&lt;/li&gt;
&lt;li&gt;evaluation and feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Final recommendation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Do not start with a complex agent. First build a minimal RAG system with DeepSeek + FAISS + FastAPI that answers accurately from documents, returns citations, and refuses unsupported questions. Then upgrade to Milvus/pgvector, hybrid retrieval, permissions, logs, evaluation, and business-system integration.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  23. SEO Information
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO title:&lt;/strong&gt; How to Build Your Own RAG Knowledge Base Q&amp;amp;A System with DeepSeek&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SEO description:&lt;/strong&gt; This guide explains how to build a DeepSeek-based RAG knowledge-base Q&amp;amp;A system, covering RAG architecture, document parsing, chunking, embeddings, FAISS vector search, DeepSeek API calls, prompt templates, FastAPI, hallucination control, cost optimization, permissions, and enterprise deployment.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Keywords:&lt;/strong&gt; DeepSeek, DeepSeek API, RAG, knowledge base Q&amp;amp;A, vector database, FAISS, Embedding, FastAPI, LangChain, LlamaIndex, enterprise knowledge base, AI Q&amp;amp;A system, retrieval augmented generation&lt;/p&gt;




&lt;h2&gt;
  
  
  24. Data Sources and References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;DeepSeek API Docs: DeepSeek API is compatible with OpenAI / Anthropic API formats and can be used through SDK configuration changes.&lt;br&gt;&lt;br&gt;
&lt;a href="https://api-docs.deepseek.com/" rel="noopener noreferrer"&gt;https://api-docs.deepseek.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DeepSeek Models &amp;amp; Pricing: DeepSeek API Base URL, models, pricing, and Thinking / Non-Thinking mode information.&lt;br&gt;&lt;br&gt;
&lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;https://api-docs.deepseek.com/quick_start/pricing&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DeepSeek Create Chat Completion: Chat Completion API, thinking, reasoning_effort, max_tokens, and related parameters.&lt;br&gt;&lt;br&gt;
&lt;a href="https://api-docs.deepseek.com/api/create-chat-completion" rel="noopener noreferrer"&gt;https://api-docs.deepseek.com/api/create-chat-completion&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DeepSeek V4 Preview Release: DeepSeek-V4-Pro / V4-Flash, 1M context length, and Thinking / Non-Thinking modes.&lt;br&gt;&lt;br&gt;
&lt;a href="https://api-docs.deepseek.com/news/news260424" rel="noopener noreferrer"&gt;https://api-docs.deepseek.com/news/news260424&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LlamaIndex RAG Introduction: embeddings, vector stores, and retrieval basics in RAG.&lt;br&gt;&lt;br&gt;
&lt;a href="https://developers.llamaindex.ai/python/framework/understanding/rag/" rel="noopener noreferrer"&gt;https://developers.llamaindex.ai/python/framework/understanding/rag/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LlamaIndex Vector Stores: vector stores contain embeddings of ingested document chunks and can be persisted.&lt;br&gt;&lt;br&gt;
&lt;a href="https://developers.llamaindex.ai/python/framework/module_guides/storing/vector_stores/" rel="noopener noreferrer"&gt;https://developers.llamaindex.ai/python/framework/module_guides/storing/vector_stores/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;FAISS documentation: Faiss is a library for efficient similarity search and clustering of dense vectors.&lt;br&gt;&lt;br&gt;
&lt;a href="https://faiss.ai/index.html" rel="noopener noreferrer"&gt;https://faiss.ai/index.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LangChain GitHub: LangChain is a framework for building agents and LLM-powered applications.&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/langchain-ai/langchain" rel="noopener noreferrer"&gt;https://github.com/langchain-ai/langchain&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Publish-ready Summary
&lt;/h2&gt;

&lt;p&gt;This guide explains how to build a DeepSeek-based RAG knowledge-base Q&amp;amp;A system. It starts with the principle of RAG and explains why enterprise document questions should not be answered by the model alone. The article walks through document parsing, text chunking, embeddings, vector search, RAG prompt construction, DeepSeek API calls, FastAPI endpoints, citations, hallucination control, retrieval optimization, cost reduction, permissions, logging, and the upgrade path from local demo to enterprise deployment. The final recommendation is to first build a minimal RAG system with DeepSeek + FAISS + FastAPI, then upgrade to hybrid retrieval, reranking, permissions, evaluation, and business-system integration.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260712-2366" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Use ElevenLabs to Create Professional AI Voiceovers for Your Videos</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Fri, 10 Jul 2026 04:11:56 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-use-elevenlabs-to-create-professional-ai-voiceovers-for-your-videos-5537</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-use-elevenlabs-to-create-professional-ai-voiceovers-for-your-videos-5537</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Category: AI Tool Tutorial / AI Voiceover&lt;br&gt;&lt;br&gt;
Target readers: short-video creators, knowledge creators, course creators, product managers, global content teams, ad editors, and social media operators&lt;br&gt;&lt;br&gt;
Test date: July 10, 2026&lt;br&gt;&lt;br&gt;
Bottom line: &lt;strong&gt;ElevenLabs can turn a normal video script into a professional-sounding AI voiceover, but great AI narration is not just “paste text and generate.” The right workflow is script rewriting, voice selection, pacing control, segmented generation, human review, mixing, subtitle syncing, and compliance checking.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. What Videos Is ElevenLabs Good For?
&lt;/h2&gt;

&lt;p&gt;ElevenLabs is strongest at natural, stable, commercial-quality AI speech. Its official documentation describes Text to Speech, Voice Cloning, Dubbing, Voiceover Studio, APIs, SDKs, and conversational voice agents, making it a broader AI voice infrastructure platform.&lt;/p&gt;

&lt;p&gt;It works especially well for:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Video type&lt;/th&gt;
&lt;th&gt;Fit&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Educational short videos&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Clear, stable narration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product explainers&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Commercial and brand-friendly voiceover&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Software tutorials&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Step-by-step instruction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Course videos&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Scalable chapter narration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YouTube / TikTok / Xiaohongshu videos&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Batch multilingual content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ad demos&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Quickly test different voices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audiobooks / long articles&lt;/td&gt;
&lt;td&gt;Medium-high&lt;/td&gt;
&lt;td&gt;Better for nonfiction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Film-style acting&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Humans are still better for complex performance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Celebrity-like voice replication&lt;/td&gt;
&lt;td&gt;Not recommended&lt;/td&gt;
&lt;td&gt;Requires authorization; do not impersonate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In one sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;ElevenLabs is best for professional narration and content production, not impersonation or unauthorized voice copying.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Full Workflow Overview
&lt;/h2&gt;

&lt;p&gt;Use this eight-step workflow for professional AI voiceovers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. Define video type&lt;/td&gt;
&lt;td&gt;Decide voice style&lt;/td&gt;
&lt;td&gt;ChatGPT / notes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. Rewrite script&lt;/td&gt;
&lt;td&gt;Make text speakable&lt;/td&gt;
&lt;td&gt;ChatGPT / manual editing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. Choose voice&lt;/td&gt;
&lt;td&gt;Match brand and audience&lt;/td&gt;
&lt;td&gt;ElevenLabs Voice Library&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. Generate in segments&lt;/td&gt;
&lt;td&gt;Control rhythm and reduce errors&lt;/td&gt;
&lt;td&gt;ElevenLabs TTS / Voiceover Studio&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5. Human review&lt;/td&gt;
&lt;td&gt;Check tone, pronunciation, pauses&lt;/td&gt;
&lt;td&gt;Ears + script&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6. Mix audio&lt;/td&gt;
&lt;td&gt;BGM, volume, noise, loudness&lt;/td&gt;
&lt;td&gt;CapCut / Premiere / Audition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7. Sync subtitles&lt;/td&gt;
&lt;td&gt;Improve watch-through and clarity&lt;/td&gt;
&lt;td&gt;CapCut / Premiere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8. Compliance check&lt;/td&gt;
&lt;td&gt;Avoid cloning and commercial risks&lt;/td&gt;
&lt;td&gt;Consent / terms / labeling&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Step 1: Define the Voice Style
&lt;/h2&gt;

&lt;p&gt;Do not open ElevenLabs first. Answer five questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Who is watching the video?&lt;/li&gt;
&lt;li&gt;Is the tone serious, casual, commercial, educational, or emotional?&lt;/li&gt;
&lt;li&gt;Should the voice sound male, female, or neutral?&lt;/li&gt;
&lt;li&gt;Should the pace be fast or slow?&lt;/li&gt;
&lt;li&gt;Is the video in Chinese, English, or mixed language?&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Style guide
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Video type&lt;/th&gt;
&lt;th&gt;Voice recommendation&lt;/th&gt;
&lt;th&gt;Tone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Educational video&lt;/td&gt;
&lt;td&gt;Clear neutral voice&lt;/td&gt;
&lt;td&gt;Stable, credible, light&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product ad&lt;/td&gt;
&lt;td&gt;Mature commercial voice&lt;/td&gt;
&lt;td&gt;Confident and concise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Software tutorial&lt;/td&gt;
&lt;td&gt;Warm explanatory voice&lt;/td&gt;
&lt;td&gt;Slower and clear&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business analysis&lt;/td&gt;
&lt;td&gt;Deeper steady voice&lt;/td&gt;
&lt;td&gt;Professional and restrained&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lifestyle video&lt;/td&gt;
&lt;td&gt;Friendly natural voice&lt;/td&gt;
&lt;td&gt;Relaxed and conversational&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;English global content&lt;/td&gt;
&lt;td&gt;Natural US/UK voice&lt;/td&gt;
&lt;td&gt;Clear and international&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Course video&lt;/td&gt;
&lt;td&gt;Durable voice&lt;/td&gt;
&lt;td&gt;Stable and not exaggerated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Voice brief template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Video type: AI tool tutorial
Audience: ordinary professionals
Voice style: clear, professional, slightly upbeat, not too announcer-like
Pace: medium-fast
Language: mainly Chinese, keeping terms like ChatGPT, Midjourney, and API
Goal: help viewers understand the tool in three minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Step 2: Rewrite Written Copy into Spoken Script
&lt;/h2&gt;

&lt;p&gt;Even the best voice model will sound fake if the input is written like a report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bad example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This tool improves user experience by integrating multimodal capabilities and intelligent workflows to reduce manual operation costs.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Better spoken version
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The biggest value of this tool is simple:
it helps you avoid repetitive work.

For example, writing scripts, making covers, and organizing materials
used to take one or two hours.

Now, with AI, you can get a first draft in minutes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Spoken-script rules
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rule&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Use short sentences&lt;/td&gt;
&lt;td&gt;Easier to sound natural&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add pauses&lt;/td&gt;
&lt;td&gt;Commas, periods, and line breaks guide rhythm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avoid jargon&lt;/td&gt;
&lt;td&gt;Words like “empower” and “closed loop” sound artificial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use examples&lt;/td&gt;
&lt;td&gt;Real examples make narration human&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Start with the point&lt;/td&gt;
&lt;td&gt;Short-video viewers have little patience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read it aloud&lt;/td&gt;
&lt;td&gt;If you cannot read it smoothly, AI will not either&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Prompt: rewrite copy for narration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rewrite the following copy into a video voiceover script for ElevenLabs.

Requirements:
1. Conversational but not too casual;
2. Short sentences;
3. Use line breaks for pauses;
4. Keep key terms;
5. Fit a 60-second short video;
6. Avoid exaggerated marketing tone;
7. Output the final narration script.

Original copy:
[paste copy]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Step 3: Choose the Right Voice
&lt;/h2&gt;

&lt;p&gt;ElevenLabs provides a large Voice Library. Its documentation says users can choose voices, design voices, or clone voices, with 10,000+ voices available.&lt;/p&gt;

&lt;p&gt;Do not choose a voice only because it sounds nice. Choose it because it fits the video.&lt;/p&gt;

&lt;h3&gt;
  
  
  Voice selection checklist
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gender and age impression&lt;/td&gt;
&lt;td&gt;Does it fit the audience?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pace&lt;/td&gt;
&lt;td&gt;Does it fit the video speed?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Timbre&lt;/td&gt;
&lt;td&gt;Warm, bright, deep, mature, or energetic?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Credibility&lt;/td&gt;
&lt;td&gt;Does it sound like a real expert or brand narrator?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emotion&lt;/td&gt;
&lt;td&gt;Too flat or too dramatic?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language fit&lt;/td&gt;
&lt;td&gt;Does it handle Chinese, English, or mixed terms?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Listening endurance&lt;/td&gt;
&lt;td&gt;Can people listen for five minutes without fatigue?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Recommendations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Voice type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI tool tutorial&lt;/td&gt;
&lt;td&gt;Clear, young, professional neutral voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product promo&lt;/td&gt;
&lt;td&gt;Mature commercial brand voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Course narration&lt;/td&gt;
&lt;td&gt;Stable, warm, easy-to-listen voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short-video narration&lt;/td&gt;
&lt;td&gt;Light, energetic, slightly emotional voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Corporate video&lt;/td&gt;
&lt;td&gt;Calm, credible, formal voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;English ad&lt;/td&gt;
&lt;td&gt;Natural US/UK commercial voice&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Avoid
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;overly theatrical voices;&lt;/li&gt;
&lt;li&gt;robotic assistant voices;&lt;/li&gt;
&lt;li&gt;cloning other people without permission;&lt;/li&gt;
&lt;li&gt;celebrity-like voices for commercial content;&lt;/li&gt;
&lt;li&gt;sacrificing clarity for uniqueness.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Step 4: Generate Voiceover in ElevenLabs
&lt;/h2&gt;

&lt;p&gt;ElevenLabs Text to Speech converts text into lifelike audio with intonation, pacing, and emotional awareness. For video creators, there are two common approaches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method A: Text to Speech
&lt;/h3&gt;

&lt;p&gt;Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;short videos;&lt;/li&gt;
&lt;li&gt;product explainers;&lt;/li&gt;
&lt;li&gt;1–3 minute videos;&lt;/li&gt;
&lt;li&gt;single-speaker narration;&lt;/li&gt;
&lt;li&gt;fast audio generation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose voice;&lt;/li&gt;
&lt;li&gt;Paste spoken script;&lt;/li&gt;
&lt;li&gt;Adjust model and settings;&lt;/li&gt;
&lt;li&gt;Generate audio;&lt;/li&gt;
&lt;li&gt;Download MP3 or WAV;&lt;/li&gt;
&lt;li&gt;Import into editing software.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Method B: Voiceover Studio
&lt;/h3&gt;

&lt;p&gt;ElevenLabs Voiceover Studio documentation shows users can create voiceover projects from the Audio Tools section of the Dashboard. It is better for more complex voiceover projects.&lt;/p&gt;

&lt;p&gt;Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multi-segment narration;&lt;/li&gt;
&lt;li&gt;longer videos;&lt;/li&gt;
&lt;li&gt;courses;&lt;/li&gt;
&lt;li&gt;multi-speaker content;&lt;/li&gt;
&lt;li&gt;ad storyboard voiceover;&lt;/li&gt;
&lt;li&gt;projects that need later edits.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Step 5: Generate in Segments
&lt;/h2&gt;

&lt;p&gt;A common beginner mistake is pasting a five-minute script and generating it all at once.&lt;/p&gt;

&lt;p&gt;Problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;mistakes are hard to fix;&lt;/li&gt;
&lt;li&gt;tone becomes flat;&lt;/li&gt;
&lt;li&gt;pauses are harder to control;&lt;/li&gt;
&lt;li&gt;one bad section may require full regeneration;&lt;/li&gt;
&lt;li&gt;editing becomes messy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Segmentation guide
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Video length&lt;/th&gt;
&lt;th&gt;Recommended segmentation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;30 seconds&lt;/td&gt;
&lt;td&gt;1–2 segments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;60 seconds&lt;/td&gt;
&lt;td&gt;3–5 segments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3 minutes&lt;/td&gt;
&lt;td&gt;8–12 segments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10-minute course&lt;/td&gt;
&lt;td&gt;Generate by lesson sections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30-minute long content&lt;/td&gt;
&lt;td&gt;Generate by chapter and subsection&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Example structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Segment 1: opening hook
Segment 2: pain point
Segment 3: tool introduction
Segment 4: demo steps
Segment 5: summary and call to action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes editing much easier.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Step 6: Control Tone, Pauses, and Emphasis
&lt;/h2&gt;

&lt;p&gt;Script formatting strongly affects ElevenLabs output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use line breaks for pauses
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Today, we are not going to explain complicated theory.

We will focus on one thing:

how ordinary people can create professional AI voiceovers.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use short sentences
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write the script first.
Choose the voice.
Then mix audio and add subtitles.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use punctuation
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Punctuation&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Comma&lt;/td&gt;
&lt;td&gt;light pause&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Period&lt;/td&gt;
&lt;td&gt;stronger pause&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Colon&lt;/td&gt;
&lt;td&gt;emphasis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dash&lt;/td&gt;
&lt;td&gt;delayed turn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Line break&lt;/td&gt;
&lt;td&gt;structural pause&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Add delivery notes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tone: natural, professional, slightly excited, but not exaggerated.
Pace: medium.
Emotion: like a knowledgeable friend explaining a useful tool.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Avoid too many exclamation marks
&lt;/h3&gt;

&lt;p&gt;Too many exclamation marks can make the voice sound fake.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Step 7: Always Review the Audio
&lt;/h2&gt;

&lt;p&gt;Do not publish AI voiceover immediately after generation.&lt;/p&gt;

&lt;p&gt;Check these eight items:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;What to look for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pronunciation&lt;/td&gt;
&lt;td&gt;Technical terms and mixed languages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pauses&lt;/td&gt;
&lt;td&gt;Strange mid-sentence breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emotion&lt;/td&gt;
&lt;td&gt;Too excited, too flat, or too ad-like&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pace&lt;/td&gt;
&lt;td&gt;Does it match the visuals?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Volume&lt;/td&gt;
&lt;td&gt;Are segments consistent?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI feel&lt;/td&gt;
&lt;td&gt;Too smooth or lacking human breath&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subtitle match&lt;/td&gt;
&lt;td&gt;Does the text match the audio?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compliance&lt;/td&gt;
&lt;td&gt;Is it impersonating or misleading?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Review tips
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Listen with headphones;&lt;/li&gt;
&lt;li&gt;Listen again through phone speakers;&lt;/li&gt;
&lt;li&gt;Listen with visuals in the editing timeline;&lt;/li&gt;
&lt;li&gt;Regenerate only unnatural segments;&lt;/li&gt;
&lt;li&gt;Do not keep obvious errors just to save credits.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  10. Step 8: Mix in Your Editing Software
&lt;/h2&gt;

&lt;p&gt;Professional narration is not just the voice. It also depends on mixing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recommended tools
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CapCut / Jianying&lt;/td&gt;
&lt;td&gt;Short-video creators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Premiere Pro&lt;/td&gt;
&lt;td&gt;Professional editing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DaVinci Resolve&lt;/td&gt;
&lt;td&gt;Video editing and color&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audition&lt;/td&gt;
&lt;td&gt;Audio refinement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Final Cut Pro&lt;/td&gt;
&lt;td&gt;Mac creators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Canva&lt;/td&gt;
&lt;td&gt;Lightweight social videos&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Basic mixing settings
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Voice volume&lt;/td&gt;
&lt;td&gt;Clear, no clipping&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BGM volume&lt;/td&gt;
&lt;td&gt;Much lower than voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First second&lt;/td&gt;
&lt;td&gt;Add slight fade-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ending&lt;/td&gt;
&lt;td&gt;Add fade-out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Noise reduction&lt;/td&gt;
&lt;td&gt;Usually light only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Loudness&lt;/td&gt;
&lt;td&gt;Keep segments consistent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQ&lt;/td&gt;
&lt;td&gt;Slightly improve speech clarity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Simple rule
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Voice comes first. Music only supports the mood.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If viewers cannot hear the narration clearly, the mix fails.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Step 9: Sync Subtitles
&lt;/h2&gt;

&lt;p&gt;Subtitles are almost mandatory for short videos.&lt;/p&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;higher completion rate;&lt;/li&gt;
&lt;li&gt;watchable without sound;&lt;/li&gt;
&lt;li&gt;stronger key-message delivery;&lt;/li&gt;
&lt;li&gt;easier understanding;&lt;/li&gt;
&lt;li&gt;better multi-platform distribution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Subtitle workflow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Generate the voiceover first;&lt;/li&gt;
&lt;li&gt;Import into CapCut or Premiere;&lt;/li&gt;
&lt;li&gt;Auto-generate subtitles;&lt;/li&gt;
&lt;li&gt;Manually correct errors;&lt;/li&gt;
&lt;li&gt;Adjust line breaks;&lt;/li&gt;
&lt;li&gt;Highlight keywords;&lt;/li&gt;
&lt;li&gt;Export with subtitles.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Subtitle tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep lines short;&lt;/li&gt;
&lt;li&gt;Use 1–2 lines per screen;&lt;/li&gt;
&lt;li&gt;Highlight keywords;&lt;/li&gt;
&lt;li&gt;Fix technical terms manually;&lt;/li&gt;
&lt;li&gt;Standardize mixed Chinese-English terms;&lt;/li&gt;
&lt;li&gt;Do not cover the main subject.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  12. Step 10: Be Careful with Voice Cloning
&lt;/h2&gt;

&lt;p&gt;ElevenLabs voice cloning is powerful, but it is also high-risk.&lt;/p&gt;

&lt;p&gt;ElevenLabs safety documentation says the platform blocks cloning of celebrity and high-risk voices and requires technical verification for Professional Voice Cloning. Pricing shows Instant Voice Cloning starts from Starter, while Professional Voice Cloning starts from Creator.&lt;/p&gt;

&lt;h3&gt;
  
  
  Acceptable uses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;cloning your own voice;&lt;/li&gt;
&lt;li&gt;cloning a fully authorized brand narrator;&lt;/li&gt;
&lt;li&gt;updating course content with your own voice;&lt;/li&gt;
&lt;li&gt;keeping the same voice across multilingual videos;&lt;/li&gt;
&lt;li&gt;podcast repair lines.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Do not use it for
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;cloning friends, bosses, or clients;&lt;/li&gt;
&lt;li&gt;cloning celebrities;&lt;/li&gt;
&lt;li&gt;impersonation;&lt;/li&gt;
&lt;li&gt;scams, deception, or controversy;&lt;/li&gt;
&lt;li&gt;unauthorized commercial ads;&lt;/li&gt;
&lt;li&gt;making viewers believe a real person said something they did not say.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Labeling suggestion
&lt;/h3&gt;

&lt;p&gt;For commercial or sensitive content, consider adding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This video uses AI-generated voiceover and has been manually reviewed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  13. Pricing Recommendations
&lt;/h2&gt;

&lt;p&gt;According to ElevenLabs pricing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;Testing TTS, STT, voice design, and Studio projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Starter&lt;/td&gt;
&lt;td&gt;$6&lt;/td&gt;
&lt;td&gt;Individual creators; commercial license and Instant Voice Cloning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creator&lt;/td&gt;
&lt;td&gt;$22, first month $11&lt;/td&gt;
&lt;td&gt;Higher-volume creators and Professional Voice Cloning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro&lt;/td&gt;
&lt;td&gt;$99&lt;/td&gt;
&lt;td&gt;Professional content teams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scale&lt;/td&gt;
&lt;td&gt;$299&lt;/td&gt;
&lt;td&gt;Batch production and team collaboration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business&lt;/td&gt;
&lt;td&gt;$990&lt;/td&gt;
&lt;td&gt;Enterprise content teams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;td&gt;Custom&lt;/td&gt;
&lt;td&gt;SSO, SLA, and compliance requirements&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;API pricing lists TTS Multilingual v2/v3 at $0.10 per 1,000 characters and Flash/Turbo at $0.05 per 1,000 characters. For ordinary video voiceover creators, start with the web app before using the API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plan guide
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage&lt;/th&gt;
&lt;th&gt;Recommended plan&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Occasional testing&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A few short videos per week&lt;/td&gt;
&lt;td&gt;Starter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frequent videos, courses, audio content&lt;/td&gt;
&lt;td&gt;Creator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team production&lt;/td&gt;
&lt;td&gt;Pro / Scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI voice product&lt;/td&gt;
&lt;td&gt;API / Enterprise&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  14. Practical Example: 60-Second AI Tool Video Voiceover
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Topic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Introduce how to use AI tools to quickly draft a public-account article.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Spoken script
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If every article starts from a blank document,
you are moving too slowly.

A better workflow is simple:

first, let AI build the structure.
Then, let it create the first draft.
Finally, you revise the opinions and examples.

This is not about letting AI replace your writing.

It is about letting AI handle the most time-consuming first step.

For example, you can enter a title:
“How to use AI for content operations?”

Then ask AI for an outline, examples, SEO keywords, and an opening paragraph.

After that, you add your own experience
and make the article more real.

In this way, an article can go from idea to first draft
in just a few minutes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ElevenLabs settings
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Voice&lt;/td&gt;
&lt;td&gt;Clear, professional, young Chinese voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pace&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emotion&lt;/td&gt;
&lt;td&gt;Slightly positive, not salesy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Segments&lt;/td&gt;
&lt;td&gt;4–5 segments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Export&lt;/td&gt;
&lt;td&gt;WAV preferred, MP3 acceptable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-production&lt;/td&gt;
&lt;td&gt;Lower BGM volume and highlight subtitles&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  15. FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  15.1 Why does my voiceover still sound like AI?
&lt;/h3&gt;

&lt;p&gt;Common reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;script is too written;&lt;/li&gt;
&lt;li&gt;sentences are too long;&lt;/li&gt;
&lt;li&gt;no punctuation;&lt;/li&gt;
&lt;li&gt;wrong voice;&lt;/li&gt;
&lt;li&gt;emotion setting is too strong;&lt;/li&gt;
&lt;li&gt;generated as one long piece;&lt;/li&gt;
&lt;li&gt;no mixing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  15.2 Is Chinese voiceover natural?
&lt;/h3&gt;

&lt;p&gt;It is already strong for educational, tutorial, and commercial narration. Mixed Chinese-English terms, casual particles, dialects, and strong emotions still need manual review.&lt;/p&gt;

&lt;h3&gt;
  
  
  15.3 Can I use it commercially?
&lt;/h3&gt;

&lt;p&gt;It depends on your plan, voice license, platform rules, and content use. Starter and above are usually more practical for commercial creators, but you should still check official terms and voice permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  15.4 Can I clone another person’s voice?
&lt;/h3&gt;

&lt;p&gt;Do not do this without explicit authorization, especially for commercial use.&lt;/p&gt;

&lt;h3&gt;
  
  
  15.5 Should I say the narration is AI-generated?
&lt;/h3&gt;

&lt;p&gt;For ordinary tutorials, it may not always need large on-screen labeling. For commercial, sensitive, news, personality, or potentially misleading content, clear disclosure is safer.&lt;/p&gt;




&lt;h2&gt;
  
  
  16. Recommended Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Short-video creator
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ChatGPT script → manual spoken rewrite → ElevenLabs voiceover → CapCut subtitles and BGM → publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Course creator
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Course outline → chapter scripts → segmented ElevenLabs generation → review → normalize volume → upload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Product promo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Selling points → narration script → commercial voice → generate versions → team review → Premiere mix → export
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Global content team
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chinese script → international rewrite → translation → ElevenLabs multilingual voiceover → subtitle sync → native-speaker review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  17. Pitfall Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Do not paste written copy directly;&lt;/li&gt;
&lt;li&gt;Do not generate the entire script at once;&lt;/li&gt;
&lt;li&gt;Do not choose a mismatched voice;&lt;/li&gt;
&lt;li&gt;Do not let BGM cover the voice;&lt;/li&gt;
&lt;li&gt;Do not skip subtitle proofreading;&lt;/li&gt;
&lt;li&gt;Do not clone unauthorized voices;&lt;/li&gt;
&lt;li&gt;Do not use AI voice to impersonate a real person;&lt;/li&gt;
&lt;li&gt;Do not skip human review;&lt;/li&gt;
&lt;li&gt;Do not treat AI voice as proof of identity;&lt;/li&gt;
&lt;li&gt;For commercial videos, check licenses, terms, and platform rules.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  18. Final Verdict
&lt;/h2&gt;

&lt;p&gt;Using ElevenLabs for professional video AI voiceover is not about clicking generate once. It requires a complete workflow:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;spoken script → voice selection → segmented generation → human review → mixing → subtitles → compliance check.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ElevenLabs helps ordinary creators get close to studio-quality narration quickly, greatly reducing production cost for short videos, courses, ads, and multilingual content.&lt;/p&gt;

&lt;p&gt;But it does not replace all human voiceover work, and it should never be used to impersonate people.&lt;/p&gt;

&lt;p&gt;Final recommendation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Treat ElevenLabs as a professional AI voice studio that improves video production efficiency, not as a voice copier for identity confusion.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  19. SEO Information
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO title:&lt;/strong&gt; How to Use ElevenLabs to Create Professional AI Voiceovers for Your Videos&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SEO description:&lt;/strong&gt; This guide explains how to use ElevenLabs for video AI voiceovers, covering script rewriting, voice selection, Text to Speech, Voiceover Studio, segmented generation, review, CapCut/Premiere mixing, subtitles, voice cloning compliance, pricing, and practical examples.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Keywords:&lt;/strong&gt; ElevenLabs, AI voiceover, AI narration, video voiceover, AI voice synthesis, Text to Speech, TTS, AI short-video voiceover, AI course narration, AI voice cloning, ElevenLabs tutorial&lt;/p&gt;




&lt;h2&gt;
  
  
  20. Data Sources and References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Documentation: Text to Speech, Speech to Text, Voice Cloning, Conversational Agents, API, SDK, and Studio capabilities.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/docs/overview/intro" rel="noopener noreferrer"&gt;https://elevenlabs.io/docs/overview/intro&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Text to Speech docs: TTS API turns text into lifelike audio with intonation, pacing, and emotional awareness.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/docs/overview/capabilities/text-to-speech" rel="noopener noreferrer"&gt;https://elevenlabs.io/docs/overview/capabilities/text-to-speech&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Voiceover Studio docs: create voiceover projects from Dashboard Audio Tools.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/docs/eleven-creative/audio-tools/voiceover-studio" rel="noopener noreferrer"&gt;https://elevenlabs.io/docs/eleven-creative/audio-tools/voiceover-studio&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Dubbing docs: translates audio and video across languages while preserving emotion, timing, tone, and speaker characteristics.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/docs/overview/capabilities/dubbing" rel="noopener noreferrer"&gt;https://elevenlabs.io/docs/overview/capabilities/dubbing&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Models docs: &lt;code&gt;eleven_v3&lt;/code&gt;, &lt;code&gt;eleven_flash_v2_5&lt;/code&gt;, Multilingual v2, Scribe, and other models.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/docs/overview/models" rel="noopener noreferrer"&gt;https://elevenlabs.io/docs/overview/models&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Pricing: Free, Starter, Creator, Pro, Scale, Business, Enterprise plans and credits.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/pricing" rel="noopener noreferrer"&gt;https://elevenlabs.io/pricing&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs API Pricing: TTS, STT, Speech Engine, Voice Changer, Voice Isolator, and Dubbing pricing.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/pricing/api" rel="noopener noreferrer"&gt;https://elevenlabs.io/pricing/api&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs Safety: cloning restrictions, Professional Voice Cloning verification, and AI Speech Classifier.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/safety" rel="noopener noreferrer"&gt;https://elevenlabs.io/safety&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElevenLabs SynthID blog: SynthID watermarking started for free-user TTS and is planned to expand across audio generations.&lt;br&gt;&lt;br&gt;
&lt;a href="https://elevenlabs.io/blog/synthid" rel="noopener noreferrer"&gt;https://elevenlabs.io/blog/synthid&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Publish-ready Summary
&lt;/h2&gt;

&lt;p&gt;This article is a practical guide to using ElevenLabs for professional AI video voiceovers. It explains the full workflow from script rewriting, voice selection, TTS generation, segmentation, human review, audio mixing, subtitle syncing, and compliance checking. It emphasizes that ElevenLabs is suitable for short videos, product explainers, courses, ads, multilingual content, and educational videos, but should not be used for unauthorized voice cloning or impersonation. The best workflow is to rewrite written copy into spoken script, choose the right voice, generate audio in segments, mix it in CapCut or Premiere, add subtitles, and review before publishing.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260710-7792" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Create High-Quality Product Promo Images with Midjourney: A Complete Prompt Guide</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Thu, 09 Jul 2026 08:02:55 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/how-to-create-high-quality-product-promo-images-with-midjourney-a-complete-prompt-guide-3mj1</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/how-to-create-high-quality-product-promo-images-with-midjourney-a-complete-prompt-guide-3mj1</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Category: AI Image Tutorial / Product Promo Visuals&lt;br&gt;&lt;br&gt;
Target readers: e-commerce operators, brand marketers, content creators, designers, independent sellers, and anyone who wants to create product hero images and promotional visuals with AI&lt;br&gt;&lt;br&gt;
Test date: July 9, 2026&lt;br&gt;&lt;br&gt;
Bottom line: &lt;strong&gt;Midjourney is excellent for visual concepts, advertising atmosphere, premium product scenes, and creative direction. But it is not the best tool for final commercial layouts with precise Chinese text, prices, logos, and compliance information. The best workflow is to generate a high-quality visual base in Midjourney, then finish layout and text in Canva, Photoshop, or Figma.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. What Product Promo Images Is Midjourney Good For?
&lt;/h2&gt;

&lt;p&gt;Midjourney’s strength is not final ad layout. Its strength is high-quality visual generation.&lt;/p&gt;

&lt;p&gt;It is especially good for:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Fit&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;E-commerce hero visuals&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Great for background, lighting, texture, and atmosphere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Social media promo images&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Good for Xiaohongshu, Instagram, blog, and newsletter visuals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New product concept posters&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Great for launches, brand storytelling, and mood direction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Independent site banners&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Clean, premium, international visuals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product photography simulation&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Studio, natural light, macro, and lifestyle photography&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chinese text posters&lt;/td&gt;
&lt;td&gt;Medium-low&lt;/td&gt;
&lt;td&gt;Add final Chinese text in post-production&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accurate logo and packaging text&lt;/td&gt;
&lt;td&gt;Medium-low&lt;/td&gt;
&lt;td&gt;Use real assets and post-production for final delivery&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consistent SKU batch images&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Use references, Omni Reference, or downstream workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In one sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Midjourney is more like an AI photo studio and creative art director than a final layout tool.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Which Midjourney Model Should You Use?
&lt;/h2&gt;

&lt;p&gt;As of the test date, Midjourney’s official documentation lists V8.1 as the default version. V8.1 was released on April 30, 2026 and became the default model on June 10, 2026. The documentation says it is the fastest model so far, with standard jobs rendering about 4–5 times faster than earlier versions, and it is better at reading prompts and preserving small details.&lt;/p&gt;

&lt;p&gt;Older tutorials about V6 or V7 are not useless. V7 was released in 2025 and introduced Draft Mode and Omni Reference, which can help with image prompts, texture, object details, and object consistency. For product promo images, &lt;strong&gt;use the current default V8.1 for general generation, and pay attention to V7 Omni Reference if you need to preserve a specific product or object.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The prompt templates in this article are written to be broadly useful for current Midjourney workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Core Structure of a Product Prompt
&lt;/h2&gt;

&lt;p&gt;Many beginners write prompts like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a skincare product, premium, beautiful
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is too vague.&lt;/p&gt;

&lt;p&gt;A stronger product prompt should include nine modules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Product subject&lt;/td&gt;
&lt;td&gt;Defines the hero object&lt;/td&gt;
&lt;td&gt;a premium matte black perfume bottle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product features&lt;/td&gt;
&lt;td&gt;Material, color, shape&lt;/td&gt;
&lt;td&gt;frosted glass, silver cap, minimal label&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use scenario&lt;/td&gt;
&lt;td&gt;Adds commercial context&lt;/td&gt;
&lt;td&gt;luxury bathroom counter, morning light&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brand mood&lt;/td&gt;
&lt;td&gt;Defines tone&lt;/td&gt;
&lt;td&gt;clean, elegant, high-end, calming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Camera language&lt;/td&gt;
&lt;td&gt;Controls composition&lt;/td&gt;
&lt;td&gt;close-up product photography, 85mm lens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lighting&lt;/td&gt;
&lt;td&gt;Defines texture&lt;/td&gt;
&lt;td&gt;soft diffused studio lighting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Background&lt;/td&gt;
&lt;td&gt;Defines visual hierarchy&lt;/td&gt;
&lt;td&gt;beige marble background, subtle reflections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Aspect ratio&lt;/td&gt;
&lt;td&gt;Fits the platform&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--ar 4:5&lt;/code&gt;, &lt;code&gt;--ar 16:9&lt;/code&gt;, &lt;code&gt;--ar 1:1&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Negative constraints&lt;/td&gt;
&lt;td&gt;Removes errors&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--no hands, people, distorted logo, extra text&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Universal template
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[product subject], [product features], placed in/on [use scenario],
[brand mood and product benefit atmosphere],
[camera language], [lighting], [background and material],
commercial product photography, premium advertising visual,
clean composition, realistic details, high-end branding
--ar [ratio] --style raw --s [stylize value] --no [unwanted elements]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Useful Parameters for Product Images
&lt;/h2&gt;

&lt;p&gt;Midjourney’s official documentation says parameters should be placed at the end of the prompt. They control things such as aspect ratio, style, version, quality, and exclusions.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;th&gt;Product image advice&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--ar&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Aspect ratio&lt;/td&gt;
&lt;td&gt;1:1 for e-commerce, 3:4 or 4:5 for social, 16:9 for banners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;--s&lt;/code&gt; / &lt;code&gt;--stylize&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Artistic strength&lt;/td&gt;
&lt;td&gt;Use 50–250 for product images&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--raw&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Less default styling&lt;/td&gt;
&lt;td&gt;Better for realistic and commercial visuals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--no&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exclusions&lt;/td&gt;
&lt;td&gt;Remove extra text, hands, distorted logos, clutter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--seed&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reproducibility&lt;/td&gt;
&lt;td&gt;Useful for series testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--repeat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Multiple generations&lt;/td&gt;
&lt;td&gt;Good for fast exploration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--sref&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Style reference&lt;/td&gt;
&lt;td&gt;Keeps a consistent visual theme&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--sw&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Style weight&lt;/td&gt;
&lt;td&gt;Controls reference style influence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--oref&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Omni Reference&lt;/td&gt;
&lt;td&gt;Helps preserve a product or object in V7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Aspect ratio guide
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Recommended ratio&lt;/th&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;E-commerce hero image&lt;/td&gt;
&lt;td&gt;1:1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--ar 1:1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Xiaohongshu cover&lt;/td&gt;
&lt;td&gt;3:4 / 4:5&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--ar 3:4&lt;/code&gt; or &lt;code&gt;--ar 4:5&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blog / newsletter cover&lt;/td&gt;
&lt;td&gt;16:9&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--ar 16:9&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Website banner&lt;/td&gt;
&lt;td&gt;21:9 / 16:9&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--ar 21:9&lt;/code&gt; or &lt;code&gt;--ar 16:9&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vertical poster&lt;/td&gt;
&lt;td&gt;2:3 / 3:4&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--ar 2:3&lt;/code&gt; or &lt;code&gt;--ar 3:4&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  5. Six Copyable Product Promo Prompt Templates
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Template 1: Premium studio product shot
&lt;/h3&gt;

&lt;p&gt;Best for skincare, perfume, cups, digital accessories, and premium products.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a premium skincare serum bottle, frosted transparent glass, silver pump cap,
placed on a beige marble surface,
minimal luxury beauty advertising, clean and elegant,
close-up commercial product photography, 85mm lens,
soft diffused studio lighting, subtle reflection, shallow depth of field,
high-end brand visual, realistic texture, clean composition
--ar 4:5 --style raw --s 120 --no people, hands, extra text, distorted label, watermark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;frosted glass&lt;/code&gt; controls material;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;soft diffused studio lighting&lt;/code&gt; creates a studio look;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--style raw&lt;/code&gt; helps keep it commercial rather than overly artistic;&lt;/li&gt;
&lt;li&gt;Add final label and logo manually.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Template 2: E-commerce hero image
&lt;/h3&gt;

&lt;p&gt;Best for coffee, drinks, snacks, home goods, and beauty products.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a modern iced coffee bottle, clean cylindrical packaging,
placed in the center of a premium e-commerce hero image,
dark blue gradient background with soft glowing light,
fresh coffee beans and ice cubes around the product,
commercial product photography, sharp focus, realistic reflections,
premium, clean, high conversion product visual
--ar 1:1 --style raw --s 100 --no people, hands, messy background, extra text, fake logo, distorted bottle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the hero image clean;&lt;/li&gt;
&lt;li&gt;Add price, label, and selling points later;&lt;/li&gt;
&lt;li&gt;Use a real product reference when product shape must be accurate.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Template 3: Lifestyle product scene
&lt;/h3&gt;

&lt;p&gt;Best for mugs, tumblers, candles, home goods, fashion, and sports products.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a minimalist white ceramic coffee mug on a wooden desk,
morning sunlight through a window, cozy home office,
open notebook, laptop blurred in background, calm lifestyle mood,
realistic lifestyle product photography, natural light, warm tone,
soft shadows, shallow depth of field, premium editorial style
--ar 4:5 --style raw --s 180 --no people, hands, messy desk, extra text, watermark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lifestyle visuals need a usage scenario;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;blurred in background&lt;/code&gt; helps create depth;&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;warm tone&lt;/code&gt;, &lt;code&gt;cozy&lt;/code&gt;, and &lt;code&gt;editorial style&lt;/code&gt; for mood.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Template 4: Tech product poster
&lt;/h3&gt;

&lt;p&gt;Best for earbuds, smart watches, phone cases, keyboards, AI hardware, and software visuals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a sleek wireless earbud case, matte black finish, floating above a dark reflective surface,
futuristic blue light trails, subtle holographic interface elements,
premium technology product advertising, dramatic studio lighting,
sharp edges, clean composition, cinematic contrast,
high-end tech brand campaign visual
--ar 16:9 --style raw --s 200 --no people, hands, random text, distorted product, clutter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tech visuals depend on lighting and background;&lt;/li&gt;
&lt;li&gt;Holographic elements may generate fake text, so edit later;&lt;/li&gt;
&lt;li&gt;Good for website banners and product launch visuals.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Template 5: Seasonal promotion visual
&lt;/h3&gt;

&lt;p&gt;Best for holiday campaigns, gifts, shopping festivals, Christmas, Valentine’s Day, and Mother’s Day.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a premium gift box product set, elegant red and gold packaging,
placed on a festive holiday table with soft bokeh lights,
luxury seasonal promotion visual, warm cinematic lighting,
clean product-centered composition, realistic materials,
high-end advertising photography, celebration mood
--ar 3:4 --style raw --s 160 --no people, hands, extra words, distorted packaging, watermark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use color, props, and light to show the season;&lt;/li&gt;
&lt;li&gt;Add event text later;&lt;/li&gt;
&lt;li&gt;Avoid relying on Midjourney for exact Chinese promo copy.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Template 6: Minimal luxury brand visual
&lt;/h3&gt;

&lt;p&gt;Best for high-end beauty, perfume, tea, jewelry, and designer brands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a luxury perfume bottle with a minimal rectangular shape,
placed on a smooth ivory stone pedestal,
monochrome beige background, elegant negative space,
premium minimalist advertising photography,
soft studio light, subtle shadow, refined texture,
quiet luxury, clean brand campaign visual
--ar 4:5 --style raw --s 80 --no people, hands, text, logo distortion, clutter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimalism needs fewer elements;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;negative space&lt;/code&gt; leaves room for typography;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--s 80&lt;/code&gt; keeps the look controlled.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Prompt Formulas
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Formula 1: Product photography
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product + material + scene + lighting + lens + background + commercial use + parameters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a premium stainless steel water bottle, brushed metal texture,
on a wet black stone surface, soft studio lighting, 85mm lens,
dark luxury background, commercial product photography
--ar 4:5 --style raw --s 120 --no people, hands, text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Formula 2: E-commerce conversion
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product + visualized benefit + clean background + centered composition + premium lighting + conversion intent + parameters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a compact portable blender, transparent cup, fresh fruit pieces around it,
centered composition, clean white and green background,
bright commercial lighting, e-commerce hero product image
--ar 1:1 --style raw --s 100 --no people, hands, extra text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Formula 3: Brand mood
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product + brand keywords + scene metaphor + color palette + lighting + negative space + parameters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a luxury tea canister, calm oriental premium brand mood,
misty mountain silhouette in background, jade green and ivory color palette,
soft morning light, elegant negative space, editorial advertising visual
--ar 3:4 --style raw --s 180 --no text, people, hands
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Formula 4: Consistent series
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fixed product description + fixed style words + fixed background system + fixed parameters + seed / style reference
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a premium skincare bottle, frosted glass, silver cap,
minimal beige marble background, soft diffused studio lighting,
luxury beauty advertising, clean composition
--ar 4:5 --style raw --s 100 --seed 20260709
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. How to Make Product Images Look More Commercial
&lt;/h2&gt;

&lt;h3&gt;
  
  
  7.1 Describe materials instead of saying “premium”
&lt;/h3&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;frosted glass;&lt;/li&gt;
&lt;li&gt;brushed metal;&lt;/li&gt;
&lt;li&gt;matte ceramic;&lt;/li&gt;
&lt;li&gt;glossy plastic;&lt;/li&gt;
&lt;li&gt;transparent acrylic;&lt;/li&gt;
&lt;li&gt;natural leather.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.2 Describe lighting instead of saying “beautiful”
&lt;/h3&gt;

&lt;p&gt;Useful lighting phrases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;soft diffused studio lighting;&lt;/li&gt;
&lt;li&gt;natural morning light;&lt;/li&gt;
&lt;li&gt;dramatic rim light;&lt;/li&gt;
&lt;li&gt;cinematic side lighting;&lt;/li&gt;
&lt;li&gt;softbox reflection;&lt;/li&gt;
&lt;li&gt;warm golden hour light;&lt;/li&gt;
&lt;li&gt;high contrast studio light.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.3 Describe camera language instead of saying “realistic”
&lt;/h3&gt;

&lt;p&gt;Useful camera phrases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;commercial product photography;&lt;/li&gt;
&lt;li&gt;macro photography;&lt;/li&gt;
&lt;li&gt;close-up shot;&lt;/li&gt;
&lt;li&gt;85mm lens;&lt;/li&gt;
&lt;li&gt;shallow depth of field;&lt;/li&gt;
&lt;li&gt;sharp focus;&lt;/li&gt;
&lt;li&gt;product-centered composition;&lt;/li&gt;
&lt;li&gt;editorial advertising photo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.4 Leave space for text
&lt;/h3&gt;

&lt;p&gt;Add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;large clean negative space on the top
large empty space on the right side for text
minimal background with room for typography
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7.5 Use negative constraints
&lt;/h3&gt;

&lt;p&gt;Common product image issues include extra hands, distorted packaging, fake labels, clutter, and random text.&lt;/p&gt;

&lt;p&gt;Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--no people, hands, extra text, watermark, distorted logo, deformed packaging, clutter, low quality
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  8. How to Use References for Product Consistency
&lt;/h2&gt;

&lt;p&gt;If you have a real product photo, do not rely only on text prompts. Midjourney supports multiple reference methods.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.1 Image Prompt
&lt;/h3&gt;

&lt;p&gt;Use a reference image as part of your prompt to guide product shape, color, and composition.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2 Style Reference
&lt;/h3&gt;

&lt;p&gt;Midjourney says Style Reference captures the overall visual vibe of a reference image, such as colors, medium, textures, and lighting. It does not copy objects or people. This is useful for keeping a campaign visually consistent.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;premium skincare product photography, beige marble background, soft luxury lighting --sref [image URL] --sw 150
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8.3 Omni Reference
&lt;/h3&gt;

&lt;p&gt;Midjourney says Omni Reference can place a character, object, vehicle, or non-human creature from a reference image into a new generation, and it is compatible with V7. It is useful for preserving a product or object, but fine details like logos may not match perfectly and it costs more GPU time.&lt;/p&gt;

&lt;p&gt;Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;preserving approximate product shape;&lt;/li&gt;
&lt;li&gt;keeping a character;&lt;/li&gt;
&lt;li&gt;keeping a specific object form;&lt;/li&gt;
&lt;li&gt;making multi-scene visuals for one product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not ideal for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;exact trademark reproduction;&lt;/li&gt;
&lt;li&gt;exact packaging text;&lt;/li&gt;
&lt;li&gt;industrial-grade product consistency;&lt;/li&gt;
&lt;li&gt;replacing real product photography.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. Full Product Image Workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Prepare inputs
&lt;/h3&gt;

&lt;p&gt;Prepare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;product name;&lt;/li&gt;
&lt;li&gt;product category;&lt;/li&gt;
&lt;li&gt;core selling points;&lt;/li&gt;
&lt;li&gt;target audience;&lt;/li&gt;
&lt;li&gt;use scenario;&lt;/li&gt;
&lt;li&gt;brand mood;&lt;/li&gt;
&lt;li&gt;platform size;&lt;/li&gt;
&lt;li&gt;reference product image;&lt;/li&gt;
&lt;li&gt;whether final text is needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Generate visual directions
&lt;/h3&gt;

&lt;p&gt;Do not chase the final image immediately. Generate 4–8 visual directions first.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a premium portable coffee maker, compact matte white design,
modern kitchen counter, morning sunlight, clean lifestyle photography,
minimal premium brand mood, soft shadows, realistic materials
--ar 4:5 --style raw --s 120 --repeat 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Select and refine
&lt;/h3&gt;

&lt;p&gt;Choose the best direction, then tighten the composition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;same premium portable coffee maker concept,
more centered composition, cleaner background, stronger product focus,
more negative space for headline, soft studio lighting, realistic texture
--ar 4:5 --style raw --s 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Build a series
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Image type&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hero image&lt;/td&gt;
&lt;td&gt;Product main visual / banner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lifestyle image&lt;/td&gt;
&lt;td&gt;Usage scenario&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detail image&lt;/td&gt;
&lt;td&gt;Material, structure, feature&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mood image&lt;/td&gt;
&lt;td&gt;Brand atmosphere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Social cover&lt;/td&gt;
&lt;td&gt;Xiaohongshu, blog, Instagram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Campaign image&lt;/td&gt;
&lt;td&gt;Promotion, holiday, launch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 5: Finish in design tools
&lt;/h3&gt;

&lt;p&gt;Use Canva, Photoshop, or Figma for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logo;&lt;/li&gt;
&lt;li&gt;Chinese title;&lt;/li&gt;
&lt;li&gt;price;&lt;/li&gt;
&lt;li&gt;selling point badges;&lt;/li&gt;
&lt;li&gt;promotion info;&lt;/li&gt;
&lt;li&gt;cropping;&lt;/li&gt;
&lt;li&gt;compliance notes;&lt;/li&gt;
&lt;li&gt;real product detail checks.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  10. Test Tasks and Scores
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Test tasks
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Skincare studio shot&lt;/td&gt;
&lt;td&gt;Glass, metal, soft light, luxury feel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coffee e-commerce image&lt;/td&gt;
&lt;td&gt;Centered product, texture, clean background&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smart device poster&lt;/td&gt;
&lt;td&gt;Tech lighting and structural stability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Social cover base&lt;/td&gt;
&lt;td&gt;Vertical composition and negative space&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Holiday gift visual&lt;/td&gt;
&lt;td&gt;Seasonal mood and commercial quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reference consistency&lt;/td&gt;
&lt;td&gt;Product shape retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-production usability&lt;/td&gt;
&lt;td&gt;Room for text, cropping, and final layout&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Scorecard
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Visual quality&lt;/td&gt;
&lt;td&gt;95/100&lt;/td&gt;
&lt;td&gt;Excellent lighting, composition, and mood&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creative direction&lt;/td&gt;
&lt;td&gt;92/100&lt;/td&gt;
&lt;td&gt;Great for exploring ad concepts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product realism&lt;/td&gt;
&lt;td&gt;84/100&lt;/td&gt;
&lt;td&gt;Good overall, but packaging details need manual checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chinese poster readiness&lt;/td&gt;
&lt;td&gt;65/100&lt;/td&gt;
&lt;td&gt;Do not rely on it for final Chinese text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Series consistency&lt;/td&gt;
&lt;td&gt;78/100&lt;/td&gt;
&lt;td&gt;References help, but not industrial-level consistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-production usability&lt;/td&gt;
&lt;td&gt;88/100&lt;/td&gt;
&lt;td&gt;Strong if negative space and composition are controlled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Beginner friendliness&lt;/td&gt;
&lt;td&gt;82/100&lt;/td&gt;
&lt;td&gt;Easy to learn, but parameters and limits matter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Overall score: &lt;strong&gt;83 / 100&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Verdict:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Midjourney is excellent for creative visual bases and premium product atmospheres, but commercial delivery still requires human selection, typography, logo checks, and compliance review.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  11. Common Prompt Mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Mistake 1: Only using adjectives
&lt;/h3&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;premium product image, high-end, beautiful
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a luxury perfume bottle, frosted glass, silver cap,
on beige marble, soft diffused studio lighting,
minimal commercial product photography
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mistake 2: Asking Midjourney to do Chinese layout
&lt;/h3&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a Chinese poster that says “新品上市 限时优惠”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a product promo background with no text, with large clean space on the right for adding Chinese headline later
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mistake 3: Too much background clutter
&lt;/h3&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowers, clouds, light, people, city, particles, mountains, many decorations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;clean product-centered composition, minimal background, subtle props
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mistake 4: No negative constraints
&lt;/h3&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a product advertisement
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a product advertisement --no people, hands, extra text, distorted logo, messy background
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mistake 5: Overusing stylization
&lt;/h3&gt;

&lt;p&gt;Product promo images should not be too artistic. Start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--style raw --s 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then test 150 or 200 if needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  12. Commercial Use Notes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat AI output as a real product photo&lt;/strong&gt;. If you sell an actual product, check appearance, structure, color, size, and details.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add logos and packaging text manually&lt;/strong&gt;. Do not rely on AI to generate precise trademarks or Chinese text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid competitor-like packaging&lt;/strong&gt;. Watch for trademark, design patent, and unfair competition risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow platform rules&lt;/strong&gt;. E-commerce platforms may regulate main images, efficacy claims, and misleading visuals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep human review&lt;/strong&gt;. AI images should be reviewed by design, marketing, or legal teams before launch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Midjourney’s terms&lt;/strong&gt;. Commercial use, privacy, account rules, and output rights should be checked against official terms.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  13. Recommended Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  E-commerce hero image
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Midjourney background and scene → Photoshop real product composite → Canva/Figma selling points → human review → publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Social media cover
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Midjourney visual base → ChatGPT title ideas → Canva layout → A/B test titles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Brand poster
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Midjourney moodboard → choose visual direction → generate promo background → designer adds logo and copy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Website banner
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Midjourney landscape scene → Figma layout → add CTA button → export compressed WebP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  14. Final Verdict
&lt;/h2&gt;

&lt;p&gt;The key to creating high-quality product promo images with Midjourney is not stacking words like “premium,” “cinematic,” and “realistic.” It is breaking the image into controllable modules:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Product subject + material + scene + lighting + lens + background + negative space + parameters + negative constraints.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The most practical prompting mindset is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Describe what the product is, where it is, what light it uses, what camera style it has, what brand mood it carries, and what platform it is for. Then use parameters to control ratio, style, and exclusions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Midjourney is best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;visual ideas;&lt;/li&gt;
&lt;li&gt;product atmosphere;&lt;/li&gt;
&lt;li&gt;advertising look;&lt;/li&gt;
&lt;li&gt;background scenes;&lt;/li&gt;
&lt;li&gt;social media cover bases;&lt;/li&gt;
&lt;li&gt;e-commerce hero drafts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But final commercial images still need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;real product checks;&lt;/li&gt;
&lt;li&gt;logo compositing;&lt;/li&gt;
&lt;li&gt;Chinese typography;&lt;/li&gt;
&lt;li&gt;price and selling point verification;&lt;/li&gt;
&lt;li&gt;platform rule checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One-sentence conclusion:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Use Midjourney to create beautiful commercial visual bases, then use professional design tools to produce accurate, publishable final promo images.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  15. SEO Information
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO title:&lt;/strong&gt; How to Create High-Quality Product Promo Images with Midjourney: A Complete Prompt Guide&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SEO description:&lt;/strong&gt; This guide explains how to use Midjourney to create product promo images, covering prompt structure, parameters, studio shots, e-commerce hero images, lifestyle scenes, tech posters, seasonal visuals, reference consistency, commercial-use notes, and complete workflows.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Keywords:&lt;/strong&gt; Midjourney product image, Midjourney prompt, AI product promo image, AI e-commerce hero image, Midjourney tutorial, product photography prompt, AI advertising image, social media cover, e-commerce design, commercial AI art&lt;/p&gt;




&lt;h2&gt;
  
  
  16. Data Sources and References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Midjourney Version documentation: V8.1 default version, V7 release, Draft Mode, and Omni Reference.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/32199405667853-Version" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/32199405667853-Version&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Midjourney Parameter List: &lt;code&gt;--ar&lt;/code&gt;, &lt;code&gt;--no&lt;/code&gt;, &lt;code&gt;--raw&lt;/code&gt;, &lt;code&gt;--stylize&lt;/code&gt;, &lt;code&gt;--sref&lt;/code&gt;, &lt;code&gt;--seed&lt;/code&gt;, &lt;code&gt;--repeat&lt;/code&gt;, and other parameters.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/32859204029709-Parameter-List" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/32859204029709-Parameter-List&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Midjourney Style Reference documentation: Style Reference captures the overall visual vibe of a reference image, controlled with &lt;code&gt;--sref&lt;/code&gt; and &lt;code&gt;--sw&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/32180011136653-Style-Reference" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/32180011136653-Style-Reference&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Midjourney Omni Reference documentation: Omni Reference can bring a person, object, vehicle, or non-human creature from a reference image into new generations, using &lt;code&gt;--oref&lt;/code&gt; and &lt;code&gt;--ow&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/36285124473997-Omni-Reference" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/36285124473997-Omni-Reference&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Midjourney Plans documentation: Basic, Standard, Pro, Mega subscriptions, Fast GPU Time, Relax Mode, and Stealth Mode.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/27870484040333-Comparing-Midjourney-Plans" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/27870484040333-Comparing-Midjourney-Plans&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Midjourney Terms of Service: service quality, assets, inputs, responsibility, and intellectual-property related terms.&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.midjourney.com/hc/en-us/articles/32083055291277-Terms-of-Service" rel="noopener noreferrer"&gt;https://docs.midjourney.com/hc/en-us/articles/32083055291277-Terms-of-Service&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Publish-ready Summary
&lt;/h2&gt;

&lt;p&gt;This guide explains how to create high-quality product promo images with Midjourney. It breaks a product prompt into nine modules: product subject, product features, use scenario, brand mood, camera language, lighting, background, aspect ratio, and negative constraints. It provides copyable templates for studio product shots, e-commerce hero images, lifestyle scenes, tech posters, seasonal promotions, and minimalist luxury visuals. The key conclusion is that Midjourney is excellent for premium commercial visual bases, but final text, logos, prices, selling points, and compliance information should still be completed in Canva, Photoshop, or Figma.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.zyentorpicks.com/en/guides/article-260709-7565" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
