1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
edition = "2023";
package optimization_guide.proto;
import "components/optimization_guide/proto/model_quality_metadata.proto";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.optimization_guide.features.proto";
option java_outer_classname = "HistoryAnswerProto";
// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please refer to
// http://go/chrome-mqls-onboarding (Google-internal link), and then changes will
// be synced with Chrome automatically.
// Protos for the AiData representing the History AQA inference flow. The
// request contains the user query and top candidate passages, and
// the response contains the answer and citations.
// Next ID: 6
message HistoryAnswerLoggingData {
HistoryAnswerRequest request = 1 [features = { field_presence: EXPLICIT }];
HistoryAnswerResponse response = 2 [features = { field_presence: EXPLICIT }];
HistoryAnswerQuality quality = 3 [features = { field_presence: EXPLICIT }];
ModelExecutionInfo model_execution_info = 4 [features = { field_presence: EXPLICIT }];
reserved 5;
}
// The History AQA request contains a query and top candidate passages.
// Next ID: 3
message HistoryAnswerRequest {
// The history search query entered by the user.
string query = 1 [features = { field_presence: EXPLICIT }];
// Top passage candidates that may contain information to generate answers
// from.
repeated Passage passages = 2;
}
// Passage.
// Next ID: 4
message Passage {
// The text of the passage.
string text = 1 [features = { field_presence: EXPLICIT }];
// Id of the passage.
string passage_id = 3 [features = { field_presence: EXPLICIT }];
reserved 2;
}
// History AQA answer response.
// Next ID: 3
message HistoryAnswerResponse {
// Answer contained in the response.
Answer answer = 1 [features = { field_presence: EXPLICIT }];
// Whether the request contained an unanswerable question. If true, the
// `answer` field will be invalid.
bool is_unanswerable = 2 [features = { field_presence: EXPLICIT }];
}
// AQA answer.
// Next ID: 4
message Answer {
// Answer text.
string text = 1 [features = { field_presence: EXPLICIT }];
// Answerable score.
float score = 2 [features = { field_presence: EXPLICIT }];
// Citations of the answer.
repeated Citation citations = 3;
}
// AQA citation.
// Next ID: 3
message Citation {
// Passage id from the request.
string passage_id = 2 [features = { field_presence: EXPLICIT }];
reserved 1;
}
// Next ID: 3
message HistoryAnswerQuality {
// The session id of the user query. Use this to join with HistoryAnswer
// and HistoryQueryQuality protos from the same session.
string session_id = 1 [features = { field_presence: EXPLICIT }];
// The URL of the document that the passages belong to. A single
// HistoryAnswerRequest should contain passages from a single documents.
string url = 2 [features = { field_presence: EXPLICIT }];
}
|