Back to Algolia in Google Sheets
SheetXAI logo
Algolia logo
Algolia · Google Sheets Guide

Audit Algolia Search Relevance by Comparing Top Queries to Their Top Hits

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a search product manager. Your company's Algolia index powers a product search with 50,000 daily searches. Leadership wants to know: for the top 50 most-searched queries, is Algolia actually returning the right product first?

You have a separate sheet with the "expected top hit" for each of your top queries, compiled by the merchandising team. You need to compare expected versus actual top hit, query by query, and flag any mismatches.

The audit is due by end of week. You have never called Algolia's analytics or search APIs directly.

The bad version:

  • You search for each of the 50 queries manually in the Algolia dashboard
  • You note the first result for each one
  • You compare them to the expected list in the sheet by hand
  • By query 20 you are not sure you are reading the right result
  • A colleague asks you to add revenue data for each query
  • You restart from scratch

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that can pull Algolia top search queries with their top hit objectIDs and compare them against an expected list, all in one prompt.

Open the SheetXAI sidebar and type:

Fetch the top 50 search queries from my Algolia index 'products' for the last 30 days. For each query, retrieve the objectID of the top-ranked result. Write query to column A, actual top-hit objectID to column B, and click count to column C. Then compare column B against the expected top-hit objectIDs in column E and mark any mismatch with "MISMATCH" in column D.

SheetXAI pulls the analytics data, runs a search for each query to get the live top hit, writes the comparison, and flags mismatches in column D.

What You Get

A relevance audit ready for review:

  • Column A — the search query, as searched
  • Column B — the objectID Algolia actually returns first
  • Column C — total click count for that query over 30 days
  • Column D — "MISMATCH" where actual top hit does not match expected
  • All 50 queries covered — without a single manual search

The mismatch count is your relevance score. If 8 of 50 top queries are returning the wrong product first, that is an 84% relevance rate, and you know exactly which 8 to investigate.

What If the Data Is Not Quite Ready

Relevance audits often surface more questions than they answer. SheetXAI can do the follow-up in the same session.

When the expected top hits were set months ago and some products are now out of stock

You want to exclude out-of-stock products from the "expected" column before running the comparison.

Before comparing, check column E against the Products sheet. If an expected objectID belongs to a product where Status is "out of stock," clear that cell and write "OOS" in column F. Then run the top-hit audit for the remaining rows.

When you want to add revenue data per query

Your stakeholder wants to see which top queries are also the biggest revenue drivers.

Fetch the top 50 search queries from my Algolia index 'products' for the last 30 days alongside their top hits and total revenue. Write query, top-hit objectID, click count, and revenue to columns A through D, sorted by revenue descending.

When you want to audit relevance at the category level

Instead of 50 individual queries, you want to know which product categories have the worst relevance.

Fetch the top 100 search queries from my Algolia index 'products' for the last 30 days with their top-hit objectIDs. Look up each top-hit objectID in the Products sheet to find its category. Group the results by category and write category, average query count, and mismatch rate per category to columns A through C in a new sheet called Category Audit.

When you want the full pipeline: pull top queries, check top hits, flag mismatches, and draft a relevance report

The search team needs a written summary they can paste into the weekly update.

Fetch the top 50 search queries from my Algolia index 'products' for the last 30 days. For each, get the actual top hit objectID and compare it to the expected objectID in column E. Write the full comparison to columns A through D. Then write a plain-text summary in cell A55 describing how many queries matched, how many mismatched, and which three mismatched queries had the highest click counts.

The pattern: pull the data, compare it to what you expected, and draft the writeup in one pass. The audit takes one prompt instead of an afternoon.

Try It

Get the 7-day free trial of SheetXAI and open your expected-results sheet, then ask it to run the relevance audit against Algolia. The Algolia integration is included in every SheetXAI plan. For related workflows, see how to pull full search analytics or the Algolia in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more