Created on 9 May 2025, about 1 month ago

Add the ability to request:

  1. in-text citations in the summary (they appear as numbers in brackets: [1, 2])
  2. citation metadata
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia darvanen Sydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @darvanen
  • Merge request !13Add citations → (Merged) created by darvanen
  • 🇦🇺Australia darvanen Sydney, Australia

    I have added a parameter to the summary field:

        summary(
            withCitationsInText: Boolean
        ): String
    

    With that set to true your summary text will have the citations embedded in brackets like

    The Driving Test is a practical on-road test that focuses on your ability to perceive hazards and respond to them [2]. A Testing Officer assesses your driving skills, decision making, your awareness of other road users and how you share the road [1]. You will be notified of the result after the test [3]. The Driver Knowledge Test is the first step in getting your driver licence [2]. To sit the driving test and apply for your P1 licence, you'll need to pass the Hazard Perception Test first [2]. For heavy vehicle drivers, the test must be done in a vehicle appropriate to your licence type [3]. For a class MC licence, the driving test must be done in a HC vehicle type [3].

    The numbers refer to the top search results in numeric order.

  • 🇦🇺Australia darvanen Sydney, Australia

    I have also added a new citationData field. A query might look like

      query Query($query: String!) {
        vertexAiSearchQuery(query: $query) {
          summary(withCitationsInText: true),
          citationData {
            startIndex
            endIndex
            referenceIndexes
          }
        }
      }

    The citation data from the Vertex API has the capability to allocate more than one reference index to a citation so this is reflected in the query results:

  • 🇦🇺Australia darvanen Sydney, Australia

    After a chat with @nterbogt I've added proper resolvers for the citation data rather than letting it happen magically.

  • 🇦🇺Australia darvanen Sydney, Australia
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024