2026 开发者调查:代理的信任问题,本质是引用问题
Stack Overflow 在 2026 年 10 月 6 日发布了第十六份开发者调查:超过 3 万份回复,覆盖 169 个国家。AI 相关的数字是所有人都在引的那几个,但真正有意思的不是大小而是形状。采用率基本饱和——66% 用编码助手或代理,63% 用通用聊天工具,26.2% 在跑自动化代理工作流,只有 17.2% 完全不用 AI。信任则远未饱和:接近一半的人「能验证就信任」,只有 6.6% 愿意把重要决策交给 AI,78.7% 认为在评估 AI 生成的代码或技术答案时,来源标注重要或非常重要。把这三个放在一起读,你得到的是一个设计要求,而不是一种情绪。
桌面上摊开的调查分析图表与笔记
一、采用率饱和,信任是有条件的
Stack Overflow 的说法是:过去那种「用的人越来越多、信任越来越低」的落差,变成了有条件的接受。对一个真正在干活的团队来说,这比热情或犬儒都更贴切。它也告诉你该建什么:不是更强的使用限制,而是贴在每个输出上的廉价验证。两个数字锚住整套论证。使用编码助手或代理的受访者里,73% 每天都在用;在每日 AI 用户中,31% 每天投入四小时以上。你定下的「我们这里怎么用代理」,会被行使几个小时,而不是几分钟——所以少一个引用这种小摩擦会累积。
from dataclasses import dataclass, field
import datetime as dt
@dataclass
class Claim:
text: str
source_url: str = ""
source_title: str = ""
fetched_at: dt.datetime | None = None
kind: str = "doc" # doc | repo | issue | spec | runtime
def check(self) -> list[str]:
problems = []
if not self.source_url.startswith("http"):
problems.append("no source url")
if not self.source_title.strip():
problems.append("no source title")
if self.kind in ("doc", "spec") and self.fetched_at is None:
problems.append("no fetch time for a versioned source")
return problems
def enforce(claims: list[Claim], allow_uncited: int = 0) -> None:
bad = [(c.text[:60], c.check()) for c in claims if c.check()]
if len(bad) > allow_uncited:
for text, problems in bad:
print("REJECT:", text, problems)
raise ValueError("%d uncited claims" % len(bad))
# 78.7% of respondents call source attribution important or very important,
# and the survey blog quotes 93% on requiring attribution to trust output.
# If your agent output cannot carry a URL, it is not an answer yet.二、AI 在哪里有用,在哪里没用
有用性的坡度很陡,而且沿着代码走。74% 认为 AI 对实现有用或非常有用,66% 对调试或重构有用,然后在面向人的工作上塌下来:设计 50%,团队沟通 45%。行为数据从另一个角度说同一件事:67% 用 AI 在熟悉的领域生成代码,61% 用来调试,只有 20% 用来部署、运维或排查生产系统。这不是技术恐惧,而是知道一次糟糕的生产变更有多贵的人做出的风险判断。把代理的权限按数据来设计,而不是按演示来设计。
# The survey's sharpest split: 67% use AI to generate code in familiar areas,
# 61% to debug, and only 20% to deploy, operate or troubleshoot production.
# Encode that split instead of arguing about it in code review.
TASK_POLICY = {
# task kind agent may propose human must approve agent may execute
"codegen_familiar": (True, False, True),
"debug_local": (True, False, True),
"test_generation": (True, False, True),
"dependency_upgrade": (True, True, False),
"schema_migration": (True, True, False),
"ci_config": (True, True, False),
"production_deploy": (True, True, False),
"production_troubleshoot":(True, True, False),
}
def guard(kind: str, action: str, approved_by: str | None = None):
propose, needs_human, can_execute = TASK_POLICY[kind]
if action == "execute" and not can_execute:
if not approved_by:
raise PermissionError("%s requires an approving human" % kind)
return True三、治理的缺口比模型的缺口更大
30% 的受访者说公司的 AI 使用是可选的、由个人决定,只有 24% 说他们的组织发布了获批工具清单或官方 AI 政策。工具已经装遍了每台机器,规则只装进了不到四分之一的组织。如果你就是写规则的那个人,这是你的机会,而且它不是一份文档,而是一小撮写在代码里的默认值:哪些任务代理可以直接执行,哪些必须有人批,哪些直接拒绝。调查里那个 20% 的生产数字就是一条不错的起始策略:可以提议,不许执行。
import json, time
import urllib.request
class Budget:
"""Quality first, but stop when the meter says stop.
The survey found 75% of developers optimise for quality over cost (38%)
when picking models and writing prompts, while 38% of organisations cap
usage and 28% review spend. Both are reasonable; neither works without a
number to look at.
"""
def __init__(self, tokens_per_day: int):
self.limit = tokens_per_day
self.used = 0
def charge(self, prompt_tokens: int, completion_tokens: int) -> None:
self.used += prompt_tokens + completion_tokens
if self.used > self.limit:
raise RuntimeError("daily agent budget exhausted: %d/%d"
% (self.used, self.limit))
def report(self) -> dict:
return {"used": self.used, "limit": self.limit,
"pct": round(100 * self.used / self.limit, 1)}
# Route by task, not by habit: cheap model for classification and summaries,
# strong model for architecture and multi-file edits. Then log which route ran,
# because the cost review the survey describes is impossible without it.四、质量优先,直到账单来了
开发者为质量优化:在被问到怎么写提示词、怎么选模型时,75% 说质量,38% 说成本。而他们的组织已经开始用唯一能活过季度评审的语言表达不同意见——38% 设置了使用上限,28% 审阅过支出数据,27% 对不同工作用不同模型,25% 限制了谁能用 AI。两个立场都站得住,而且都离不开可见性。现实的解法是路由加记账:分类和摘要用便宜模型,多文件改动用强模型,并按路由记录 token 与结果,这样成本讨论才是在讨论哪条路由赚回了成本。
# verifiability.py — score an answer on how checkable it is,
# then refuse to show low-scoring answers without a warning.
import re
CITATION = re.compile(r"https?://[^\s)]+")
VAGUE = re.compile(r"\b(should|generally|typically|it depends|best practice)\b", re.I)
def score(answer: str, min_citations: int = 2) -> dict:
text = answer or ""
cites = CITATION.findall(text)
hedges = len(VAGUE.findall(text))
words = len(text.split())
return {
"citations": len(cites),
"hedges_per_100w": round(100 * hedges / max(words, 1), 1),
"has_example": bool(re.search(r"```|\bfor example\b|\be\.g\.", text)),
"verdict": "ok" if len(cites) >= min_citations else "needs_sources",
}
# Use it as a gate on anything that will be pasted into a doc or a ticket:
# two citations, one concrete example, hedges under control. It is a blunt
# instrument and it moves the argument from taste to a threshold.五、让验证成为默认,而不是美德
我一直回到那个 6.6%。接近一半的人愿意信任能被验证的 AI,几乎没人愿意把重要决策交出去。这是一群校准得很好的人。它意味着提升团队信任最快的方式不是换个更好的模型,而是把验证成本降下来。每个答案两条引用、一个可运行的例子;一个能打开的链接;任何带版本的来源都附抓取时间;一份评审三十秒能扫完的 diff。这些都不光鲜,但它把讨论从「我信不信这个代理」变成「引用还活着吗」。
# route.py — one function that decides model and context budget by task,
# and logs the decision so the next cost review has data instead of anecdotes.
import time, json
ROUTES = {
"classify": {"model": "small", "max_context": 8_000, "needs_citations": False},
"summarize": {"model": "small", "max_context": 32_000, "needs_citations": True},
"codegen": {"model": "strong", "max_context": 128_000, "needs_citations": False},
"refactor": {"model": "strong", "max_context": 128_000, "needs_citations": False},
"answer_doc": {"model": "strong", "max_context": 64_000, "needs_citations": True},
}
def route(task: str, tokens_in: int, run):
cfg = ROUTES[task]
if tokens_in > cfg["max_context"]:
raise ValueError("%s exceeds %d token context" % (task, cfg["max_context"]))
t0 = time.time()
out = run(cfg["model"])
record = {"task": task, "model": cfg["model"], "tokens_in": tokens_in,
"ms": int((time.time() - t0) * 1000),
"citations": out.count("http"), "cites_required": cfg["needs_citations"]}
print(json.dumps(record)) # ship this line to your log store
return out
# The survey says 27% of organisations already use different models for different
# work. The ones that can defend it are the ones that log which route ran.六、读完这份调查我会改的四件事
第一,写下任务策略——第二段代码里那八行足够引发一场真实的争论,而真实的争论本身就是进展。第二,给每个进入文档或工单的代理输出加一个引用字段,并让表单拒绝空值。第三,在有人要求成本评审之前,先把按路由的 token 记账做上,因为等到评审时才补更糟。第四,盯住调查里那个指向工作组织方式真实变化、却容易被忽略的数字:把自己描述为「一个人的组织」的开发者从 4% 升到了 10%。你未来的同事里会有更多人是独自带着代理干活,他们需要的不是一份政策文档,而是一套能用的默认值。
团队围坐一起评审工作
使用量与成本指标看板
📌 常见问题 FAQ
2026 年 Stack Overflow 开发者调查在 AI 采用方面发现了什么?
66% 的受访者使用编码助手或编码代理,63% 使用通用聊天工具,26.2% 在跑自动化代理工作流。只有 17.2% 表示完全不用 AI 工具。
开发者对 AI 输出的信任度如何?
接近一半的人愿意信任能被验证的 AI,但只有 6.6% 准备把重要决策交给它。78.7% 表示在评估 AI 生成的代码或技术答案时,来源标注重要或非常重要。
AI 在哪里被认为最有用?
74% 认为它对实现有用或非常有用,66% 认为对调试或重构有用,设计降到 50%,团队沟通降到 45%。行为上,67% 用于在熟悉领域生成代码,61% 用于调试,20% 用于部署、运维或排查生产。
调查对治理怎么说?
30% 表示公司的 AI 使用是可选的、交给个人决定;只有 24% 表示组织发布了获批工具或官方 AI 政策/指南。
开发者用 AI 时更看重成本还是质量?
质量:在写提示词和选模型时,75% 优先质量,38% 优先成本。与此同时组织在施加控制——38% 设置使用上限,28% 审阅支出数据,27% 对不同工作用不同模型,25% 限制使用权限。