知识卡片
约束解码限制的是可生成串
有限标签、正则或CFG可限制允许输出的字符串形式,提高与软件接口的相容性。但约束过窄可能排除正确答案,合法语言也可能包含错误内容;应明确无法满足时如何返回缺失或拒绝。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 按任务适配模型
原书出处 · 1 处
- · 查看原书依据
Control output format using context-free grammars (CFG) A CFG defines the rules that generated strings need to follow. For more background on CFGs, refer to Aditya’s blog. Using CFGs, we can use LLMs to more effectively solve sequence tagging tasks like NER or part-of-speech tagging. Exercise Named entity recognition (NER) is a sequence tagging task that tags named entities in text like numbers, dates, places,
参考来源
- 位置:《Designing Large Language Model Applications》第05章《按任务适配模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Designing Large Language Model Applications/_epub-src/OEBPS/ch05.html)
- 结论依据:摘录中关于约束解码限制的是可生成串的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:Control output format using context-free grammars (CFG) A CFG defines the rules that generated strings need to follow. For more background on CFGs, refer to Aditya’s blog. Using CFGs, we can use LLMs to more effectively solve sequence tagging tasks like NER or part-of-speech tagging. Exercise Named entity recognition (NER) is a sequence tagging task that tags named entities in text like numbers, dates, places,