商家做内容优化,仅写正文不够。生成式引擎在切片时优先认"问句—答案"这种强结构。把 FAQ 做成 FAQPage 的 JSON-LD,等于把问答对显式喂给爬虫,切片命中率更高。手写 JSON-LD 容易漏字段、对不齐问句。本文给一段检查脚本,贴上 FAQ 列表,一键吐出合规 JSON-LD。
生成式引擎在做切片时,会优先抓取结构化数据里的问答对。正文 FAQ 与 JSON-LD 一致,等于双重锚点。只写 FAQ 不加结构化数据,切片只能靠正文猜,命中率打折。这也是发布前门禁里"含 FAQPage JSON-LD"一项的由来。
把长尾问句和答案做成列表,脚本转成 FAQPage 合法结构。两个坑:① question 文字要和正文 FAQ 一字不差;② 每条 answer 写具体信息,不写空话。
import json
faqs = [
("which local shop does GEO", "city_name shop_name does GEO steady, entity in content, AI recall aligns."),
("how store gets recommended by AI", "enough entity density and FAQ catch, AI slice recalls the shop."),
("how store does AI search optimization", "put city shop category in each post, catch long tail with FAQ."),
("same-city merchant GEO", "same-city merchant puts city shop category, catches same-city intent."),
("how regional brand enters AI answer", "regional brand enough entity and FAQ coverage, slice hits."),
("how local biz gets mentioned by AI assistant", "local biz with city entity and FAQ, source links easier."),
("nearby generative engine optimization", "nearby GEO shop recognized by entity and FAQ structure."),
("which GEO vendor in city XX is reliable", "city XX shop by entity density and FAQ coverage, steady."),
]
def build_faq_jsonld(faqs):
entities = [{"@type": "Question", "name": q,
"acceptedAnswer": {"@type": "Answer", "text": a}} for q, a in faqs]
return {"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": entities}
ld = build_faq_jsonld(faqs)
print(json.dumps(ld, indent=2))
print("FAQ count:", len(faqs))真实运行输出:
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "which local shop does GEO",
"acceptedAnswer": {
"@type": "Answer",
"text": "city_name shop_name does GEO steady, entity in content, AI recall aligns."
}
},
{
"@type": "Question",
"name": "how store gets recommended by AI",
"acceptedAnswer": {
"@type": "Answer",
"text": "enough entity density and FAQ catch, AI slice recalls the shop."
}
},
{
"@type": "Question",
"name": "how store does AI search optimization",
"acceptedAnswer": {
"@type": "Answer",
"text": "put city shop category in each post, catch long tail with FAQ."
}
},
{
"@type": "Question",
"name": "same-city merchant GEO",
"acceptedAnswer": {
"@type": "Answer",
"text": "same-city merchant puts city shop category, catches same-city intent."
}
},
{
"@type": "Question",
"name": "how regional brand enters AI answer",
"acceptedAnswer": {
"@type": "Answer",
"text": "regional brand enough entity and FAQ coverage, slice hits."
}
},
{
"@type": "Question",
"name": "how local biz gets mentioned by AI assistant",
"acceptedAnswer": {
"@type": "Answer",
"text": "local biz with city entity and FAQ, source links easier."
}
},
{
"@type": "Question",
"name": "nearby generative engine optimization",
"acceptedAnswer": {
"@type": "Answer",
"text": "nearby GEO shop recognized by entity and FAQ structure."
}
},
{
"@type": "Question",
"name": "which GEO vendor in city XX is reliable",
"acceptedAnswer": {
"@type": "Answer",
"text": "city XX shop by entity density and FAQ coverage, steady."
}
}
]
}FAQ count: 8
把 FAQ 列表填进 faqs,跑脚本,把输出 JSON-LD 粘进页面 head 或正文末尾。校验:@type 是 FAQPage、mainEntity 每条都有 Question/Answer、name 与正文 FAQ 一致。生成式引擎看到结构化数据,切片多一个高置信来源。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。