<?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>Qwen3 Embedding on Cloud TPU: Production Long-Context Retrieval with vLLM</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Fri, 28 Aug 2026 01:54:23 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/qwen3-embedding-on-cloud-tpu-production-long-context-retrieval-with-vllm-4m53</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/qwen3-embedding-on-cloud-tpu-production-long-context-retrieval-with-vllm-4m53</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;Google Cloud published native vLLM TPU support for embedding inference on August 26, 2026, targeting production retrieval rather than chat generation. The engineering work focuses on Qwen3-Embedding-8B and Qwen3-VL-Embedding-8B with long text and multimodal contexts, including 16K-class text sequences and 15K+ multimodal inputs. Google addressed TPU tensor alignment, lazy loading, JAX/XLA compilation warm-up, chunked prefill, and pooling-state preservation through a hybrid StepPool design. In one published Qwen3-Embedding-8B configuration using bf16, 16K+ sequences, and TP=4, TPU Ironwood reached 83,996 total tokens/s and 5.13 requests/s. Google also validates cross-hardware vector parity with cosine-similarity thresholds of at least 0.999 for text and 0.995 for multimodal inputs.&lt;/p&gt;




&lt;p&gt;Embedding infrastructure is easy to underestimate.&lt;/p&gt;

&lt;p&gt;A prototype may 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;documents
→ embedding API
→ vector database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Production can involve hundreds of millions of chunks, images, reindexing jobs, online queries, and multiple tenants.&lt;/p&gt;

&lt;p&gt;At that point, embedding inference becomes a real serving platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two different workloads
&lt;/h2&gt;

&lt;p&gt;Indexing prioritizes token throughput.&lt;/p&gt;

&lt;p&gt;Online query embedding prioritizes latency.&lt;/p&gt;

&lt;p&gt;A mature platform needs both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why long-context embeddings matter
&lt;/h2&gt;

&lt;p&gt;Modern retrieval increasingly wants long documents, multimodal pages, slide sections, and image-text pairs rather than 512-token snippets.&lt;/p&gt;

&lt;p&gt;Google discusses text workloads above 4K tokens and multimodal inputs above 15K.&lt;/p&gt;

&lt;p&gt;Long sequences increase memory pressure and make pooling correctness more difficult.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why native vLLM TPU support matters
&lt;/h2&gt;

&lt;p&gt;vLLM is already a mainstream open-source serving engine.&lt;/p&gt;

&lt;p&gt;Adding TPU support lets teams use a more consistent serving stack across accelerator types instead of operating a separate TPU-only system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heterogeneous elasticity with GKE
&lt;/h2&gt;

&lt;p&gt;Google describes prioritized capacity where TPU can be the primary pool and GPU capacity can serve as secondary fallback.&lt;/p&gt;

&lt;p&gt;This is especially useful for bursty indexing workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embedding correctness is stricter than generation correctness
&lt;/h2&gt;

&lt;p&gt;Small generation differences across hardware are often acceptable.&lt;/p&gt;

&lt;p&gt;Embedding differences can alter nearest-neighbor ranking.&lt;/p&gt;

&lt;p&gt;If vectors change materially, search results can change simply because the hardware backend changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Golden-reference testing
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v_ref = reference embedding
v_tpu = TPU embedding
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then evaluate cosine similarity.&lt;/p&gt;

&lt;p&gt;Google uses target thresholds of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;text &amp;gt;= 0.999
multimodal &amp;gt;= 0.995
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a strict migration standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do not benchmark only QPS
&lt;/h2&gt;

&lt;p&gt;Before moving embedding inference across hardware, measure vector parity, Recall@K, NDCG, top-K overlap, and downstream business quality.&lt;/p&gt;

&lt;p&gt;Faster infrastructure is not useful if retrieval quality silently changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chunked prefill is difficult for embeddings
&lt;/h2&gt;

&lt;p&gt;Long inputs can exhaust accelerator memory.&lt;/p&gt;

&lt;p&gt;Chunked prefill reduces peak memory by splitting the input across steps.&lt;/p&gt;

&lt;p&gt;But embedding models still require one final pooled representation across the full sequence.&lt;/p&gt;

&lt;p&gt;If pooling state is not accumulated correctly across chunks, the vector can be wrong without an obvious failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  StepPool and cached state
&lt;/h2&gt;

&lt;p&gt;Google’s hybrid StepPool design preserves pooling state across chunk boundaries and request preemption using cached request metadata.&lt;/p&gt;

&lt;p&gt;This is an important example of the difference between code that runs and inference that remains mathematically correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tensor alignment
&lt;/h2&gt;

&lt;p&gt;TPU matrix units impose strict divisibility constraints during tensor parallel sharding.&lt;/p&gt;

&lt;p&gt;Google added vocabulary padding so sharded execution remains hardware-safe while preserving logical output.&lt;/p&gt;

&lt;h2&gt;
  
  
  JAX/XLA warm-up
&lt;/h2&gt;

&lt;p&gt;TPU serving frequently depends on compilation.&lt;/p&gt;

&lt;p&gt;A production pod should not let its first real user pay the JIT cost.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pod starts
→ model loads
→ compilation warm-up
→ health ready
→ traffic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Published throughput result
&lt;/h2&gt;

&lt;p&gt;For one Qwen3-Embedding-8B configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bf16
16K+ sequence
TP=4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;83,996 total tokens/s
5.13 requests/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a specific benchmark point, not a universal TPU number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why requests/s may look modest
&lt;/h2&gt;

&lt;p&gt;Each request can contain thousands of tokens.&lt;/p&gt;

&lt;p&gt;For long-context indexing, total token throughput can be more useful than raw request count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multimodal serving is harder
&lt;/h2&gt;

&lt;p&gt;Qwen3-VL-Embedding combines text and image inputs. The current vLLM-TPU design chunks only the text portion of multimodal prefill, which highlights the extra complexity around visual features, pooling, and memory.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document pipeline
→ parser / chunker
→ embedding gateway
→ vLLM
   ├── TPU pool
   └── GPU fallback
→ vector database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Online query traffic should ideally use a separate low-latency pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate batch and online capacity
&lt;/h2&gt;

&lt;p&gt;Large reindexing jobs can destroy online P99 latency if they share the same accelerator queue.&lt;/p&gt;

&lt;p&gt;Use separate batch and online embedding pools with different scheduling objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  The embedding gateway should standardize
&lt;/h2&gt;

&lt;p&gt;Track model version, vector dimension, normalization, maximum length, pooling method, and hardware backend.&lt;/p&gt;

&lt;p&gt;Embedding versioning matters because different model versions produce different vector spaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use dual indexes for model upgrades
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;old model → old index
new model → new index
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run shadow traffic, compare retrieval, reindex, and then cut over.&lt;/p&gt;

&lt;p&gt;Do not mix a new query embedding with an old index blindly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is TPU always better?
&lt;/h2&gt;

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

&lt;p&gt;The decision depends on cloud platform, model support, workload shape, cost, and team expertise.&lt;/p&gt;

&lt;p&gt;The strategic value of this release is that TPU becomes a first-class vLLM serving option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics that matter
&lt;/h2&gt;

&lt;p&gt;Performance: tokens/s, requests/s, latency, queue time.&lt;/p&gt;

&lt;p&gt;Quality: cosine parity, Recall@K, top-K overlap, NDCG.&lt;/p&gt;

&lt;p&gt;Infrastructure: HBM, compile time, preemption, autoscaling.&lt;/p&gt;

&lt;p&gt;Business: retrieval success and downstream answer quality.&lt;/p&gt;

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

&lt;p&gt;The important change is not simply that Qwen3 embeddings can run on TPU.&lt;/p&gt;

&lt;p&gt;Embedding inference is becoming independent production infrastructure with requirements for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;high throughput
+ long context
+ mathematical parity
+ elastic scaling
+ reproducibility
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google’s published configuration reaches 83,996 total tokens/s and 5.13 requests/s while applying strict cross-hardware cosine thresholds.&lt;/p&gt;

&lt;p&gt;For production RAG, the key question is not “can the model run on another accelerator?” It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can the system scale and change hardware without silently changing retrieval quality?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For more RAG, embedding, vLLM, and inference-infrastructure guidance, 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/qwen3-embedding-vllm-cloud-tpu" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>embeddings</category>
      <category>qwen</category>
      <category>llm</category>
    </item>
    <item>
      <title>Qwen3 Embedding on Cloud TPU: Production Long-Context Retrieval with vLLM</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Thu, 27 Aug 2026 07:35:59 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/qwen3-embedding-on-cloud-tpu-production-long-context-retrieval-with-vllm-2oe4</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/qwen3-embedding-on-cloud-tpu-production-long-context-retrieval-with-vllm-2oe4</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;Google Cloud published native vLLM TPU support for embedding inference on August 26, 2026, targeting production retrieval rather than chat generation. The engineering work focuses on Qwen3-Embedding-8B and Qwen3-VL-Embedding-8B with long text and multimodal contexts, including 16K-class text sequences and 15K+ multimodal inputs. Google addressed TPU tensor alignment, lazy loading, JAX/XLA compilation warm-up, chunked prefill, and pooling-state preservation through a hybrid StepPool design. In one published Qwen3-Embedding-8B configuration using bf16, 16K+ sequences, and TP=4, TPU Ironwood reached 83,996 total tokens/s and 5.13 requests/s. Google also validates cross-hardware vector parity with cosine-similarity thresholds of at least 0.999 for text and 0.995 for multimodal inputs.&lt;/p&gt;




&lt;p&gt;Embedding infrastructure is easy to underestimate.&lt;/p&gt;

&lt;p&gt;A prototype may 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;documents
→ embedding API
→ vector database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Production can involve hundreds of millions of chunks, images, reindexing jobs, online queries, and multiple tenants.&lt;/p&gt;

&lt;p&gt;At that point, embedding inference becomes a real serving platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two different workloads
&lt;/h2&gt;

&lt;p&gt;Indexing prioritizes token throughput.&lt;/p&gt;

&lt;p&gt;Online query embedding prioritizes latency.&lt;/p&gt;

&lt;p&gt;A mature platform needs both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why long-context embeddings matter
&lt;/h2&gt;

&lt;p&gt;Modern retrieval increasingly wants long documents, multimodal pages, slide sections, and image-text pairs rather than 512-token snippets.&lt;/p&gt;

&lt;p&gt;Google discusses text workloads above 4K tokens and multimodal inputs above 15K.&lt;/p&gt;

&lt;p&gt;Long sequences increase memory pressure and make pooling correctness more difficult.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why native vLLM TPU support matters
&lt;/h2&gt;

&lt;p&gt;vLLM is already a mainstream open-source serving engine.&lt;/p&gt;

&lt;p&gt;Adding TPU support lets teams use a more consistent serving stack across accelerator types instead of operating a separate TPU-only system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heterogeneous elasticity with GKE
&lt;/h2&gt;

&lt;p&gt;Google describes prioritized capacity where TPU can be the primary pool and GPU capacity can serve as secondary fallback.&lt;/p&gt;

&lt;p&gt;This is especially useful for bursty indexing workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embedding correctness is stricter than generation correctness
&lt;/h2&gt;

&lt;p&gt;Small generation differences across hardware are often acceptable.&lt;/p&gt;

&lt;p&gt;Embedding differences can alter nearest-neighbor ranking.&lt;/p&gt;

&lt;p&gt;If vectors change materially, search results can change simply because the hardware backend changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Golden-reference testing
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v_ref = reference embedding
v_tpu = TPU embedding
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then evaluate cosine similarity.&lt;/p&gt;

&lt;p&gt;Google uses target thresholds of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;text &amp;gt;= 0.999
multimodal &amp;gt;= 0.995
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a strict migration standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do not benchmark only QPS
&lt;/h2&gt;

&lt;p&gt;Before moving embedding inference across hardware, measure vector parity, Recall@K, NDCG, top-K overlap, and downstream business quality.&lt;/p&gt;

&lt;p&gt;Faster infrastructure is not useful if retrieval quality silently changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chunked prefill is difficult for embeddings
&lt;/h2&gt;

&lt;p&gt;Long inputs can exhaust accelerator memory.&lt;/p&gt;

&lt;p&gt;Chunked prefill reduces peak memory by splitting the input across steps.&lt;/p&gt;

&lt;p&gt;But embedding models still require one final pooled representation across the full sequence.&lt;/p&gt;

&lt;p&gt;If pooling state is not accumulated correctly across chunks, the vector can be wrong without an obvious failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  StepPool and cached state
&lt;/h2&gt;

&lt;p&gt;Google’s hybrid StepPool design preserves pooling state across chunk boundaries and request preemption using cached request metadata.&lt;/p&gt;

&lt;p&gt;This is an important example of the difference between code that runs and inference that remains mathematically correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tensor alignment
&lt;/h2&gt;

&lt;p&gt;TPU matrix units impose strict divisibility constraints during tensor parallel sharding.&lt;/p&gt;

&lt;p&gt;Google added vocabulary padding so sharded execution remains hardware-safe while preserving logical output.&lt;/p&gt;

&lt;h2&gt;
  
  
  JAX/XLA warm-up
&lt;/h2&gt;

&lt;p&gt;TPU serving frequently depends on compilation.&lt;/p&gt;

&lt;p&gt;A production pod should not let its first real user pay the JIT cost.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pod starts
→ model loads
→ compilation warm-up
→ health ready
→ traffic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Published throughput result
&lt;/h2&gt;

&lt;p&gt;For one Qwen3-Embedding-8B configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bf16
16K+ sequence
TP=4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;83,996 total tokens/s
5.13 requests/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a specific benchmark point, not a universal TPU number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why requests/s may look modest
&lt;/h2&gt;

&lt;p&gt;Each request can contain thousands of tokens.&lt;/p&gt;

&lt;p&gt;For long-context indexing, total token throughput can be more useful than raw request count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multimodal serving is harder
&lt;/h2&gt;

&lt;p&gt;Qwen3-VL-Embedding combines text and image inputs. The current vLLM-TPU design chunks only the text portion of multimodal prefill, which highlights the extra complexity around visual features, pooling, and memory.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document pipeline
→ parser / chunker
→ embedding gateway
→ vLLM
   ├── TPU pool
   └── GPU fallback
→ vector database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Online query traffic should ideally use a separate low-latency pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate batch and online capacity
&lt;/h2&gt;

&lt;p&gt;Large reindexing jobs can destroy online P99 latency if they share the same accelerator queue.&lt;/p&gt;

&lt;p&gt;Use separate batch and online embedding pools with different scheduling objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  The embedding gateway should standardize
&lt;/h2&gt;

&lt;p&gt;Track model version, vector dimension, normalization, maximum length, pooling method, and hardware backend.&lt;/p&gt;

&lt;p&gt;Embedding versioning matters because different model versions produce different vector spaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use dual indexes for model upgrades
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;old model → old index
new model → new index
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run shadow traffic, compare retrieval, reindex, and then cut over.&lt;/p&gt;

&lt;p&gt;Do not mix a new query embedding with an old index blindly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is TPU always better?
&lt;/h2&gt;

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

&lt;p&gt;The decision depends on cloud platform, model support, workload shape, cost, and team expertise.&lt;/p&gt;

&lt;p&gt;The strategic value of this release is that TPU becomes a first-class vLLM serving option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics that matter
&lt;/h2&gt;

&lt;p&gt;Performance: tokens/s, requests/s, latency, queue time.&lt;/p&gt;

&lt;p&gt;Quality: cosine parity, Recall@K, top-K overlap, NDCG.&lt;/p&gt;

&lt;p&gt;Infrastructure: HBM, compile time, preemption, autoscaling.&lt;/p&gt;

&lt;p&gt;Business: retrieval success and downstream answer quality.&lt;/p&gt;

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

&lt;p&gt;The important change is not simply that Qwen3 embeddings can run on TPU.&lt;/p&gt;

&lt;p&gt;Embedding inference is becoming independent production infrastructure with requirements for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;high throughput
+ long context
+ mathematical parity
+ elastic scaling
+ reproducibility
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google’s published configuration reaches 83,996 total tokens/s and 5.13 requests/s while applying strict cross-hardware cosine thresholds.&lt;/p&gt;

&lt;p&gt;For production RAG, the key question is not “can the model run on another accelerator?” It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can the system scale and change hardware without silently changing retrieval quality?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For more RAG, embedding, vLLM, and inference-infrastructure guidance, 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/qwen3-embedding-vllm-cloud-tpu" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>embeddings</category>
      <category>qwen</category>
      <category>llm</category>
    </item>
    <item>
      <title>In the AI Coding Era, Go’s Advantage Is Verifiability</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 01:26:16 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/in-the-ai-coding-era-gos-advantage-is-verifiability-34of</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/in-the-ai-coding-era-gos-advantage-is-verifiability-34of</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;Google recently argued that AI-assisted software engineering changes what matters in a programming language. When coding agents can generate hundreds of lines in seconds, typing speed is no longer the dominant bottleneck. Reviewing, verifying, and maintaining generated code becomes more important. Go’s design aligns surprisingly well with that environment: &lt;code&gt;gofmt&lt;/code&gt;, static typing, fast compilation, &lt;code&gt;go test&lt;/code&gt;, native fuzzing, &lt;code&gt;govulncheck&lt;/code&gt;, the module checksum database and mirror, &lt;code&gt;gopls&lt;/code&gt;, and modernized &lt;code&gt;go fix&lt;/code&gt; all provide deterministic feedback loops that agents can use to self-correct. The argument is not that Go is universally better than Python, Java, or Rust. It is that high-velocity AI generation increases the value of languages and toolchains that make errors cheap to detect.&lt;/p&gt;




&lt;p&gt;Programming-language debates historically focus on how pleasant or fast code is to write.&lt;/p&gt;

&lt;p&gt;AI coding changes the economics.&lt;/p&gt;

&lt;p&gt;The cost of producing code is falling rapidly.&lt;/p&gt;

&lt;p&gt;The expensive part becomes proving that generated code is correct, secure, and maintainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generation is no longer the bottleneck
&lt;/h2&gt;

&lt;p&gt;A coding agent can quickly create:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APIs;&lt;/li&gt;
&lt;li&gt;services;&lt;/li&gt;
&lt;li&gt;tests;&lt;/li&gt;
&lt;li&gt;deployment files;&lt;/li&gt;
&lt;li&gt;documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But production teams still need to answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it compile?&lt;/li&gt;
&lt;li&gt;Are the APIs real?&lt;/li&gt;
&lt;li&gt;Are dependencies maintained?&lt;/li&gt;
&lt;li&gt;Are error paths correct?&lt;/li&gt;
&lt;li&gt;Does concurrency behave safely?&lt;/li&gt;
&lt;li&gt;Will the code remain maintainable?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new bottleneck is increasingly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generation: fast
Verification: expensive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;gofmt&lt;/code&gt; reduces review noise
&lt;/h2&gt;

&lt;p&gt;Go intentionally removes formatting choice.&lt;/p&gt;

&lt;p&gt;Human-written and AI-written code pass through the same formatter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;human code
AI code
→ gofmt
→ consistent output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sounds minor until many agents contribute to one repository.&lt;/p&gt;

&lt;p&gt;Consistency lets reviewers focus on behavior rather than stylistic drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compiler is a cheap deterministic critic
&lt;/h2&gt;

&lt;p&gt;LLMs frequently invent methods, properties, and interfaces that do not exist.&lt;/p&gt;

&lt;p&gt;In Go, many of those errors immediately fail compilation.&lt;/p&gt;

&lt;p&gt;That creates a useful loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generate
→ go build / go test
→ compiler error
→ agent fixes
→ compile again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The feedback is deterministic, fast, and does not require another LLM judge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fast compilation also affects AI cost
&lt;/h2&gt;

&lt;p&gt;An agent may iterate ten or twenty times.&lt;/p&gt;

&lt;p&gt;Each cycle includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;edit
→ validate
→ read result
→ reason again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Slower validation increases wall-clock time and can enlarge the model context and token bill.&lt;/p&gt;

&lt;p&gt;Build performance therefore becomes part of agent-task economics.&lt;/p&gt;

&lt;h2&gt;
  
  
  A strong standard library reduces dependency hallucination
&lt;/h2&gt;

&lt;p&gt;Coding agents often suggest third-party packages based on training-memory patterns.&lt;/p&gt;

&lt;p&gt;Those dependencies may be stale, renamed, abandoned, or even nonexistent.&lt;/p&gt;

&lt;p&gt;Go’s relatively comprehensive standard library lets many common server tasks avoid external packages entirely.&lt;/p&gt;

&lt;p&gt;Fewer dependencies mean fewer opportunities for supply-chain mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Module checksums matter more with autonomous dependency changes
&lt;/h2&gt;

&lt;p&gt;Go’s module checksum database and mirror provide integrity guarantees for downloaded dependencies.&lt;/p&gt;

&lt;p&gt;An agent may modify &lt;code&gt;go.mod&lt;/code&gt;, but the toolchain verifies expected module content.&lt;/p&gt;

&lt;p&gt;This does not prevent choosing a malicious dependency intentionally, but it reduces risks from silent tampering and disappearing upstream artifacts.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;govulncheck&lt;/code&gt; gives actionable vulnerability feedback
&lt;/h2&gt;

&lt;p&gt;Many scanners report every CVE in the dependency graph.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;govulncheck&lt;/code&gt; goes further by considering whether the program actually calls vulnerable symbols.&lt;/p&gt;

&lt;p&gt;That produces a more useful agent loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vulnerability
→ reachable symbol
→ upgrade or replace dependency
→ test again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lower-noise feedback is easier to automate safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing has a clear default path
&lt;/h2&gt;

&lt;p&gt;Go ships with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent does not need to reason first about which default testing framework the project should use.&lt;/p&gt;

&lt;p&gt;A consistent toolchain reduces unnecessary agent decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Native fuzzing is especially useful for AI-generated code
&lt;/h2&gt;

&lt;p&gt;Models are good at producing plausible happy paths.&lt;/p&gt;

&lt;p&gt;Boundary cases remain difficult.&lt;/p&gt;

&lt;p&gt;Go’s native fuzz support allows an agent to write a parser, generate a fuzz target, run it, observe a panic, and fix the issue.&lt;/p&gt;

&lt;p&gt;That is exactly the kind of automatic feedback loop agents need.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;gopls&lt;/code&gt; and modernizers make refactoring more deterministic
&lt;/h2&gt;

&lt;p&gt;Large language models are often asked to perform repository-wide refactors.&lt;/p&gt;

&lt;p&gt;Instead of letting the model rewrite every occurrence manually, deterministic tools can perform mechanical work.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gopls&lt;/code&gt; provides references, renames, diagnostics, and code actions.&lt;/p&gt;

&lt;p&gt;Modernized &lt;code&gt;go fix&lt;/code&gt; capabilities can upgrade older patterns using deterministic transformations.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent chooses intent
→ deterministic tool performs mechanical change
→ agent reviews diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  “AI-friendly language” needs a new definition
&lt;/h2&gt;

&lt;p&gt;Previously, AI friendliness might have meant short syntax and rapid prototyping.&lt;/p&gt;

&lt;p&gt;A more useful definition now includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI ergonomics
=
easy generation
+ easy verification
+ deterministic refactoring
+ controlled dependencies
+ consistent output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A language that is easy to generate but difficult to verify can become more expensive as agent output scales.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does this make Go universally better than Python?
&lt;/h2&gt;

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

&lt;p&gt;Python remains exceptionally strong for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data science;&lt;/li&gt;
&lt;li&gt;machine learning;&lt;/li&gt;
&lt;li&gt;research;&lt;/li&gt;
&lt;li&gt;automation;&lt;/li&gt;
&lt;li&gt;rapid prototyping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go’s advantages are strongest in long-lived production systems such as backend services, CLIs, cloud infrastructure, microservices, and agent tool servers.&lt;/p&gt;

&lt;p&gt;The relevant variable is the software lifecycle, not a universal language ranking.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete coding-agent verification loop
&lt;/h2&gt;

&lt;p&gt;Instead of prompting an agent with “write high-quality code,” give it deterministic steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. modify code
2. gofmt -w .
3. go test ./...
4. go vet ./...
5. govulncheck ./...
6. run targeted or fuzz tests on risky input paths
7. report unresolved issues and final diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For dependency changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8. go mod tidy
9. explain why each new dependency is necessary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is far more reliable than adding vague quality language to the system prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The broader lesson is deterministic feedback
&lt;/h2&gt;

&lt;p&gt;The same principle applies to other ecosystems.&lt;/p&gt;

&lt;p&gt;Java can use compiler checks, static analysis, tests, and dependency scanning.&lt;/p&gt;

&lt;p&gt;Rust can use &lt;code&gt;rustfmt&lt;/code&gt;, &lt;code&gt;clippy&lt;/code&gt;, &lt;code&gt;cargo test&lt;/code&gt;, and &lt;code&gt;cargo audit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;TypeScript can use &lt;code&gt;tsc&lt;/code&gt;, linting, tests, and lockfile security checks.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;do not ask an LLM to be the sole judge of the code it just generated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Review capacity becomes the limiting resource
&lt;/h2&gt;

&lt;p&gt;If generation becomes ten times faster while review becomes only twice as fast, repositories accumulate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;more PRs
→ reviewer fatigue
→ shallow approvals
→ more production defects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Toolchains that reduce review uncertainty therefore become increasingly valuable.&lt;/p&gt;

&lt;p&gt;Go’s deliberate simplicity and uniformity can become an advantage precisely because AI output is abundant.&lt;/p&gt;

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

&lt;p&gt;AI coding changes language economics.&lt;/p&gt;

&lt;p&gt;The key question is shifting from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How quickly can a developer write this?&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;blockquote&gt;
&lt;p&gt;How quickly can the team prove that generated code is safe and correct?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Go offers many deterministic checkpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gofmt
static types
fast compiler
go test
fuzzing
govulncheck
module checksums
gopls
go fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Models will still hallucinate and make poor architectural decisions.&lt;/p&gt;

&lt;p&gt;But when a toolchain exposes those mistakes earlier, more cheaply, and more mechanically, coding agents become easier to control.&lt;/p&gt;

&lt;p&gt;The more interesting future question is not which language AI can generate most fluently.&lt;/p&gt;

&lt;p&gt;It is which language makes AI mistakes easiest to detect.&lt;/p&gt;

&lt;p&gt;For more AI coding, Go, coding-agent, and software-engineering analysis, 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/go-ai-assisted-software-engineering" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>coding</category>
      <category>certification</category>
      <category>software</category>
    </item>
    <item>
      <title>In the AI Coding Era, Go’s Advantage Is Verifiability</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Mon, 24 Aug 2026 01:37:57 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/in-the-ai-coding-era-gos-advantage-is-verifiability-5gga</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/in-the-ai-coding-era-gos-advantage-is-verifiability-5gga</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;Google recently argued that AI-assisted software engineering changes what matters in a programming language. When coding agents can generate hundreds of lines in seconds, typing speed is no longer the dominant bottleneck. Reviewing, verifying, and maintaining generated code becomes more important. Go’s design aligns surprisingly well with that environment: &lt;code&gt;gofmt&lt;/code&gt;, static typing, fast compilation, &lt;code&gt;go test&lt;/code&gt;, native fuzzing, &lt;code&gt;govulncheck&lt;/code&gt;, the module checksum database and mirror, &lt;code&gt;gopls&lt;/code&gt;, and modernized &lt;code&gt;go fix&lt;/code&gt; all provide deterministic feedback loops that agents can use to self-correct. The argument is not that Go is universally better than Python, Java, or Rust. It is that high-velocity AI generation increases the value of languages and toolchains that make errors cheap to detect.&lt;/p&gt;




&lt;p&gt;Programming-language debates historically focus on how pleasant or fast code is to write.&lt;/p&gt;

&lt;p&gt;AI coding changes the economics.&lt;/p&gt;

&lt;p&gt;The cost of producing code is falling rapidly.&lt;/p&gt;

&lt;p&gt;The expensive part becomes proving that generated code is correct, secure, and maintainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generation is no longer the bottleneck
&lt;/h2&gt;

&lt;p&gt;A coding agent can quickly create:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APIs;&lt;/li&gt;
&lt;li&gt;services;&lt;/li&gt;
&lt;li&gt;tests;&lt;/li&gt;
&lt;li&gt;deployment files;&lt;/li&gt;
&lt;li&gt;documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But production teams still need to answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it compile?&lt;/li&gt;
&lt;li&gt;Are the APIs real?&lt;/li&gt;
&lt;li&gt;Are dependencies maintained?&lt;/li&gt;
&lt;li&gt;Are error paths correct?&lt;/li&gt;
&lt;li&gt;Does concurrency behave safely?&lt;/li&gt;
&lt;li&gt;Will the code remain maintainable?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new bottleneck is increasingly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generation: fast
Verification: expensive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;gofmt&lt;/code&gt; reduces review noise
&lt;/h2&gt;

&lt;p&gt;Go intentionally removes formatting choice.&lt;/p&gt;

&lt;p&gt;Human-written and AI-written code pass through the same formatter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;human code
AI code
→ gofmt
→ consistent output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sounds minor until many agents contribute to one repository.&lt;/p&gt;

&lt;p&gt;Consistency lets reviewers focus on behavior rather than stylistic drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compiler is a cheap deterministic critic
&lt;/h2&gt;

&lt;p&gt;LLMs frequently invent methods, properties, and interfaces that do not exist.&lt;/p&gt;

&lt;p&gt;In Go, many of those errors immediately fail compilation.&lt;/p&gt;

&lt;p&gt;That creates a useful loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generate
→ go build / go test
→ compiler error
→ agent fixes
→ compile again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The feedback is deterministic, fast, and does not require another LLM judge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fast compilation also affects AI cost
&lt;/h2&gt;

&lt;p&gt;An agent may iterate ten or twenty times.&lt;/p&gt;

&lt;p&gt;Each cycle includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;edit
→ validate
→ read result
→ reason again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Slower validation increases wall-clock time and can enlarge the model context and token bill.&lt;/p&gt;

&lt;p&gt;Build performance therefore becomes part of agent-task economics.&lt;/p&gt;

&lt;h2&gt;
  
  
  A strong standard library reduces dependency hallucination
&lt;/h2&gt;

&lt;p&gt;Coding agents often suggest third-party packages based on training-memory patterns.&lt;/p&gt;

&lt;p&gt;Those dependencies may be stale, renamed, abandoned, or even nonexistent.&lt;/p&gt;

&lt;p&gt;Go’s relatively comprehensive standard library lets many common server tasks avoid external packages entirely.&lt;/p&gt;

&lt;p&gt;Fewer dependencies mean fewer opportunities for supply-chain mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Module checksums matter more with autonomous dependency changes
&lt;/h2&gt;

&lt;p&gt;Go’s module checksum database and mirror provide integrity guarantees for downloaded dependencies.&lt;/p&gt;

&lt;p&gt;An agent may modify &lt;code&gt;go.mod&lt;/code&gt;, but the toolchain verifies expected module content.&lt;/p&gt;

&lt;p&gt;This does not prevent choosing a malicious dependency intentionally, but it reduces risks from silent tampering and disappearing upstream artifacts.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;govulncheck&lt;/code&gt; gives actionable vulnerability feedback
&lt;/h2&gt;

&lt;p&gt;Many scanners report every CVE in the dependency graph.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;govulncheck&lt;/code&gt; goes further by considering whether the program actually calls vulnerable symbols.&lt;/p&gt;

&lt;p&gt;That produces a more useful agent loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vulnerability
→ reachable symbol
→ upgrade or replace dependency
→ test again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lower-noise feedback is easier to automate safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing has a clear default path
&lt;/h2&gt;

&lt;p&gt;Go ships with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent does not need to reason first about which default testing framework the project should use.&lt;/p&gt;

&lt;p&gt;A consistent toolchain reduces unnecessary agent decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Native fuzzing is especially useful for AI-generated code
&lt;/h2&gt;

&lt;p&gt;Models are good at producing plausible happy paths.&lt;/p&gt;

&lt;p&gt;Boundary cases remain difficult.&lt;/p&gt;

&lt;p&gt;Go’s native fuzz support allows an agent to write a parser, generate a fuzz target, run it, observe a panic, and fix the issue.&lt;/p&gt;

&lt;p&gt;That is exactly the kind of automatic feedback loop agents need.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;gopls&lt;/code&gt; and modernizers make refactoring more deterministic
&lt;/h2&gt;

&lt;p&gt;Large language models are often asked to perform repository-wide refactors.&lt;/p&gt;

&lt;p&gt;Instead of letting the model rewrite every occurrence manually, deterministic tools can perform mechanical work.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gopls&lt;/code&gt; provides references, renames, diagnostics, and code actions.&lt;/p&gt;

&lt;p&gt;Modernized &lt;code&gt;go fix&lt;/code&gt; capabilities can upgrade older patterns using deterministic transformations.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent chooses intent
→ deterministic tool performs mechanical change
→ agent reviews diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  “AI-friendly language” needs a new definition
&lt;/h2&gt;

&lt;p&gt;Previously, AI friendliness might have meant short syntax and rapid prototyping.&lt;/p&gt;

&lt;p&gt;A more useful definition now includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI ergonomics
=
easy generation
+ easy verification
+ deterministic refactoring
+ controlled dependencies
+ consistent output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A language that is easy to generate but difficult to verify can become more expensive as agent output scales.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does this make Go universally better than Python?
&lt;/h2&gt;

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

&lt;p&gt;Python remains exceptionally strong for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data science;&lt;/li&gt;
&lt;li&gt;machine learning;&lt;/li&gt;
&lt;li&gt;research;&lt;/li&gt;
&lt;li&gt;automation;&lt;/li&gt;
&lt;li&gt;rapid prototyping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go’s advantages are strongest in long-lived production systems such as backend services, CLIs, cloud infrastructure, microservices, and agent tool servers.&lt;/p&gt;

&lt;p&gt;The relevant variable is the software lifecycle, not a universal language ranking.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete coding-agent verification loop
&lt;/h2&gt;

&lt;p&gt;Instead of prompting an agent with “write high-quality code,” give it deterministic steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. modify code
2. gofmt -w .
3. go test ./...
4. go vet ./...
5. govulncheck ./...
6. run targeted or fuzz tests on risky input paths
7. report unresolved issues and final diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For dependency changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8. go mod tidy
9. explain why each new dependency is necessary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is far more reliable than adding vague quality language to the system prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The broader lesson is deterministic feedback
&lt;/h2&gt;

&lt;p&gt;The same principle applies to other ecosystems.&lt;/p&gt;

&lt;p&gt;Java can use compiler checks, static analysis, tests, and dependency scanning.&lt;/p&gt;

&lt;p&gt;Rust can use &lt;code&gt;rustfmt&lt;/code&gt;, &lt;code&gt;clippy&lt;/code&gt;, &lt;code&gt;cargo test&lt;/code&gt;, and &lt;code&gt;cargo audit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;TypeScript can use &lt;code&gt;tsc&lt;/code&gt;, linting, tests, and lockfile security checks.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;do not ask an LLM to be the sole judge of the code it just generated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Review capacity becomes the limiting resource
&lt;/h2&gt;

&lt;p&gt;If generation becomes ten times faster while review becomes only twice as fast, repositories accumulate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;more PRs
→ reviewer fatigue
→ shallow approvals
→ more production defects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Toolchains that reduce review uncertainty therefore become increasingly valuable.&lt;/p&gt;

&lt;p&gt;Go’s deliberate simplicity and uniformity can become an advantage precisely because AI output is abundant.&lt;/p&gt;

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

&lt;p&gt;AI coding changes language economics.&lt;/p&gt;

&lt;p&gt;The key question is shifting from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How quickly can a developer write this?&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;blockquote&gt;
&lt;p&gt;How quickly can the team prove that generated code is safe and correct?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Go offers many deterministic checkpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gofmt
static types
fast compiler
go test
fuzzing
govulncheck
module checksums
gopls
go fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Models will still hallucinate and make poor architectural decisions.&lt;/p&gt;

&lt;p&gt;But when a toolchain exposes those mistakes earlier, more cheaply, and more mechanically, coding agents become easier to control.&lt;/p&gt;

&lt;p&gt;The more interesting future question is not which language AI can generate most fluently.&lt;/p&gt;

&lt;p&gt;It is which language makes AI mistakes easiest to detect.&lt;/p&gt;

&lt;p&gt;For more AI coding, Go, coding-agent, and software-engineering analysis, 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/go-ai-assisted-software-engineering" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>coding</category>
      <category>agentskills</category>
      <category>certification</category>
    </item>
    <item>
      <title>MCP 2026-07-28 Stateless Architecture: Scaling Agent Servers Without Sticky Sessions</title>
      <dc:creator>cheng zhang</dc:creator>
      <pubDate>Fri, 21 Aug 2026 01:51:02 +0000</pubDate>
      <link>https://dev.to/cheng_zhang_45ee857b979b0/mcp-2026-07-28-stateless-architecture-scaling-agent-servers-without-sticky-sessions-1je3</link>
      <guid>https://dev.to/cheng_zhang_45ee857b979b0/mcp-2026-07-28-stateless-architecture-scaling-agent-servers-without-sticky-sessions-1je3</guid>
      <description>&lt;h2&gt;
  
  
  Article Summary
&lt;/h2&gt;

&lt;p&gt;The 2026-07-28 Model Context Protocol release candidate introduces one of the biggest architectural changes since MCP launched: the transport core becomes stateless. Earlier HTTP MCP servers required an &lt;code&gt;initialize&lt;/code&gt; handshake and an &lt;code&gt;Mcp-Session-Id&lt;/code&gt;, forcing clients to remain attached to session state. At scale, that created sticky routing, Redis session stores, pod-failure problems, and poor serverless behavior. The new specification removes transport-level session management. Each request becomes self-describing and independent, allowing normal round-robin load balancing, transparent failover, serverless deployment, HTTP-header routing, cache controls, multi-round-trip interactions, and asynchronous tasks.&lt;/p&gt;




&lt;p&gt;MCP originally fit an environment like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;one developer
→ one local MCP server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was ideal for stdio and local integrations.&lt;/p&gt;

&lt;p&gt;Enterprise deployment is different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10,000 users
→ AI gateway
→ MCP cluster
→ many enterprise tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At that scale, transport sessions become infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the old session model was difficult
&lt;/h2&gt;

&lt;p&gt;The older HTTP design used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;initialize
→ Mcp-Session-Id
→ subsequent requests reuse session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine three Kubernetes pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod A
Pod B
Pod C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first request reaches A.&lt;/p&gt;

&lt;p&gt;The next round-robin request reaches C.&lt;/p&gt;

&lt;p&gt;If session state lives only in A, C cannot continue.&lt;/p&gt;

&lt;p&gt;The result is a session-not-found failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Traditional workarounds
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Sticky routing
&lt;/h3&gt;

&lt;p&gt;Pin a client to one pod.&lt;/p&gt;

&lt;p&gt;This hurts load balancing and failover.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shared Redis
&lt;/h3&gt;

&lt;p&gt;Store session state outside the pods.&lt;/p&gt;

&lt;p&gt;This adds network calls, latency, operational complexity, and another highly available dependency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Session-aware gateway
&lt;/h3&gt;

&lt;p&gt;Make the gateway understand protocol state.&lt;/p&gt;

&lt;p&gt;That increases coupling and complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the 2026-07-28 specification changes
&lt;/h2&gt;

&lt;p&gt;The new core removes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the initialize / initialized handshake;&lt;/li&gt;
&lt;li&gt;the logical &lt;code&gt;Mcp-Session-Id&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each request carries its own metadata.&lt;/p&gt;

&lt;p&gt;HTTP headers include values 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;MCP-Protocol-Version
Mcp-Method
Mcp-Name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request body also includes client information and capabilities in &lt;code&gt;_meta&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Any healthy server instance can process any request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architectural consequences
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Standard round robin
&lt;/h3&gt;

&lt;p&gt;Requests can go to any pod.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transparent pod failure
&lt;/h3&gt;

&lt;p&gt;A restarted container no longer destroys a transport session.&lt;/p&gt;

&lt;h3&gt;
  
  
  Serverless deployment
&lt;/h3&gt;

&lt;p&gt;MCP servers can run naturally on serverless infrastructure and scale toward zero when idle.&lt;/p&gt;

&lt;h3&gt;
  
  
  No protocol-session Redis
&lt;/h3&gt;

&lt;p&gt;Shared state may still be required for business tasks, but it is no longer required merely to maintain an MCP transport session.&lt;/p&gt;

&lt;p&gt;Google notes that major production servers such as GitHub’s MCP server have already moved away from Redis session storage under this architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTTP headers become a governance layer
&lt;/h2&gt;

&lt;p&gt;Promoting method and tool identity to HTTP headers allows gateways to perform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;routing;&lt;/li&gt;
&lt;li&gt;rate limiting;&lt;/li&gt;
&lt;li&gt;auditing;&lt;/li&gt;
&lt;li&gt;policy;&lt;/li&gt;
&lt;li&gt;metrics;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without parsing the JSON body.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mcp-Name: delete_user
→ require approval

Mcp-Name: search
→ allow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The protocol also requires header and body values to match, reducing opportunities for policy bypass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caching becomes explicit
&lt;/h2&gt;

&lt;p&gt;The new design introduces fields 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;ttlMs
cacheScope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clients can cache tool and resource lists for an explicit period rather than maintaining long-lived connections merely to detect changes.&lt;/p&gt;

&lt;p&gt;This can reduce repeated requests significantly at enterprise scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about user confirmation?
&lt;/h2&gt;

&lt;p&gt;Stateless systems still need multi-step interactions.&lt;/p&gt;

&lt;p&gt;The new Multi Round-Trip Requests pattern allows a server to return an &lt;code&gt;InputRequiredResult&lt;/code&gt; plus serialized &lt;code&gt;requestState&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The client:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;asks the user;&lt;/li&gt;
&lt;li&gt;collects the answer;&lt;/li&gt;
&lt;li&gt;resends the request;&lt;/li&gt;
&lt;li&gt;includes the original request state.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Any server instance can continue the workflow.&lt;/p&gt;

&lt;p&gt;State moves into an explicit application-level object rather than transport affinity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Long-running tasks
&lt;/h2&gt;

&lt;p&gt;A database backup or refund may take many seconds.&lt;/p&gt;

&lt;p&gt;The Tasks extension allows a tool call to return a &lt;code&gt;taskId&lt;/code&gt; immediately and execute in the background.&lt;/p&gt;

&lt;p&gt;The client can later use task primitives to retrieve status and final results.&lt;/p&gt;

&lt;p&gt;The conversation does not need to hold one connection open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stateless transport does not mean stateless business logic
&lt;/h2&gt;

&lt;p&gt;A long-running refund 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;taskId
status
result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;stored somewhere.&lt;/p&gt;

&lt;p&gt;The difference is that the datastore exists for business task state, not for protocol transport sessions.&lt;/p&gt;

&lt;p&gt;That is a cleaner architecture boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security improvements
&lt;/h2&gt;

&lt;p&gt;The specification also strengthens several security mechanisms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Issuer verification
&lt;/h3&gt;

&lt;p&gt;Clients validate authorization issuers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resource indicators
&lt;/h3&gt;

&lt;p&gt;Tokens identify the intended MCP resource server.&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Schema 2020-12
&lt;/h3&gt;

&lt;p&gt;Tool arguments can use richer schema composition and stricter validation.&lt;/p&gt;

&lt;p&gt;These changes matter more as MCP moves from local development into remote enterprise infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Formal deprecation
&lt;/h2&gt;

&lt;p&gt;The new ecosystem also introduces a predictable lifecycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Active
→ Deprecated
→ Removed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cloud observability increasingly moves toward OpenTelemetry rather than protocol-specific logging.&lt;/p&gt;

&lt;p&gt;Again, MCP is beginning to look like cloud infrastructure rather than a local integration mechanism.&lt;/p&gt;

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

&lt;p&gt;Older deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent
→ MCP gateway
→ sticky load balancer
→ MCP pod
→ Redis session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;New design:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent
→ API gateway
→ round-robin load balancer
   ├── MCP pod
   ├── MCP pod
   └── MCP pod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Long-running business task state remains separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration approach
&lt;/h2&gt;

&lt;p&gt;Do not migrate every server at once.&lt;/p&gt;

&lt;p&gt;Start with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;inventory current protocol and session dependencies;&lt;/li&gt;
&lt;li&gt;identify Redis and sticky-session assumptions;&lt;/li&gt;
&lt;li&gt;upgrade one read-only server;&lt;/li&gt;
&lt;li&gt;place it behind normal round-robin routing;&lt;/li&gt;
&lt;li&gt;test pod restarts and autoscaling;&lt;/li&gt;
&lt;li&gt;test user confirmation and long-running tasks;&lt;/li&gt;
&lt;li&gt;migrate write operations only after idempotency and approval are verified.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Beta SDK support is already appearing across major languages, but production migration should still be staged.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to measure
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;session-related errors;&lt;/li&gt;
&lt;li&gt;pod-failure impact;&lt;/li&gt;
&lt;li&gt;retry rate;&lt;/li&gt;
&lt;li&gt;long-task completion;&lt;/li&gt;
&lt;li&gt;infrastructure cost;&lt;/li&gt;
&lt;li&gt;latency;&lt;/li&gt;
&lt;li&gt;gateway policy behavior.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The strongest signal of success is that pod churn becomes invisible to clients.&lt;/p&gt;

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

&lt;p&gt;The 2026-07-28 MCP architecture is important because MCP is moving from a session-oriented integration protocol toward stateless cloud infrastructure.&lt;/p&gt;

&lt;p&gt;The practical outcomes include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;normal load balancing;&lt;/li&gt;
&lt;li&gt;no sticky sessions;&lt;/li&gt;
&lt;li&gt;easier serverless deployment;&lt;/li&gt;
&lt;li&gt;transparent failover;&lt;/li&gt;
&lt;li&gt;routable HTTP headers;&lt;/li&gt;
&lt;li&gt;better caching;&lt;/li&gt;
&lt;li&gt;asynchronous tasks;&lt;/li&gt;
&lt;li&gt;multi-round-trip interactions;&lt;/li&gt;
&lt;li&gt;clearer security boundaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If MCP remained optimized only for a developer laptop and local stdio server, it would stay a useful developer protocol.&lt;/p&gt;

&lt;p&gt;A stateless, governable, horizontally scalable remote architecture gives it a realistic path toward becoming foundational infrastructure for enterprise agents.&lt;/p&gt;

&lt;p&gt;For more practical MCP, agent architecture, AI gateway, and production engineering guidance, 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/mcp-2026-07-28-stateless-architecture" rel="noopener noreferrer"&gt;Zyentor Picks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>architecture</category>
      <category>serverless</category>
    </item>
    <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>
  </channel>
</rss>
