// 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.
syntax = "proto3";
package optimization_guide.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-intelligence-feature-protos (Google-internal link),
// and then changes will be synced with Chrome automatically.
message HistoryAnswerLoggingData {
HistoryAnswerRequest request = 1;
HistoryAnswerResponse response = 2;
HistoryAnswerQuality quality = 3;
}
// 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;
// Top passage candidates that may contain information to generate answers
// from.
repeated Passage passages = 2;
}
// 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.
// Passage.
// Next ID: 4
message Passage {
// The text of the passage.
string text = 1;
// Id of the passage.
string passage_id = 3;
reserved 2;
}
// History AQA answer response.
// Next ID: 3
message HistoryAnswerResponse {
// Answer contained in the response.
Answer answer = 1;
// Whether the request contained an unanswerable question. If true, the
// `answer` field will be invalid.
bool is_unanswerable = 2;
}
// AQA answer.
// Next ID: 4
message Answer {
// Answer text.
string text = 1;
// Answerable score.
float score = 2;
// Citations of the answer.
repeated Citation citations = 3;
}
// AQA citation.
// Next ID: 3
message Citation {
// Passage id from the request.
string passage_id = 2;
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;
// The URL of the document that the passages belong to. A single
// HistoryAnswerRequest should contain passages from a single documents.
string url = 2;
}