You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure OpenAI自定义数据调用中citations与doc标识映射问题咨询

Azure OpenAI自定义数据响应中引用标识与文件路径的映射关系

以你提供的响应内容为例:

content内容:

I have a pear [doc1][doc2]. I have an apple [doc1][doc3].

citations字段内容:

citations[0].filepath == 'file1.pdf'
citations[1].filepath == 'file2.pdf'
citations[2].filepath == 'file1.pdf'
citations[3].filepath == 'file3.pdf'
citations[4].filepath == 'file4.pdf'

两者的映射规则如下:

  • content中的[docN]标识按出现顺序与citations数组的元素一一对应:
    • 第一个[doc1] → citations[0].filepath(file1.pdf)
    • [doc2] → citations[1].filepath(file2.pdf)
    • 第二个[doc1] → citations[2].filepath(file1.pdf)
    • [doc3] → citations[3].filepath(file3.pdf)
  • citations数组中超出content引用数量的条目(比如这里的citations[4]),是模型检索到但最终未在回答内容里引用的数据源,不会在content中生成对应的[docN]标识。

内容的提问来源于stack exchange,提问作者John Tan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 06:34:53