Research Report on JD Requirements for AI Agent Roles

English · 中文

Chinese job excerpts are quoted in the original Chinese. US and EU excerpts that were published in English stay in English.

Research date: 2026-05-02 Coverage: Mainland China plus North America / Europe. BOSS Zhipin / Lagou / 51job / Zhaopin / V2EX / Liepin / Hacker News / LinkedIn / Greenhouse / Ashby / Glassdoor / Levels.fyi Intended readers: Candidates, hiring managers, and engineers moving into AI Agent work


Executive Summary

As of May 2026, “AI Agent engineer” has moved from a 2023 buzzword to an engineering role with a clear boundary. Mainland China and the North America / Europe markets show polarization and role convergence:

Shared signals across regions: production LLM experience, Python (with TypeScript as a common #2), agent frameworks (LangGraph leads; Claude Agent SDK / OpenAI Agents SDK are rising), evaluation infrastructure, MCP (the single fastest-growing skill of 2026), and prompt/context engineering.


1. China market: full JD excerpts and hard requirements

1.1 High-frequency programming languages / frameworks / toolchains

Each item below carries the original wording plus a URL. These are not second-hand paraphrases:

  1. Yiwu, Zhejiang AI Agent Engineer (V2EX job post, 25-35K RMB/month) requires mastery of at least one mainstream agent framework and intent-level programming with Claude Code and Cursor. 「精通 LangChain、LlamaIndex、AutoGen、Dify、CrewAI 等至少一种主流 Agent 开发框架」「能驾驭 ClaudeCode、Cursor 进行意图级编程」 — https://www.v2ex.com/t/1200716

  2. Tencent Hunyuan LLM Agent development engineer (Shenzhen, 3+ years, 2025-11-28) asks for familiarity with agent frameworks such as LangChain, LangGraph, and AutoGen, and with LLM, LVM, inference, and related large-model knowledge. 「熟悉 Langchain、LangGraph、AutoGen 等 Agent 相关框架」「熟悉 LLM、LVM、推理等相关大模型知识」 — https://jobs.niuqizp.com/job-vm85LaLa5.html

  3. Hunan Linze Technology LLM application engineer (Changsha, 15-25K RMB, 3-5 years) asks for strong Python plus one of Java/Go/C++, prompt design, multi-turn dialogue management, tool/function calling, and RAG with vector databases. 「精通 Python,熟悉 Java/Go/C++ 之一」「掌握 Prompt 设计、多轮对话管理、Tool/Function Calling」「熟悉 RAG 技术与向量数据库」 — https://www.zhaopin.com/jobdetail/CC455023520J40918852615.htm

  4. A generic senior inference-engineer JD (Nowcoder compilation) asks for strong C/C++ and Python, GPU/AI-chip programming (CUDA, OpenCL, Ascend C, and similar), and mainstream LLM inference frameworks (vLLM, SGLang, TensorRT-LLM, FasterTransformer). 「熟练掌握 C/C++、Python」「熟悉 GPU/AI 芯片编程(CUDA、OpenCL、Ascend C 等)」「熟悉主流大模型推理框架(vllm、sglang、tensorrt-llm、FasterTransformer)」

  5. Ant Group AI Force AI-Agent algorithm engineer (financial scenarios, experienced hire, levels 13-15) asks for Python, Java, and the TensorFlow and PyTorch frameworks. 「掌握 Python、Java 和 TensorFlow、PyTorch 框架」 — https://blog.csdn.net/m0_59162248/article/details/149967708

  6. ByteDance Agent software architect, mobile OS (Haidian, Beijing, 70-100K RMB x 15 months, 3-5 years) asks for familiarity with AI Agent tools such as Coze and Spring AI Alibaba, and with APIs from OpenAI, Alibaba Tongyi, Doubao, and DeepSeek. 「熟悉 Coze、Spring AI Alibaba 等 AI Agent 开发工具」「熟悉 OpenAI、阿里通义、豆包、DeepSeek 等 API」 — https://www.liepin.com/job/1978252587.shtml

  7. Moonshot Kimi Agent Team internship (Beijing, 6-7K RMB/month) asks for fluent vibe coding and the ability to run experiments and analyze results independently. 「熟练使用 vibe coding,能独立完成实验与结果分析」 — https://www.superlinear.academy/c/collaborate/kimi-agent-team

  8. Zhipu AI Agent algorithm engineer / intern (Beijing) prefers candidates with experience using or training models such as ChatGLM or Llama. 「熟悉 ChatGLM 或 Llama 等模型的使用或训练经验者优先」 — https://blog.csdn.net/c9yv2cf9i06k2a9e/article/details/137574967

1.2 Domain-knowledge requirements

  1. Ant Group AI Force experienced hire claims mastery of SFT, RLHF, and RAG, with more than one year of production deployment. 「精通 SFT、RLHF、RAG 等技术,有 1 年以上落地经验」
  2. A frontline big-tech LLM algorithm role (V2EX high-pay post, 60-150K+ RMB/month) covers research on prompt engineering, instruction tuning, RAG, and agent systems. 「研究 Prompt 工程、指令微调、RAG、Agent 系统等技术」 — https://www.v2ex.com/t/1186466
  3. The same posting covers research on AI Agent architecture, multi-agent systems, RAG, and long-term memory. 「AI Agent 架构设计、多代理系统、RAG、长期记忆等技术研究」
  4. Ant Group’s financial-scenario AI-Agent algorithm role asks for integrating ASR, NLP, and TTS so the system can hold multi-turn conversations and sense risk. 「整合 ASR、NLP、TTS 技术实现多轮对话和风险感知」
  5. ByteDance Doubao LLM search-augmentation algorithm engineer asks for exploring how large models are applied in ranking, including LLM-based vector recall, relevance models, and ranking models. 「探索大模型在 Ranking 技术中的应用范式,包括 LLM-based 向量召回、相关性模型、Ranking 模型等」 — https://blog.csdn.net/c9yv2cf9i06k2a9e/article/details/145331986
  6. Tencent Hunyuan LLM evaluation algorithm researcher asks for a full-modality evaluation benchmark covering text-to-text, multimodal understanding, and generation, plus multi-dimensional metrics and an automated evaluation toolchain. 「构建覆盖文生文、多模态理解与生成的全模态评测基准,设计多维度指标并开发自动化评测工具链」 — https://www.monimianshi.com/job/51362
  7. ByteDance Agent software architect, mobile OS, asks for a multi-agent collaboration framework that connects internally and externally built agents through one standard protocol. 「设计和开发多 Agent 协同交互框架,支持使用一套标准协议接入内外部开发的 Agent」
  8. Moonshot Kimi Agent Team asks candidates to track and reproduce frontier RL and agent papers and to validate new ideas quickly. 「跟踪并复现前沿 RL & Agent 论文,快速验证创新 idea」

1.3 Engineering ability / systems ability

  1. Hunan Linze LLM application engineer asks for complex-systems development experience and WeChat mini-program or app development. 「具有复杂系统开发经验」「会微信小程序或 app 开发」
  2. The Yiwu, Zhejiang AI Agent Engineer JD asks for systems design, cloud native, containerization (Docker/K8s), and API development. 「系统设计、云原生、容器化(Docker/K8s)、API 开发」
  3. ByteDance Agent software architect, mobile OS, asks the hire to lead overall client architecture design and refactoring, including module splits, cross-client coordination, data-flow management, and multimodal fusion. 「主导客户端整体架构设计与重构,包括模块拆分、跨端协同、数据流管理、多模态融合等核心层面」
  4. Tencent Hunyuan Agent development engineer covers evaluation and labeling platforms, AI-assisted labeling, automated quality checks, and evaluation capability, continuously raising accuracy and efficiency in each scenario. 「评测/标注平台、AI 辅标、自动化质检及评测能力,持续提升各场景的准确性和效率」
  5. Ant Group PaaS agent-platform R&D expert covers PaaS agent-platform development: multi-agent orchestration, agent design, multi-agent collaboration, task planning, and tool calling. 「PaaS 智能体平台研发:多 Agent 编排、智能体设计、多智能体协作、任务规划、工具调用」

1.4 Education / experience thresholds

Company type Education Experience Notes
Top LLM algorithm roles (DeepSeek / Kimi / Zhipu / StepFun / Baichuan / MiniMax) Master’s or PhD is the norm Top-conference papers / Kaggle / ACM gold preferred DeepSeek officially says it sets no degree threshold; in practice hiring screens heavily on publications and contests
Big-tech Agent application / production engineering A bachelor’s degree is enough 3-5 years is the mainstream Tencent Hunyuan Agent: bachelor’s + 3 years; ByteDance Agent software architect: bachelor’s + 3-5 years
LLM inference / infra engineer Master’s preferred 3-7 years Strong C++/CUDA background; hands-on vLLM/SGLang
Intern Currently enrolled 6 consecutive months available Emphasizes vibe-coding ability and paper reproduction

1.5 Nice-to-haves (descending by how often they appear)

  1. First-author papers at top conferences (NeurIPS / ICML / ACL / CVPR / ICLR / KDD). Nearly every algorithm role at major LLM companies.
  2. ACM / ICPC, NOI / IOI, TopCoder, and Kaggle awards. ByteDance Doubao, StepFun, DeepSeek, and the Huawei Genius Youth track.
  3. Open-source contributions (vLLM, SGLang, LangChain, Hugging Face model repositories). Tencent Hunyuan, Alibaba Tongyi, and inference-engineer JDs.
  4. Vertical-industry experience: finance (Ant Group, Zhipu), healthcare (Baichuan), legal NLP, e-commerce search (ByteDance, Alibaba), intelligent customer service / outbound calling (Ant Group).
  5. A PhD from a top university plus a “Genius Youth” track: ByteDance offered a package of nearly 100 million RMB a year to recruit Genius Youth Chen Guanying (陈冠英) (21st Century Business Herald, 2026-04-17). Huawei’s Pangu multimodal algorithm group keeps an internal Genius Youth quota.

1.6 Pay levels (data captured 2026-05)

Level Role / company Monthly pay / package (RMB) Location Source
New-grad SSP ByteDance AIGC algorithms (outstanding) 33-36K x 15 + 50K signing bonus + 100K stock, about 550K+ Beijing / Shanghai CSDN 156735755
New-grad SSP Baidu LLM algorithms (outstanding) 40K+ x 16 + 100K stock, about 700K+ Beijing Same as above
New-grad SSP Pinduoduo search / ads / recommendation algorithms (outstanding) 40K+ x 16 + 50K signing bonus + 150K stock, about 800K+ Shanghai Same as above
New-grad SP Tencent algorithms (priority) 30-32K x 15 + 30K signing bonus, about 480-520K Shenzhen Same as above
Top PhD Big-tech AI architect 2M+ per year; a reported one-off poach near 100 million RMB Beijing 21st Century Business Herald
Senior Agent architect ByteDance Agent software architect, mobile OS 70-100K x 15 months Haidian, Beijing Liepin 1978252587
Frontline big-tech Agent Pretraining / Agent / multimodal / RL 60-150K+ per month Beijing / Shanghai V2EX 1186466
Senior Agent AI Agent expert / architect 50-80K x 18 months Beijing / Shanghai Volcengine ADG
Mid-level Agent LLM application engineer (AI Agent track) 40-70K x 18 months Shanghai Liepin
Mid-level Agent AI Agent development engineer 18-28K x 14 months — Volcengine ADG
Mid-size company Yiwu, Zhejiang AI Agent Engineer 25-35K Yiwu, Zhejiang V2EX 1200716
Mid-size company Hunan Linze LLM application engineer 15-25K Changsha Zhaopin
Prompt engineer Beijing 1959085873 15-30K x 13 months, 1-3 years Beijing Liepin (posting removed)
Intern Moonshot Kimi Agent 6-7K/month, 6 consecutive months required Beijing Superlinear
Senior PhD DeepSeek deep-learning researcher, AGI 80-110K/month, 14 months, annual package 1.54M Beijing Caixin Fund

Industry-level figures: the average monthly floor for AI roles is 47K RMB and the average ceiling is 78K RMB (Time Weekly, 2025-09; still cited as a baseline for the 2026 hiring market). For LLM algorithm roles, the new-grad median monthly pay is 24.8K RMB and the 90th percentile is 52K RMB.

1.7 How roles differ by seniority


2. North America / Europe: full JD excerpts and hard requirements

2.1 Eight real, complete JD excerpts (original text + URL, captured 2026-05-02)

JD-EN-1: Anthropic — Forward Deployed Engineer, Applied AI

URL: https://job-boards.greenhouse.io/anthropic/jobs/4985877008 Location: Boston / Chicago / NYC / Seattle / SF / Washington DC Pay: $200,000 – $300,000

“Embed directly with our most strategic customers to drive transformational AI adoption.” “Work within customer systems to build production applications with Claude models.” “Deliver technical artifacts for customers like MCP servers, sub-agents, and agent skills.” “Provide white glove deployment support for Anthropic products in enterprise environments.” “3+ years of experience in a technical, customer facing role.” “Production experience with LLMs including advanced prompt engineering, agent development, evaluation frameworks.” “Strong programming skills with proficiency in Python (and ideally in one or more additional languages).”

Travel is about 25%. There is a 25% in-office minimum. Visa sponsorship is offered.

JD-EN-2: Anthropic — Applied AI Engineer, Enterprise Tech

URL: https://job-boards.greenhouse.io/anthropic/jobs/5057647008 Location: SF / NYC / Seattle, 3 days in office per week Pay: $200,000 – $320,000

“Serve as a specialist technical advisor to Anthropic customers as they deploy new products & workflows.” “Influence technical architecture decisions and customer product strategy by developing customized pilots, prototypes, and evaluation suites.” “Lead hands-on technical workshops and code reviews with customer engineering teams.” “Create scalable public and internal assets, documenting the latest LLM prompting, evaling, agentic, and architecture techniques.”

Requirements: “Production experience with LLMs including advanced prompt engineering, agent development and frameworks, evaluation frameworks, transcript analysis, MCP, and deployment at scale.” “Strong programming skills with proficiency in Python or TypeScript.” 4+ years of experience.

JD-EN-3: Anthropic — Applied AI Engineer (London)

URL: https://job-boards.greenhouse.io/anthropic/jobs/5116274008 Pay: £225,000 – £240,000 GBP

“Production experience building LLM-powered applications, including prompting, context engineering, agent architectures.”

4+ years of experience.

JD-EN-4: Glean — Machine Learning Engineer, AI Assistant & Autonomous AI Agents

URL: https://job-boards.greenhouse.io/gleanwork/jobs/4605215005 Location: SF Bay Area, hybrid 3-4 days/week Pay: $240,000 – $300,000 base

“Build frameworks for LLM-powered agents to use tools and knowledge sources effectively.” “Invent new agentic architectures and signals to improve reasoning, planning, and personalization.” “Design and optimize reinforcement learning and fine-tuning approaches.” “Lead development of scalable evaluation, benchmarking, and optimization loops for agents.”

Requirements: 2+ years as Staff/Principal plus 5+ years in the AI/ML industry; Python / Go / Java / C++.

JD-EN-5: Replit — Senior Software Engineer, Agent Platform

URL: https://jobs.reachcapital.com/companies/replit-2/jobs/65431609-agent-platform-engineer Location: Foster City, CA hybrid (M/W/F in office) Pay: $180K – $260K + equity + bonus

“Bridging the gap between the AI team (working on the core Agent logic) and the UX team (crafting delightful Agent experiences).” “Tackling complex challenges across the full stack, from browser-based interfaces to high-performance backends to Linux systems engineering.”

Requirements: 5+ years of experience with backend services; “experience building AI-powered tooling or products”; “experience with collaborative editing technologies such as OT, CRDTs, or Git”; “experience with event sourcing systems”.

JD-EN-6: Cognition — Deployed Engineer (Devin)

URL: https://www.glassdoor.com/job-listing/deployed-engineer-cognition-JV_KO0,17_KE18,27.htm Location / pay: SF $98K-$165K / Emeryville $120K-$180K / Austin $82K-$137K / Federal SF $152K-$241K

“Deployed Engineers (DEs) are customer-facing technical experts who help customers maximize the value they get out of Devin/Windsurf.” “Work directly with engineers to understand their workflows, identify high-impact use cases, and deploy Devin/Windsurf into real production environments, leading demos and pilots, supporting integrations, and driving adoption of the Cognition platform.”

JD-EN-7: Vercel — AI Engineer

URL: https://vercel.com/careers/ai-engineer-5517523004 SF base: $192,000 – $288,000

“Sit at the intersection of machine learning, product development, and frontend engineering, working closely with product designers, ML scientists, and full-stack engineers to prototype and deploy innovative systems.”

Requirements: 5+ years of experience; strong programming in Python and JavaScript/TypeScript; experience working with or fine-tuning LLMs (OpenAI, Hugging Face); solid understanding of modern frontend (React, Tailwind).

JD-EN-8: Sierra — Software Engineer, Agent + APX (New Grad)

URL: https://jobs.ashbyhq.com/Sierra/b7d1dbcd-ca72-472f-b15e-5b4b0f886be0. APX: https://jobs.ashbyhq.com/sierra/6a75b530-b7bb-4439-bb67-37b4f2b75b96

“Agent Engineers at Sierra design and deliver production-grade AI agents that are central, mission-critical and drive revenue directly to Sierra’s growth.” “APX is an 18-month rotational program that gives new graduates in computer science or a related field the opportunity to work closely with their customers, building AI agents as both an Agent Engineer and an Agent Product Manager.”

2.2 LangChain ecosystem frequency counts (2026-04 data)

Source: https://agentic-engineering-jobs.com/langchain-job-market-2026

Skill Frequency Notes
Python 93.4% Default across the board
LangChain 34.3% All agentic roles
AWS 34.7% Cloud platform #1
Docker 32.4% DevOps baseline
GCP 29.1% Cloud platform #2
Kubernetes 27.2% Container orchestration
Azure 24.4% Cloud platform #3
LangGraph 22.1% Agent orchestration
Pinecone 18.8% Vector database #1
FastAPI 17.4% Python backend
TypeScript 17.4% Frontend / fullstack
MCP 16.9% The single fastest-growing skill of 2026
Weaviate 16.0% Vector database #2
LangSmith 8.5% Evaluation and observability

2.3 North America / Europe pay comparison (2026-05)

Company Role Base Source
Anthropic FDE Applied AI (US) $200K-$300K greenhouse.io/anthropic/jobs/4985877008
Anthropic Applied AI Engineer, Enterprise Tech (SF/NYC/Seattle) $200K-$320K greenhouse.io/anthropic/jobs/5057647008
Anthropic Applied AI Engineer (London) £225K-£240K greenhouse.io/anthropic/jobs/5116274008
OpenAI Software Engineer (median TC) $580K (top reported $1.27M) levels.fyi/companies/openai
Google DeepMind Research Engineer, Gemini Post-Training (NYC) $215K-$250K base + bonus + equity startup.jobs/research-engineer-gemini-post-training-nyc-deepmind-5964742
Glean MLE, AI Assistant + Autonomous Agents $240K-$300K greenhouse.io/gleanwork/jobs/4605215005
Vercel AI Engineer (SF) $192K-$288K vercel.com/careers/ai-engineer-5517523004
Replit Senior SWE, Agent Platform $180K-$260K + equity + bonus reachcapital.com/companies/replit-2
Cognition Deployed Engineer, SF $98K-$165K Glassdoor
Cognition Deployed Engineer, Federal SF $152K-$241K Glassdoor
Mistral Research Scientist €80K-€160K + equity eujobs.co/mistral
Industry Prompt Engineer (entry to senior) $90K to $250K+ pecollective.com/blog/prompt-engineering-salary-guide

LangChain ecosystem: the median maximum for framework-agnostic agent roles is $290K; the LangChain-only median is $210K; the Senior+ average top is $264K.


3. Top 20 recurring topics (China and overseas JDs combined)

# Skill / topic Where it shows up What it means here
1 Strong Python (including PyTorch / FastAPI) Nearly every JD Default across the board
2 Production LLM application experience (“shipped LLM apps”) Anthropic / OpenAI / Glean / HN listings A production track record
3 LangChain / LangGraph Tencent Hunyuan, ByteDance, the Yiwu JD, a listed company’s AI Native team, Hunan Linze, the Anthropic ecosystem Mainstream agent frameworks
4 RAG (vector database + retrieval augmentation) Ant Group, ByteDance, Tencent Hunyuan, Zhipu, Hunan Linze, Yiwu, Kimi, Glean, Perplexity, Harvey Extending knowledge beyond the long context window
5 Tool calling / function calling / multi-turn dialogue management Hunan Linze, Tencent Hunyuan, ByteDance Agent architect A core agent capability
6 Prompt engineering / instruction tuning Frontline big-tech high-pay posts, Zhipu, standalone prompt-engineer roles, Anthropic From prompt engineering to context engineering
7 SFT / RLHF / DPO Ant Group, Moonshot, StepFun, DeepSeek, ByteDance Doubao, Baidu, OpenAI Applied Core of the training stack
8 Multi-agent / task planning / tool-call orchestration ByteDance Agent architect, Tencent Hunyuan Agent, Ant Group PaaS, Sierra, Glean Required for complex business workflows
9 First-author top-conference papers (NeurIPS / ICML / ACL / CVPR / ICLR / KDD) ByteDance, Tencent, Alibaba, StepFun, DeepSeek, Zhipu, Kimi, DeepMind, Mistral A hard screen for algorithm roles
10 ACM / ICPC, NOI / IOI, Kaggle contest awards ByteDance, StepFun, DeepSeek, Huawei Genius Youth A plus for algorithm roles
11 Docker / K8s / cloud native / microservices The Yiwu JD, a listed company’s AI Native team, Shanghai video AIGC, Microsoft, Replit The deployment baseline
12 Vector databases (Faiss / Milvus / Chroma / Pinecone / Weaviate / Qdrant) Hunan Linze, Yiwu, Glean, RAG-heavy roles Retrieval infrastructure
13 Agent frameworks such as AutoGen / CrewAI / Dify / Coze Yiwu, ByteDance mobile OS, Tencent Hunyuan Agent The domestic ecosystem
14 Inference optimization: vLLM / SGLang / TensorRT-LLM Inference engineers, MiniMax inference optimization, HN listings Self-hosted deployment
15 Model evaluation / eval / A/B testing Tencent Hunyuan evaluation, Zhipu, Glean, Anthropic, the LangSmith team CI/CD gating
16 MCP (Model Context Protocol) Named explicitly at Anthropic, implied at Cognition, discussed on Chinese V2EX The single fastest-growing skill of 2026
17 AI coding tools: Cursor / Claude Code / vibe coding Moonshot, a listed company’s AI Native team, the Yiwu JD Engineering productivity tools
18 Vertical domains: finance / intelligent customer service / outbound calling / smart home / IoT Ant Group AI Force, Hunan Linze, Harvey (legal) Delivering into a business
19 C++ / CUDA / GPU programming Inference-engineer JDs, Huawei LLM algorithms, DeepMind Infra roles
20 Ability to read and reproduce English papers Zhipu, Kimi, StepFun, ByteDance Doubao, nearly every research role A hard requirement for algorithm roles

4. How role variants differ

4.1 Seven kinds in the China market

Role variant Core deliverable Main requirements Pay band (Beijing / Shanghai, RMB) Typical companies
LLM algorithm engineer (pretraining / post-training) The model’s own quality First-author top-conference paper + PyTorch + RLHF/SFT + experience training on a thousand GPUs New-grad SSP 500-800K annual; experienced hire 1-3M annual DeepSeek, ByteDance Doubao Seed, Alibaba Tongyi, Kimi, Zhipu, StepFun
Agent application algorithm engineer Agent-workflow quality inside a business scenario RAG + tool use + multi-agent orchestration + evaluation 35-60K x 15-18 months Tencent Hunyuan, Ant Group AI Force, Zhipu, Alibaba Qwen-Agent
LLM application / backend engineer A live service, concurrency, and availability Python/Go + LangChain + a vector database + Docker/K8s 15-35K x 13/14 months Meituan, JD.com, Hunan Linze, Yiwu mid-size firms
Prompt engineer (standalone role) Prompt templates + AIGC outputs ChatGPT/Claude experience + Excel/SQL/Python 15-30K x 13 months Small and mid-size AIGC companies; this role is shrinking fast
LLM inference optimization / infra engineer Inference latency / throughput vLLM/SGLang + CUDA + operator development 30-60K x 15 months MiniMax, Huawei Ascend, ByteDance, Alibaba AI Infra
AI coding-agent product engineer An internal line that writes code with Cursor / Claude Code Full stack + hands-on Cursor/Claude Code + 0-to-1 product sense 25-60K; some listed companies treat 3-5x efficiency as a hard metric Listed-company AI Native innovation centers; Cursor/Coze-style startups
AIGC (vision / video) engineer Image / video generation quality Diffusion + ControlNet + LoRA + ComfyUI workflows 7-25K at smaller firms; 30K+ at big tech Tencent Hunyuan AIGC, ComfyUI engineers, video AIGC startups

4.2 Six kinds in North America / Europe

Role Positioning Typical employers Pay
Research Engineer (RE) Train models / algorithm research DeepMind, OpenAI, Anthropic, Mistral $215K-$300K base + equity
Applied AI Engineer Build applications and reference architectures on top of the model Anthropic, Glean, Vercel $200K-$320K base
Forward Deployed Engineer (FDE) Embed with strategic customers for white-glove deployment Anthropic, Cognition, Palantir $200K-$300K base
Deployed / Field Engineer Sales-attached customer implementation Cognition (Devin), Cursor, LangChain $98K-$241K
MLE / Agent Platform Engineer Build agent frameworks, platforms, and evaluation infrastructure Glean, Replit, Sierra $180K-$300K base
AI Infra Engineer vLLM / inference / serving infrastructure Modal, Together AI, Replicate Tied to the company valuation

5. Overseas vs China

  1. Pay gap: Base plus equity for an Anthropic or OpenAI Agent engineer in North America commonly converts to an annual package of 2-4 million RMB. The same level at a Chinese big-tech company is 700K-2 million RMB. China’s new-grad SSP offers (Pinduoduo 800K, Baidu 700K, ByteDance 550K+) already approach same-year new-grad packages overseas at the top end.

  2. Stack differences:

  3. Degree preference:

  4. Work pattern:

  5. Going overseas / switching tracks: After Manus moved its headquarters to Singapore, 80 people were laid off in China and 40 stayed in Singapore. This is a representative 2026 case of a Chinese AI Agent startup going overseas in order to survive, and it means English communication is starting to matter for candidates.

  6. Geography and pay: The gap in base pay between Europe and the United States is 50-100%, but European benefits (healthcare, statutory PTO, parental leave) offset part of it. The visa-sponsorship rate is only 3.3% (LangChain ecosystem data).


6. Practical advice for candidates

  1. An MVP project. A working LangChain/LangGraph + RAG + tool-calling project, with GitHub commits, is already the minimum bar for an AI Agent engineer at a mid-size company. The Yiwu JD explicitly requires 「提供 GitHub ID,展示 contributions」 (provide a GitHub ID and show contributions).

  2. Algorithm track vs application track. Algorithm roles are still a dual track of top-conference papers plus Kaggle/ACM. On the application track, put evidence of 3-5x efficiency from writing code with Cursor / Claude Code on the résumé.

  3. Pay negotiation. For senior roles, anchor the ask to the 60-150K+ RMB/month range in the frontline big-tech high-pay post on V2EX 1186466. For new-grad SP/SSP, anchor the ask to the campus-recruiting tier data in CSDN 156735755.

  4. Leaving the prompt-engineer title. Standalone prompt-engineer roles are disappearing. Change the title to “LLM application engineer / Agent engineer” and add Python, a vector database, and Docker.

  5. Learn MCP early. MCP is the single fastest-growing skill of 2026. Getting ahead of it can capture the upside within 6-12 months. Anthropic’s Applied AI Engineer posting already lists MCP as a production requirement.

  6. The context-engineering trend. Watch 上下文工程 / context engineering in how roles are worded. It is still at the discussion stage on the Alibaba Cloud developer community and on Zhihu, and it is likely to become a standard phrase in JDs in the second half of 2026.

  7. An overseas path. With English communication ability, Anthropic FDE / Applied AI Engineer is currently the strongest senior opening on value: a public posting at $200K-$320K base plus equity. Cognition, Glean, Sierra, Cursor, and Replit are solid mid-stage options.


Limitations & Caveats

  1. BOSS Zhipin, Zhaopin, and Lagou job-detail pages mostly require login or are rendered dynamically. This WebFetch pass could retrieve only some of them (Hunan Linze, the prompt engineer, and similar postings). The rest were cross-checked against snippets cached by search engines.
  2. Alibaba Tongyi Lab, Baidu Wenxin, and Huawei Pangu official career pages require login or a slide-to-verify challenge. Related JDs in this report are taken from publicly reposted campus-recruiting pages and from second-hand compilations on CSDN and Zhihu. They are less reliable than the Tencent and ByteDance items that quote the original text.
  3. Top-talent programs such as JD.com TGT, Meituan Beidou, and ByteDance TopSeed do not state a specific annual salary in the public JD. They appear in the press (Cailian Press, Securities China, Huxiu) only as “a million-RMB annual salary / 2 million / 3 million.” Read those figures as reporting, not as JD text.
  4. OpenAI, the April 2026 Hacker News thread, and Sierra’s Ashby pages returned 403 or an empty body to WebFetch. Related content comes from second-hand search snippets and should be treated as reference material, not as first-party original text.
  5. LangChain ecosystem frequency data comes from a single aggregator (agentic-engineering-jobs.com). It may over-represent the share of LangChain/LangGraph relative to all agent roles. Use it as a directional reference.
  6. Manus and 01.AI have already contracted sharply or moved out. Their JDs were outside the effective capture range of this pass.

Bibliography

China market (in citation order)

  1. https://jobs.bytedance.com/experienced/position/7563248386344847621/detail — ByteDance Doubao large-language-model Agent application architect
  2. https://blog.csdn.net/c9yv2cf9i06k2a9e/article/details/145331986 — ByteDance Doubao LLM search-augmentation algorithm engineer JD
  3. https://www.liepin.com/job/1978252587.shtml — ByteDance Agent software architect, mobile OS (70-100K x 15 months)
  4. https://jobs.niuqizp.com/job-vm85LaLa5.html — Tencent Hunyuan LLM Agent development engineer (Shenzhen)
  5. https://www.monimianshi.com/job/51362 — Tencent Hunyuan LLM evaluation algorithm researcher (Beijing)
  6. https://blog.csdn.net/c9Yv2cf9I06K2A9E/article/details/135053896 — Tencent Hunyuan AIGC algorithm researcher
  7. https://blog.csdn.net/c9yv2cf9i06k2a9e/article/details/137574967 — Zhipu AI Agent algorithm engineer / intern
  8. https://www.superlinear.academy/c/collaborate/kimi-agent-team — Moonshot Kimi Agent Team
  9. https://blog.csdn.net/m0_59162248/article/details/149967708 — Ant Group AI Force AI-Agent algorithm engineer
  10. https://career.nankai.edu.cn/correcruit/content/id/99919.html — StepFun Agent algorithm engineer
  11. https://www.chnfund.com/article/AR4bb44e4e-4975-129f-48ed-3a17e29fe9bb — DeepSeek hiring for 52 roles
  12. https://www.zhaopin.com/jobdetail/CC455023520J40918852615.htm — Hunan Linze LLM application engineer
  13. https://www.v2ex.com/t/1194601 — A listed company’s AI Native frontier innovation center, 5 openings
  14. https://www.v2ex.com/t/1200716 — Yiwu, Zhejiang AI Agent Engineer
  15. https://www.v2ex.com/t/1186466 — Frontline big-tech high pay: pretraining / Agent / multimodal / RL
  16. https://www.liepin.com/job/1959085873.shtml — Prompt engineer (Beijing, 15-30K)
  17. https://blog.csdn.net/2401_85343303/article/details/156735755 — A full breakdown of 2025 big-tech campus-recruiting pay
  18. https://www.21jingji.com/article/20260417/... — ByteDance offering nearly 100 million RMB a year to poach a Genius Youth
  19. https://www.stcn.com/article/detail/2602152.html — Manus’s globalization constrained by compliance and code
  20. https://xz.chsi.com.cn/xz/zyts/202505/... — Why prompt engineers went cold (openings down 70% in 2025)

North America / Europe

  1. https://job-boards.greenhouse.io/anthropic/jobs/4985877008 — Anthropic FDE, Applied AI
  2. https://job-boards.greenhouse.io/anthropic/jobs/5057647008 — Anthropic Applied AI Engineer, Enterprise Tech
  3. https://job-boards.greenhouse.io/anthropic/jobs/5116274008 — Anthropic Applied AI Engineer, London
  4. https://openai.com/careers/research-engineer-applied-ai-engineering-san-francisco/ — OpenAI Research Engineer, Applied AI
  5. https://www.levels.fyi/companies/openai/salaries/software-engineer — OpenAI software-engineer pay
  6. https://job-boards.greenhouse.io/gleanwork/jobs/4605215005 — Glean MLE
  7. https://deepmind.google/careers/ — DeepMind careers homepage
  8. https://startup.jobs/research-engineer-gemini-post-training-nyc-deepmind-5964742 — DeepMind Gemini Post-Training, NYC
  9. https://jobs.lever.co/mistral — Mistral careers
  10. https://sierra.ai/careers — Sierra careers homepage
  11. https://jobs.ashbyhq.com/Sierra/b7d1dbcd-ca72-472f-b15e-5b4b0f886be0 — Sierra Software Engineer, Agent
  12. https://cursor.com/careers — Cursor careers homepage
  13. https://cognition.ai/ — Cognition (Devin) careers homepage
  14. https://www.glassdoor.com/job-listing/deployed-engineer-cognition-JV_KO0,17_KE18,27.htm — Cognition Deployed Engineer
  15. https://replit.com/careers — Replit careers
  16. https://jobs.reachcapital.com/companies/replit-2/jobs/65431609-agent-platform-engineer — Replit Senior SWE, Agent Platform
  17. https://vercel.com/careers/ai-engineer-5517523004 — Vercel AI Engineer
  18. https://www.langchain.com/careers — LangChain careers
  19. https://agentic-engineering-jobs.com/langchain-job-market-2026 — LangChain ecosystem analysis
  20. https://news.ycombinator.com/item?id=47601859 — HN “Who is Hiring? April 2026”
  21. https://www.kore1.com/ai-engineer-salary-guide/ — AI Engineer pay, 2026
  22. https://www.secondtalent.com/resources/most-in-demand-ai-engineering-skills-and-salary-ranges/ — Top 10 in-demand AI skills
  23. https://www.eujobs.co/career-guides/mistral-ai-career-guide — Mistral career guide
  24. https://pecollective.com/blog/prompt-engineering-salary-guide/ — Prompt engineer pay, 2026
  25. https://www.devopsschool.com/blog/agent-reliability-engineer-role-blueprint-... — Agent Reliability Engineer blueprint

Methodology Appendix


Glossary

Concepts marked [term] in the answers jump to the matching entry in this table and expand it. The table groups 60+ high-frequency terms under 10 topics and is collapsed by default — expand a term only when you don’t know it, and read the short explanation, so you are not buried in information.

Software engineering fundamentals

lint Software engineering — a static code checker that scans source for potential bugs and style problems

Analyze source without actually running it, and flag potential bugs, unused variables, style violations, and suspicious usage. Common tools:

In agent engineering, lint is often used as a hard constraint in the harness — feeding lint errors back to the model to rewrite the code is much more reliable than merely saying “please follow the coding standards” in the prompt (Augment Code calls this a Constraint Harness).

type check / type checking Software engineering — check that the types of variables, parameters, and return values match

Make sure types are consistent across assignments and function calls:

For an agent: after the agent finishes writing code, force a run of tsc --noEmit / mypy . / cargo check, and feed type errors back to the model to keep fixing. That is much more reliable than letting the agent “claim it checked the types” — a typical practice of harness engineering.

CI/CD Software engineering — continuous integration / continuous deployment pipelines

CI (Continuous Integration): on every commit, automatically run tests, builds, lint, type check, and other checks. CD (Continuous Deployment): after the checks pass, automatically deploy to test / staging / production.

Common tools: GitHub Actions, GitLab CI, Jenkins, CircleCI, Buildkite.

In agent engineering, CI is the most important deterministic feedback source — an LLM’s self-assessment is unreliable, but CI pass/fail is a 0/1 signal and can be used directly as ground truth. Hashimoto’s harness engineering stresses that whether a problem gets solved is strongly tied to whether the agent can verify its own work.

sandbox / sandbox Software engineering — an isolated code-execution environment that limits access to external resources

Run untrusted code (user uploads, LLM-generated code) in a restricted environment so it cannot damage the host. Isolation strength, from weak to strong:

An agent that runs user- or LLM-generated code must be sandboxed, with defense in depth on top: a network-egress allowlist + a read-only filesystem + time/memory quotas + no host credentials mounted.

canary / canary release Software engineering — send a small slice of traffic to the new version first, and roll out fully only after nothing looks wrong

The name comes from using canaries in coal mines to detect poison gas. A typical deploy sequence is: shadow (dual-run, do not return the result) → 1% → 5% → 25% → 50% → 100%, and each stage advances only if the core metrics show no regression.

For LLM applications, a new prompt / new model / new agent harness must go out through a canary. If any key metric (resolution rate, CSAT, refusal rate, p99 latency, cost per request) worsens past a threshold, roll back. The non-determinism of LLM applications makes canaries more important than they are for traditional software.

A/B test Software engineering — a controlled experiment that splits traffic into two groups, one on the old version and one on the new, and compares key metrics

Hash on user_id to split traffic so a given user always lands in the same bucket (avoiding a flickering experience). What to judge:

Prompt changes, model swaps, and RAG changes in an LLM application should all go through an A/B test. Shipping on offline eval alone often fails in production (the live traffic distribution differs a lot from the gold set).

GMV / UV / CSAT / NPS / conversion rate Business metrics — the north-star metrics most often used in e-commerce / travel / customer support

The metrics the business side watches most closely when deciding whether an agent should launch:

What agent engineering watches: put model / prompt / RAG changes into an A/B test and look at these business metrics, not only offline benchmark scores. It is very common for a change to raise the benchmark while GMV / CSAT fall.

HITL / human-in-the-loop Software engineering — bring a human in to review or confirm at critical decision points

Pause an autonomous agent at a critical node and wait for a human:

Design principle: “Humans steer. Agents execute.” (OpenAI Harness Engineering). An agent does not replace a person; it amplifies a person’s judgment — the person sets the plan, sets the constraints, and reviews the result, and the agent does the execution.

SLO / SLI / SLA / Error Budget Software engineering — the SRE quartet of “objective / indicator / contract / budget” for service quality

Four terms defined by Google’s SRE practice:

How to use this for an agent application:

  1. Set 1–3 SLOs per agent scenario: for example “customer-support agent resolution-rate SLO = 85%”, “p99 end-to-end latency SLO ≤ 5s”, “average cost per task SLO ≤ $0.05”
  2. Alert: warn when the live SLI drops below 80% of the SLO, and page oncall when it drops below the SLO
  3. Freeze releases: once the error budget is burned, do not merge anything that is not an emergency fix
  4. Business SLO vs technical SLO: business SLOs (conversion rate / CSAT / GMV) are product acceptance; technical SLOs (latency / error rate / cost) are the engineering backstop. Both layers are required

Rule of thumb: a stricter SLO is not automatically better — 99.99% costs 5–10× more than 99.9%, and it is likely past the threshold users can perceive. Google recommends the level that is just high enough that users don’t complain.

TTL / Time To Live Software engineering — how long data, a cache entry, or a credential stays valid

It expires automatically. Common uses:

LLM fundamentals

token LLM basics — the smallest input/output unit of an LLM, produced by a tokenizer

A rule-of-thumb conversion: 1000 English words ≈ 1300 tokens; 1000 Chinese characters ≈ 1500–2000 tokens.

Why it matters: the context window, API billing, and inference speed are all counted in tokens. Controlling the token count = controlling cost and latency. Anthropic, OpenAI, and Google each have their own tokenizer, and a ±20% difference in token count for the same text is common.

embedding LLM basics — map text or an image to a high-dimensional dense vector; semantically similar vectors sit close together

Text → a neural network → a vector of 768 / 1024 / 1536 / 3072 floating-point numbers. Vectors for synonyms or same-topic text sit close together in that space (high cosine similarity).

Main uses:

Mainstream models in 2026: OpenAI text-embedding-3-large, Cohere v4, Voyage-3, BGE-M3 (open-source SOTA; Chinese–English bilingual, combining dense / sparse / multi-vector).

context window / context window LLM basics — the token limit a model can process in one call

It includes the system prompt, conversation history, user input, and model output; all of them count. Mainstream models in 2026:

Note: the advertised window ≠ the effective window. The RULER benchmark shows that most models’ performance drops sharply beyond 1/4 of the window (Lost in the Middle). Engineering guidance sets the threshold for “what should go into context” at 8–32k; anything longer goes through RAG or hierarchical summarization.

prefill / decode LLM basics — the two phases of LLM inference: process the input, then generate token by token

The two phases have different bottlenecks, so the tuning strategies differ too — prefill is optimized with parallelism / FlashAttention, and decode is optimized with continuous batching / speculative decoding. Because the two phases have opposite characteristics, engineering also uses two kinds of scheduling optimization: PD disaggregation (Prefill/Decode Disaggregation, handling the phases on different GPU pools, as in DistServe/Mooncake) and chunked prefill (split a long prefill into chunks and interleave them with decode). See A11 for detail.

KV cache LLM basics — a cache of the K (Key) and V (Value) matrices already computed for attention

Generating token t needs the K/V of every earlier token in the attention computation. Caching them so they are not recomputed every time is the most basic optimization in LLM inference.

Memory use: 2 × num_layers × num_heads × head_dim × seq_len × batch × bytes_per_elem. On a 70B model, the KV cache for a 128k context can reach tens of GB, far more than the model weights themselves.

Further optimizations:

autoregressive / autoregressive LLM basics — generate one token at a time; the next token depends on every token before it

How GPT-style decoder-only models generate: P(x_t | x_1, ..., x_{t-1}). Every generated token runs a full forward pass (even though the KV cache can be reused), so output length directly determines latency.

By comparison: BERT is non-autoregressive (masked LM: it predicts every masked position at once), and diffusion models are also non-autoregressive (they denoise the whole span in one shot).

The cost of autoregression produced a large family of speedups: speculative decoding, parallel decoding, Medusa, EAGLE, and others.

logit LLM basics — the model’s raw unnormalized scores, one value per vocabulary token

The last decoder layer outputs a logit vector of dimension [vocab_size]; after softmax it is the probability distribution of the next token.

Places engineering can get the logits (or top-k logprobs):

Note: commercial OpenAI / Anthropic APIs return only the sampled result by default; you have to turn the logprobs option on explicitly.

temperature LLM basics — a hyperparameter that controls sampling randomness; 0 = deterministic, >1 = highly random

P(token) ∝ exp(logit / T):

Turn it up when: Self-Consistency needs diverse paths, creative writing, brainstorming. Turn it down when: code generation, math reasoning, strict formatted output, T=0.1–0.3.

Trap: T=0 is not fully identical to deterministic — non-determinism of floating-point GPU kernels plus concurrent scheduling can still leave tiny differences for the same prompt.

attention sink LLM basics — the phenomenon where the model concentrates a large share of attention on the first few tokens of the sequence

Xiao et al. 2023 found that during long-sequence inference, later tokens often assign a disproportionate share of attention to the first few tokens of the sequence (even when those tokens are semantically unrelated). Those tokens become a “sink” and absorb the normalization mass that softmax is required to distribute.

Why it matters in engineering:

Transformer architecture

LayerNorm / RMSNorm Architecture — the mainstream normalization layers in Transformers; normalize a single sample along the feature dimension

LayerNorm: y = (x - μ) / σ * g + b, mean and variance taken along the hidden dimension. Independent of the batch, so it naturally supports variable-length sequences and single-example inference — which is why Transformers use LayerNorm rather than BatchNorm.

RMSNorm (Zhang & Sennrich 2019): y = x / sqrt(mean(x²)+ε) * g, dropping the mean subtraction and the bias. Modern LLMs such as Llama, PaLM, and Mistral have almost all switched to RMSNorm, saving 7–64% of normalization time without hurting quality.

Pre-LN vs Post-LN: doing LN before the residual (Pre-LN) trains more stably than doing it after the residual (Post-LN), and warmup can be dropped. From GPT-2 onward, Pre-LN is nearly universal.

RoPE / Rotary Position Embedding Architecture — rotary position embeddings; encode position into a rotation matrix applied to Q/K

Su et al. 2021. Represent position m as a rotation matrix R_m applied to Q/K, so that <R_m·q, R_n·k> = f(q, k, m-n) — the attention score depends only on relative distance.

Advantages: (1) no extra parameters; (2) relative position is encoded naturally; (3) compatible with linear attention. It has become the position-encoding scheme of the great majority of modern LLMs, including Llama, Qwen, and Mistral.

The extrapolation problem: naive extrapolation from 2k to 32k collapses — the rotation angles of high-frequency components fall into regions never seen in training. Mitigations:

NTK-aware scaling / YaRN Architecture — RoPE length-extrapolation schemes that let a model trained at 2k run a 32k / 128k context

Naive extrapolation of RoPE collapses — the rotation angles of high-frequency components fall into regions never seen outside the training context. Two engineering schemes:

Where they are used:

Numbers from practice: YaRN is nearly lossless at a 4× context extension (2k→8k or 32k→128k); beyond 8× there is still a performance drop. Extreme long context (1M+) usually needs retraining rather than YaRN alone.

GQA / MQA Architecture — Grouped/Multi Query Attention; several Q heads share one set of K/V heads

Standard multi-head attention: each of the H heads has its own Q/K/V.

The gain: the KV cache shrinks to 1/8 ~ 1/H, inference throughput rises substantially, and quality is almost unchanged. Llama-2 70B, Llama-3, Mistral, Qwen2, and others use GQA.

MoE / Mixture of Experts Architecture — a mixture-of-experts model; each token activates only some of the expert FFNs

Replace the traditional dense FFN with N parallel expert FFNs plus a router. Each token picks the top-k experts through the router (k is usually 1–2) and only those experts are activated for the compute.

Advantage: a large parameter count with little compute. Mixtral 8x7B has 47B total parameters and only 13B activated; DeepSeek-V3 has 671B total parameters and only 37B activated. At the same inference cost, capacity far exceeds a dense model.

Challenges: (1) load balancing during training (so one or two experts are not overused); (2) memory is counted by total parameters, not activated parameters; (3) communication cost is high (expert parallelism).

multi-head attention / multi-head attention Architecture — split d_model into h independent Q/K/V projections; each head learns relations in a different subspace

Single-head attention produces one attention distribution for each pair of tokens — one “relational viewpoint”. Multiple heads (h=8/32/64/128) let the model learn several relations at once: syntactic heads attend to short-range dependencies, and semantic heads attend to coreference and long-range entities.

Why a single head with a larger dimension does not work: multi-head is a mixture of h low-rank attentions and is strictly more expressive; a single head is one high-rank attention and has fewer degrees of freedom.

A further variant: GQA / MQA drops heads on the KV side to save memory, while the Q side stays multi-head.

Inference acceleration

FlashAttention Inference acceleration — attention computed with tiling + online softmax, without materializing the full attention matrix

Dao 2022. Standard attention uses O(N²) memory (it stores an N×N attention matrix), which bottlenecks long sequences. FlashAttention loads Q/K/V in blocks into GPU SRAM for the compute and does not write out the full attention matrix. Memory drops to O(N), and it is also faster — attention is memory-bound, so reading less HBM makes it faster.

The line of work:

PagedAttention Inference acceleration — proposed by vLLM; manage the KV cache as fixed-size blocks, the way an OS manages virtual memory

Kwon et al. 2023. It addresses three kinds of fragmentation in the traditional inference KV cache:

Mechanism: cut the KV cache into fixed-size blocks (for example 16 tokens), and each sequence keeps a block table (a logical→physical mapping). Memory utilization rises from ~20% to >96%; multiple samples of the same prompt share prefix blocks; together with continuous batching, throughput is 2–4× HuggingFace TGI and 24× FasterTransformer.

vLLM Inference acceleration — UC Berkeley’s open-source high-throughput LLM inference engine, which implements PagedAttention

The de facto standard open-source inference server since 2023. Core features:

Compared with: TGI (HuggingFace), TensorRT-LLM (NVIDIA; proprietary and faster), SGLang (more thorough prefix reuse), LMDeploy (from OpenCompass).

continuous batching Inference acceleration — dynamic scheduling at token granularity; a request leaves as soon as it finishes, and a new request can join at any time

Also called in-flight batching, proposed by Yu et al., ORCA, 2022. Compared with static batching (wait until the batch is full and then run together; when short and long requests are mixed, GPU utilization is often <30%), continuous batching:

vLLM’s numbers: throughput is 5–23× static batching. It is now the default in every modern inference engine.

speculative decoding Inference acceleration — a small draft model quickly guesses K tokens, and the large model verifies them in parallel with one forward pass

Leviathan et al. 2023. The procedure:

  1. A small draft model (1–7B) autoregressively generates K tokens (K=5 is typical)
  2. The large target model (70B+) verifies K+1 positions in parallel with one forward pass
  3. The first j are accepted and the (j+1)th is rejected → keep the first j and sample one new token

Mathematically this guarantees the output distribution matches the original model exactly (rejection sampling).

When it pays off: (1) the draft and target distributions are similar (acceptance rate >60%); (2) the large model is memory-bandwidth bound, so parallel verification does not add latency. Acceptance rate is 70–90% for code generation and 30–50% for open-ended generation. Variants: EAGLE-2/3, Medusa, Llama 3.1 self-speculative.

prefix caching Inference acceleration — cache the KV cache of a shared prefix across requests and skip recomputing the prefill

The KV cache is reuse within a single request; prefix caching is reuse across requests. When many requests share a system prompt / few-shot examples / agent history, compute that KV once, cache it, and later requests hit the cache and skip prefill.

Effect: in agent / RAG / multi-turn settings, the system prompt is usually 1–4k tokens and shared by almost every request, so TTFT can drop 10–100×.

Implementations: vLLM --enable-prefix-caching, SGLang RadixAttention (a radix tree that automatically manages every historical prefix), the Anthropic prompt caching API (5-minute TTL; the cached portion is priced at 0.1×).

TTFT / Time to First Token Inference acceleration — latency from sending the request to the first token coming back

Driven mainly by prefill (processing every input token). One of the core metrics for billing and monitoring.

Ways to lower TTFT:

Companion metric: TPOT (time per output token, the gap between tokens, also called TBT/ITL) — determined by decode.

TPOT / Time Per Output Token Inference acceleration — average latency per generated token in the decode phase (also called ITL / TBT)

The other core latency metric, paired with TTFT: TTFT measures “how long until the first character appears” (determined by prefill), and TPOT measures “how fast each following character appears” (determined by decode). Perceived speed of streaming ≈ 1/TPOT (tokens/s).

Quantization

FP16 / BF16 / FP8 Quantization — low-precision floating-point formats that save memory and compute

Mixed-precision training: weights and gradients in BF16/FP16, optimizer state still in FP32.

INT4 / INT8 / NF4 Quantization — integer quantization that compresses FP16 weights to 4/8-bit integers

At deployment, quantize weights to low-bit integers and dequantize back to floating point for inference.

INT8 / INT4 quantization usually needs a calibration set (128–512 samples); AWQ is smarter (it protects the 1% salient channels). For extreme memory budgets, use GGUF (the llama.cpp format) plus 3-bit / 2-bit quantization to run on phones.

AWQ / Activation-aware Weight Quantization Quantization — INT4 weight quantization that protects the 1% salient channels

Lin et al. 2023. The core observation: protecting only ~1% of the “important weight channels” (identified by activation magnitude) is enough to hold accuracy. Scale those channels up per channel, then quantize.

Compared with GPTQ: simpler to implement, lower perplexity on Llama-2, and now the default in vLLM / TensorRT-LLM.

GPTQ Quantization — an earlier post-training 4-bit weight quantization method

Frantar 2022. Layer-wise minimization of quantization error, inspired by OBQ, with a small calibration set (128 samples). Pros: early, and the ecosystem is complete (exllama / vllm / TGI all support it). Cons: sensitive to the activation distribution; important channels can be crushed.

Deployment choices in 2026: H100/H200 → FP8; A100/3090 → AWQ INT4; phones/edge → INT4 + GGUF.

Fine-tuning and alignment

SFT / Supervised Fine-Tuning Fine-tuning — supervised fine-tuning: train the model on (prompt, response) pairs

The most basic form of instruction tuning: treat (input, desired output) pairs as supervised samples and use cross-entropy loss to teach instruction following.

Data volumes from practice:

The LIMA paper: 1000 curated samples can bring a 65B base close to GPT-4 conversation quality — quality >> quantity.

LoRA / Low-Rank Adaptation Fine-tuning — freeze the original weights and train only low-rank adapter matrices

Hu et al. 2021. Factor the weight update into two low-rank matrices ΔW = BA (r=8/16/64) and train only those matrices, cutting trainable parameters by 100–10000×.

Memory:

Advantages: few trainable parameters / multiple adapters can be hot-swapped / mitigates catastrophic forgetting.

QLoRA Fine-tuning — 4-bit quantized frozen weights plus a LoRA adapter; fine-tune a 65B model on a single 24GB GPU

Dettmers et al. 2023. Three key pieces:

  1. 4-bit NF4 quantization of the frozen weights: a 7B model shrinks from 14GB to ~4GB
  2. Double Quantization: quantize the quantization constants too, saving ~0.4 bit/param
  3. Paged Optimizer: NVIDIA unified memory; on OOM, spill to CPU

QLoRA for a 65B model is about 33GB and fits on one A100-48G or two RTX 3090s. Cost: training is 30–40% slower (dequantization overhead).

RLHF Alignment — Reinforcement Learning from Human Feedback: RL training from human preferences

Three steps: (1) SFT trains a base policy; (2) humans label (chosen, rejected) preference pairs to train a Reward Model; (3) the RM scores policy outputs, and algorithms such as PPO/RLOO/REINFORCE update the policy.

InstructGPT and ChatGPT brought RLHF into the mainstream. Three major pain points:

This produced simplifications and improvements such as DPO, GRPO, and RLVR.

RM / Reward Model Alignment — a “scoring model” trained on human preferences that scores LLM outputs

Trained in step two of RLHF. Input: (prompt, response). Output: a scalar reward. The training loss is Bradley-Terry: make the RM score chosen higher than rejected on (chosen, rejected) pairs.

Common weaknesses:

Alternatives: DPO removes the RM entirely, and RLVR uses a programmatically judged reward.

DPO / Direct Preference Optimization Alignment — a mathematical proof that you can skip the RM and optimize preferences with a supervised loss

Rafailov et al. 2023. It proves that under a Bradley-Terry preference model plus a KL constraint, the optimal policy has a closed form, so preference pairs (chosen, rejected) can be used directly as a supervised loss:

L_DPO = -log σ(β(log π(y_w)/π_ref(y_w) - log π(y_l)/π_ref(y_l)))

Advantages: (1) no RM / no online sampling / no critic; only the policy and a reference model; (2) uses the same training stack as SFT; (3) hyperparameters are stable.

Disadvantages: depends heavily on preference-data quality; easy to overfit surface patterns of the chosen answers; high reward-hacking risk.

The main post-training path for Llama-3 and Qwen2 is DPO or a variant (IPO, KTO, SimPO).

PPO / Proximal Policy Optimization Alignment — the classic RLHF algorithm: actor-critic plus a clipped objective

Schulman 2017. The actor learns the policy, the critic learns a value function to estimate advantage, and clipping limits how far the policy can move each step so it doesn’t collapse.

RLHF must load four models at once — actor / ref / critic / reward — so memory is ≥4× a single model. Hyperparameters are sensitive (KL coefficient, clip ratio, advantage normalization), and training is unstable.

This produced simplifications such as DPO (drop RL), GRPO (drop the critic), and RLOO (use mean reward as the baseline).

GRPO / Group Relative Policy Optimization Alignment — proposed by DeepSeek; drops the critic and uses the within-group mean reward as the baseline

Proposed in DeepSeek-Math 2024 and validated by R1. The core change: drop the critic (the value network). Sample G responses for the same prompt (typically G=64), normalize advantage by the within-group mean and standard deviation of the reward: A_i = (r_i - mean(r)) / std(r), then apply a PPO-like clipped objective plus KL regularization.

Effects:

RLVR / RL with Verifiable Rewards Alignment — RL with a programmatically judged 0/1 reward; no RM required

On tasks that can be checked automatically — math, code, formal logic — use a program as the reward: answer match, unit tests passing, a theorem prover verifying.

Advantages:

DeepSeek-R1 and DAPO (ByteDance’s open-source SOTA) are both in this family. Limitation: it applies only to verifiable tasks; open-ended dialogue still needs RLHF / DPO.

catastrophic forgetting / catastrophic forgetting Fine-tuning — after fine-tuning on a new task, general capability drops sharply

Mechanism: parameters are pulled by the new task’s loss, and directions that encoded general knowledge get overwritten.

A mitigation mix (recommended in production):

Advanced: EWC (Fisher-information-weighted L2 regularization), model souping (average the fine-tuned weights with the original model), and extending MoE routing.

Prompting and reasoning patterns

CoT / Chain of Thought Prompting — have the model write reasoning steps before the answer

Wei et al. 2022. The simplest form: “Let’s think step by step” (Kojima 2022 zero-shot CoT).

Why it works: (1) more effective compute (more forward steps); (2) it turns “System 1” intuitive answers into “System 2” step-by-step reasoning; (3) it exposes faulty reasoning so self-consistency voting can correct it.

It is an emergent ability and is almost useless on models under 10B. Long CoT (trained with RL in R1 / o1, including backtracking and self-verification, thousands of tokens long) is the new paradigm of 2025.

ToT / Tree of Thoughts Prompting — model reasoning as tree search: several candidates per step, plus self-evaluation and backtracking

Yao et al. 2023. CoT is a single linear chain and cannot go back once it is wrong. ToT generates several candidate thoughts at each step, the LLM self-evaluates state value (promising / sure / impossible), and BFS/DFS expansion can backtrack and prune.

On Game of 24, GPT-4 CoT scores 4% vs ToT 74%. Cost: LLM calls rise from 1 to 50–200.

Fits: solution spaces that need explicit search (puzzles, planning, theorem proving) where intermediate states can be scored. Does not fit: chitchat, summarization, translation.

ReAct Prompting — Reasoning + Acting: a think–act–observe loop

Yao et al. 2022. The structure is a Thought → Action → Observation loop: the model first writes “Thought: I need to look up X”, then outputs “Action: search[X]”, the tool result is fed back into the prompt as “Observation: …”, and the next Thought follows.

Three effects:

It is the conceptual prototype of modern agent frameworks (Claude tool use, OpenAI function calling, LangChain, AutoGPT).

Reflexion Prompting — “verbal reinforcement learning” across episodes: store the reason for failure as a lesson

Shinn et al. 2023. After a task fails (an external verifier gives a binary reward), the agent uses an LLM to summarize the cause as a natural-language lesson, stores it in episodic memory, and adds that lesson to the prompt on the next task to change behavior.

vs Self-Refine:

On HumanEval, GPT-4 with Reflexion scores 91%, above the GPT-4 baseline of 80%.

Self-Refine Prompting — iteration inside a single task: a generate → self-feedback → refine loop

Madaan et al. 2023. Loop N rounds inside one trajectory, with no external reward and no cross-task memory. Average gain of 20% across 7 tasks.

Trap: a weak model’s self-critique is inaccurate and revisions can get worse. Production often combines Self-Refine (within an episode) with Reflexion (across episodes).

self-consistency Prompting — sample N CoT traces for the same question and majority-vote the final answer

Wang et al. 2022. With temperature>0, sample N CoT paths and vote on the final answer. On GSM8K this is about 17 percentage points above greedy CoT (PaLM 55%→74%).

Pays off when: (1) the answer space is discrete (numbers, multiple choice); (2) the model’s error rate is <50%; (3) reasoning paths are diverse (temperature 0.7–1.0). Cost: N× (typically N=5–40). It does not apply to open-ended generation.

few-shot / zero-shot Prompting — whether the prompt includes examples

When to use few-shot: (1) the task format is novel or the output structure is complex (a JSON schema, a specific markdown layout); (2) a classification task has many labels.

When to use zero-shot: modern models are already saturated on general tasks (summarization, translation, QA), and adding examples can introduce bias.

Traps: example order matters a lot (recency bias); accidental regularities get learned; too many examples run into Lost in the Middle. Keep it to ≤8.

RAG

RAG / Retrieval-Augmented Generation RAG — retrieval-augmented generation: retrieve relevant documents first, then have the LLM answer from that context

The standard pipeline = Ingestion + Retrieval + Generation:

  1. Ingestion: document loader → chunking → embedding → write to the vector store
  2. Retrieval: query rewriting → embedding → vector search → reranker → top-k
  3. Generation: build the prompt (including retrieved chunks) → LLM generation → post-processing + citation

Every stage has a bottleneck: chunk size, embedding choice, insufficient recall, context order, and the model not staying faithful to the context. Production RAG ≠ “embedding + a vector store + an LLM” — it is an engineering system.

chunking RAG — split a document into small pieces suitable for embedding / retrieval

Strategies:

BM25 RAG — the classic sparse retrieval algorithm based on term frequency plus IDF

Okapi BM25. Relevance of a document to a query is Σ IDF(qi) · f(qi,d) · (k+1) / (f + k·(1-b+b·|d|/avgdl)). Strengths: exact term hits, high weight on rare terms, proper nouns, numbers. Weakness: synonyms don’t match (“医生” vs “doctor”).

It complements dense embeddings — hybrid search fuses the two, and recall is 5–15 percentage points above dense alone.

reranker / cross-encoder RAG — rescore the recalled top-N with a more accurate (and slower) model

Bi-encoder (embedding): encode the query and the doc separately, then compare by cosine. Fast, but there is no interaction. Cross-encoder (reranker): concatenate query + doc and feed them to a transformer; self-attention at every layer lets them interact. Relevance modeling is 20–40% stronger (NDCG@10), and it is 100× slower.

The production standard: bi-encoder recalls top-100 → cross-encoder reranks to top-10 → feed the LLM.

Mainstream: Cohere Rerank v3/v4, BGE-reranker-v2-m3 (open-source SOTA for Chinese and English), Jina Reranker v2, Mixedbread.

Trap: if the relevant document is not in the recalled top-100, reranking cannot save it — a reranker improves what was already recalled and cannot stand in for recall.

Choosing a mainstream embedding model RAG — how to choose among BGE-M3 / Cohere v4 / Voyage-3 / OpenAI text-3-large / Qwen3-Embedding

A 2026 comparison of mainstream embedding models:

Selection framework:

  1. Mostly Chinese → BGE-M3 / Voyage-3 / Qwen3-Embedding
  2. Multimodal → Cohere v4
  3. English-only + API → OpenAI text-3-large
  4. Self-hosted private deployment → BGE-M3

Key traps:

vector DB / vector database RAG — stores embeddings and supports approximate nearest-neighbor (ANN) search; Pinecone / Milvus / Qdrant and others

Mainstream:

ANN algorithms: HNSW (the most common), IVF, ScaNN (Google). Index time vs retrieval accuracy vs memory is a trade-off.

GraphRAG / Self-RAG / CRAG / Agentic RAG RAG — four advanced variants of naive RAG, each addressing a different weakness

Naive RAG struggles with cross-document, cross-entity reasoning, unstable recall quality, and multi-hop queries. Four common advanced schemes:

  1. GraphRAG (Microsoft 2024): use an LLM to extract entities and relations from documents, build a knowledge graph, and write hierarchical summaries by community. At query time you can both vector-search and walk the graph. It addresses incomplete recall when naive RAG reasons across many documents and entities. Cost: ingestion gets much more expensive (one LLM extraction per chunk).
  2. Self-RAG (Asai 2023): train a single LM to emit reflection tokens that decide (a) whether to retrieve, (b) whether the retrieved text is relevant, (c) whether the answer is supported by the context, and (d) overall utility. It addresses the judgment of when to retrieve and how to use what was retrieved. Requires training.
  3. CRAG (Corrective RAG, Yan 2024): a lightweight evaluator scores retrieved chunks. High scores are used directly, middling scores trigger a fresh web search, and low scores fall back to ungrounded generation. It addresses blindly using retrieved text when recall quality is uneven.
  4. Agentic RAG: the agent decides query rewriting → multi-round retrieval → division of work among sub-agents. It addresses multi-hop questions that need iterative retrieval. DeepResearch-style products are on this path.

Practical choice:

RAGAS RAG — the de facto standard for RAG evaluation; all four core metrics are implemented with an LLM-as-judge

Es et al. 2023. The four metrics:

  1. Faithfulness: whether each claim in the answer follows from the retrieved context. <0.7 = the model is making things up
  2. Context Precision: the share of the top-K that is truly relevant. Low = the retriever recalled noise
  3. Context Recall: whether the ground-truth information was all retrieved. Low = incomplete recall
  4. Answer Relevancy: whether the answer actually addresses the original question

Production thresholds: all four ≥0.7 counts as passing; if Faithfulness < 0.7, fix that first; if Context Recall < 0.7, tune the retriever.

Agent engineering

harness / harness engineering Agent — the code skeleton and engineering system wrapped around an LLM, so the agent physically cannot repeat a mistake

Named by Mitchell Hashimoto in 2026: “anytime you find an agent makes a mistake, take the time to engineer a solution such that the agent never makes that mistake again.”

This is not model fine-tuning. It is an engineered environment that makes it physically impossible for the model to fail in the same way again.

Two laws:

  1. Strong constraints: if a deterministic constraint can do it (a hard failure from lint / type check / sandbox / CI), don’t use a prompt
  2. Self-healing loop: the agent can take ground truth from the environment, evaluate itself, and resume from a checkpoint after failure

OpenAI’s formula: Agent = Model + Harness; “Humans steer. Agents execute.”

LangChain / LangGraph / LlamaIndex / Haystack Agent — mainstream frameworks for building agents and LLM applications

A comparison of mainstream frameworks, 2024–2026:

Practice: prototype by calling the SDK directly; consider LangGraph once workflow patterns (routing / parallelization / orchestrator-workers) have settled; consider LlamaIndex for pure RAG; don’t start with the LangChain “full suite”.

MCP / Model Context Protocol Agent — an open protocol from Anthropic that lets an LLM client connect to external tools and data sources through one interface

Released in 2024-11, and moved to an independent Steering Committee in 2025-Q4 (Anthropic / Block / OpenAI / Microsoft). Three core primitives:

It solves the N×M problem of “writing a new adapter for every new tool”. The single fastest-growing skill in 2026, 97M+ monthly downloads, and already an explicit requirement on the Anthropic Applied AI Engineer JD.

tool use / function calling Agent — the LLM calls external functions through a structured schema

The model outputs {"name": "search", "arguments": {"query": "..."}} JSON; the runtime parses it, actually runs the function, and feeds the result back to the model. Anthropic’s Tool Use API and OpenAI function calling are the same idea.

Design principles (Anthropic’s measurements: “agent performance is proportional to how clear the tool descriptions are”):

Computer Use / Browser Agent Agent — let the model operate a desktop GUI or a browser

Anthropic released Computer Use in 2024-Q4. The loop: screenshot → the LLM looks at the image and reasons → it outputs mouse and keyboard actions (click X,Y / type text / scroll) → the system executes them → screenshot again.

Browser Use (an open-source framework) is similar but limited to the browser, based on Playwright plus DOM augmentation (overlay numbered labels on clickable elements in the screenshot).

Useful for: automating sites with no API, automating desktop software, end-to-end e2e tests. Limits: slow, expensive, weak on security, and poor support for canvas-rendered apps. Production advice: if an API exists, use the API.

sub-agent Agent — a subtask agent dispatched by the main agent, with its own context

The main agent hands “read 30 files and research them” to a sub-agent. The sub-agent has its own context window and returns only the final summary to the main agent — the main context is not polluted by intermediate artifacts.

Claude Code’s Task tool, OpenAI Swarm, CrewAI, and others support this. It is one of the key ways to prevent a Loop of Death and a context explosion.

AGENTS.md / CLAUDE.md Agent — a project manual written for the agent, stating protocols / constraints / the startup procedure

The agent reads it automatically when it enters the project. It usually contains:

Hashimoto’s view: each line of AGENTS.md ≈ one mistake sealed off. It is the implicit-prompt form of harness engineering.

deny-first Agent — deny every tool and command by default; only an explicit allowlist permits them

The permission model Claude Code uses. Bash commands are authorized at verb + path granularity:

The matching security principle: if any one layer fails, the others still catch it. Combine it with a sandbox, a network-egress allowlist, and a read-only filesystem for defense in depth.

progress file / progress.md Agent — persist agent task progress to a file so a later session can resume

A core design from Anthropic’s Effective Harnesses: a long-running agent will inevitably blow the context window, and LLM context alone cannot remember “which step I am on”.

The fix:

The next session runs the 5-step startup protocol and resumes from the breakpoint. Core insight: the context window is “working memory”; the filesystem is “long-term memory”.

Loop of Death Agent — the agent enters an infinite loop and burns tokens until they run out

Common patterns:

Defense in depth:

  1. A hard max iteration (5–30 steps)
  2. An execution timeout (5–30 minutes)
  3. A token budget (a per-task hard cap)
  4. Progress detection (force-stop after N consecutive steps with no diff)
  5. Repeated-failure detection (break out after the same tool call fails 3 times)
  6. Cost alerts + HITL
Memory Corruption / memory pollution Agent — a false fact enters long-term memory and then contaminates every later decision

Example: a user jokes “I’m a billionaire”, it is stored in semantic memory, and the agent reasons from that assumption from then on.

Defenses:

Evaluation and safety

Trace + eval tool stack Evaluation — observability platforms such as Langfuse / LangSmith / Phoenix / Helicone / Patronus

“Full-trace plus evaluation” tools for LLM apps and agents. Mainstream in 2026:

Capabilities to line up:

  1. Trace: prompt → tool_call → response → cost / latency strung into one complete trace
  2. Prompt versioning: each prompt change gets a hash, and the dashboard can switch and compare them
  3. Eval: run the gold set in CI and alert on regressions
  4. Cost and cache hit rate: cost per trace, and the distribution of cache hits
  5. User feedback / thumbs up-down: attach it directly to the trace and file bad cases

How to choose: prefer Langfuse if you self-host; LangSmith for heavy LangChain users; Phoenix for trace monitoring alone; Patronus for safety / real-time blocking.

Mainstream LLM eval benchmarks Evaluation — what MMLU / MT-Bench / Chatbot Arena / HumanEval / LiveBench / BFCL each measure

Grouped by the capability being measured:

In practice: from a 2026 point of view, no single benchmark is trustworthy anymore — you need three layers: cross-checking several benchmarks, your own gold set, and blind human votes on Arena. See E11 and H3.

Eval / Evaluation Evaluation — the “scoring” stage of an LLM app or agent: three layers of evaluation, offline / online / CI

Eval for an LLM or agent application is not a single action; it is a system. Common layers:

How the eval tool stack splits:

  1. General frameworks: OpenAI Evals, DeepEval, Promptfoo, Inspect AI — run evals as a CLI or a library
  2. Built into observability platforms: Langfuse / LangSmith / Phoenix all ship an eval framework tied to traces
  3. RAG-specific: RAGAS (four dimensions, including faithfulness / context relevancy)
  4. Tool-use-specific: BFCL (Berkeley Function-Calling Leaderboard)
  5. Domain-specific: each team’s own gold set plus an LLM-judge rubric

Eval types by how they score:

Rules of thumb: (1) changing a prompt with no eval is changing it blind; (2) the eval model must be ≥ the model being evaluated (the judge principle); (3) the gold set must be versioned and private; (4) every bad case must be regressed into the gold set — the harness-engineering closed loop.

LLM-as-judge Evaluation — use a strong LLM to score candidate outputs in place of human evaluation

Model “evaluation” as an LLM task: the judge model reads (prompt, response) and outputs a 0–1 score / pass/fail / which side wins pairwise. It parallelizes at large scale, is cheap, and can be automated in CI.

Three major biases:

The judge principle: the judge model’s capability should be ≥ the model being evaluated, or it cannot tell what is good about a stronger model’s answer. The production standard is three layers: your own gold set + an LLM judge + human calibration.

Lost in the Middle Evaluation — in long-context QA, accuracy drops sharply when the key information sits in the middle

The Liu et al. 2023 experiment: put the gold passage at the start or the end of the prompt and accuracy is high; put it in the middle and accuracy falls in a U-shape. With 10+ documents, the middle position can score below a no-context baseline.

Engineering mitigations:

prompt injection Safety — user input or external content hijacks the model’s behavior and bypasses the system prompt

It is #1 on the OWASP LLM Top 10. Types:

Simon Willison’s conclusion: prompt injection has no 100% solution, and the system must be designed on the assumption that “the LLM is untrusted”. The dual-LLM pattern = a Planner (sees trusted input and decides) + an Executor (sees untrusted input but has no tool permissions).

hallucination / hallucination Evaluation — the model generates content that looks plausible but is actually wrong

Sources:

Debug flow: reproduce it and quantify the trigger rate → attribute the cause (RAG recall / whether the model used the context / tool calls) → fix → add a regression → production monitoring (a faithfulness scorer blocks in real time).

Key point: most hallucinations are defects in the prompt / RAG / context engineering, not “the model is sick”.

guardrails Safety — safety rails around each stage of an LLM: input, output, tools, and dialogue

NVIDIA NeMo Guardrails defines 5 kinds:

  1. Input rails: PII redaction, prompt injection detection, topic limits
  2. Dialog rails: control the dialogue flow with the Colang DSL and hard-code critical decision points
  3. Retrieval rails: drop low-quality / sensitive / untrusted chunks
  4. Execution rails: parameter allowlists and authorization checks before a tool call
  5. Output rails: hallucination detection / filtering leaked sensitive data / toxicity filtering

Key point: more rails are not automatically better. Turn on 1–2 high-ROI rails per kind, or latency and cost explode.

jailbreak / jailbreak Safety — bypass the model’s safety training so it outputs harmful content

Common techniques:

Defense: the vendor’s RLHF safety training + application-layer input/output classifiers (Llama Guard) + a cap on max context (against many-shot) + regular red-team exercises.