Vespa 响应:汇总数据不完整:等待汇总数据超时

Vespa response: Summary data is incomplete: Timed out waiting for summary data

我正在使用 Vespa 部署一个简单的文本检索系统。但是,我发现将 topk 设置为某个较大的数字时,例如40,响应将包含错误消息“摘要数据不完整:等待摘要数据超时。”以及一些意外的 ID。该系统适用于一些小的 topk,如 10。响应如下:

{'root': {'id': 'toplevel', 'relevance': 1.0, 'fields': {'totalCount': 1983140}, 'coverage': {'coverage': 19, 'documents': 4053984, 'degraded': {'match-phase': False, 'timeout': True, 'adaptive-timeout': False, 'non-ideal-state': False}, 'full': False, 'nodes': 1, 'results': 1, 'resultsFull': 0}, 'errors': [{'code': 12, 'summary': 'Timed out', 'message': 'Summary data is incomplete: Timed out waiting for summary data. 1 responses outstanding.'}], 'children': [{'id': 'index:square_datastore_content/0/34b46b2e96fc0aa18ed4941b', 'relevance': 44.44359956427316, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/16dbc34c5e77684cd6f554fd', 'relevance': 43.94371735208669, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/9f2fd93f6d74e88f96d7014f', 'relevance': 43.298002713993384, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/76c4e3ee15dc684a78938a9d', 'relevance': 40.908658368905485, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/c04ceee4b9085a4d041d8c81', 'relevance': 36.13561898237115, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/13806c518392ae7b80ab4e4c', 'relevance': 35.688377118163714, 'source': 'square_datastore_content'}, {'id': 'index:square_datastore_content/0/87e0f13fdef1a1c404d3c8c6', 'relevance': 34.74150232183567, 'source': 'square_datastore_content'}, ...]}}

我正在使用架构:

schema wiki {
document wiki {
    field title type string {
        indexing: summary | index
        index: enable-bm25
    }
    field text type string {
        indexing: summary | index
        index: enable-bm25
    }
    field id type long {
        indexing: summary | attribute
    }
    field dpr_embedding type tensor<bfloat16>(x[769]) {
        indexing: attribute | index
        attribute {
            distance-metric: euclidean
        }
    }
}
fieldset default {
    fields: title, text
}
rank-profile bm25 inherits default {
    first-phase {
        expression: bm25(title) + bm25(text)
    }
}
rank-profile dpr inherits default {
    first-phase {
        expression: closeness(dpr_embedding)
    }
}}

BM25 和 DPR 密集检索均出现此错误。那有什么问题呢?我能做什么?谢谢

默认的 Vespa 超时为 500 毫秒,可以通过 &timeout=x 进行调整,其中 x 以秒为单位给出,例如 &timeout=2 将使用 2 秒的整体请求超时。

查询在两个协议阶段执行:

  1. 找到给定 query/ranking 配置文件组合的前 k 个匹配项,每个节点 returns 最多 k 个结果
  2. 无状态容器合并结果,最后请求汇总数据(例如只有前k个结果的内容)

请参阅 https://docs.vespa.ai/en/performance/sizing-search.html 了解对此的解释。

在你的情况下,你遇到了两件事

  1. 内容节点软超时(据报道覆盖率仅为 19%),因此在 500 毫秒的默认超时内它可以检索和排名 19% 的可用内容。在 500 毫秒减去一个因素时,它超时并返回它检索到的内容并排名最高。
  2. 当尝试使用剩余时间时,它也在等待它设法检索到的那些文档的命中数据并在软超时内排名时超时,这是不完整的摘要数据响应。

一般来说,如果您想要便宜的 BM25 搜索,请使用 WAND (https://docs.vespa.ai/en/using-wand-with-vespa.html) If you want to search using embeddings, use ANN instead of brute force NN. We also have a complete sample application reproducing the DPR (Dense Passage Retrieval) here https://github.com/vespa-engine/sample-apps/tree/master/dense-passage-retrieval-with-ann