Top
Enterprise Postgres 18 Knowledge DataManagement FeatureUser's Guide

3.12.1 Overview of Hybrid Search Tuning

The accuracy of search processing can be calculated by preparing pairs of query conditions for evaluation and correct answers (for example, the search results that should be returned for that query) and comparing the results searched with those query conditions to the correct answers. The result obtained from hybrid search is only the final search result. Since we cannot know what the search results of individual subqueries were, their search accuracy cannot be calculated. Therefore, to calculate the search accuracy of subqueries, we use hybrid search trace information. Trace information is a record of the executed hybrid search, including the search conditions and search results of each subquery executed internally. The search accuracy can be calculated from the subquery search results included in the trace information. The accuracy of hybrid search using trace information can be calculated in the following two ways:

  1. Obtain the search results of each subquery recorded as traces and calculate using external evaluation tools.

  2. Calculate search accuracy within the database by inputting evaluation results for each text chunk that is a search result into the database.

When evaluating the entire system, such as RAG-based applications, it is appropriate to use method a., which utilizes external evaluation tools. On the other hand, if you want to analyze the accuracy of individual subqueries or text chunks in detail without using tools, method b., which calculates accuracy within the database, is recommended.

Below are the steps for each method.

For basic ideas on the evaluation of knowledge data search, refer to "3.13.6 Evaluation of Knowledge Data Search".