We are in the process of migrating our application from using AssistantsAPI to ResponsesAPI. When using the file_seach tool with ResponsesAPI, the relevant output looks like the following:
{
“type”: “response.output_item.done”,
“sequence_number”: 8,
“output_index”: 1,
“item”: {
“id”: “fs_id”,
“type”: “file_search_call”,
“status”: “completed”,
“queries”: [
“query1”,
“query2”,
],
“results”: [
{
“attributes”: {},
“file_id”: “file_id”,
“filename”: “filename.pdf”,
“score”: 0.6731,
“text”: “chunk text”,
“vector_store_id”: “vs_id”
},
{
“type”: “response.output_text.annotation.added”,
“sequence_number”: 656,
“item_id”: “item_id”,
“output_index”: 3,
“content_index”: 0,
“annotation_index”: 18,
“annotation”: {
“type”: “file_citation”,
“file_id”: “file_id”,
“filename”: “filename.pdf”,
“index”: 3320
}
}
“type”: “response.content_part.done”,
“sequence_number”: 711,
“item_id”: “item_id”,
“output_index”: 3,
“content_index”: 0,
“part”: {
“type”: “output_text”,
“annotations”: [
{
“type”: “file_citation”,
“file_id”: “file_id”,
“filename”: “filename.pdf”,
“index”: 438
},]
This does not allow tying back an annotation to a specific chunk, only to a specific file. We’d like to expose to our users the specific chunk that was used to answer the question, not just the file. In AssistantsAPI this is a functionality we had, and we’d like to keep it the same. Is there a configuration setting or something else we’re missing or is this simply not possible with ResponsesAPI?