﻿# Brave spellcheck: preserve original and altered queries for exact identifiers

Track Brave spellcheck using original, altered, and cleaned query fields, and test technical identifiers before assuming a spelling rewrite preserved the task.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-brave-spellcheck-original-altered/
Language: en

## Protect the subject of the search

A support request can contain an unusual package name that resembles a common word. An automatic correction may retrieve a much richer result list for the common word while losing the actual package. The application should preserve the exact user expression and identify protected technical terms before judging whether the returned pages answer the original question.

## Record the spellcheck decision

The [Web Search reference](https://api-dashboard.search.brave.com/api-reference/web/search/get) documents `spellcheck` and says the modified query is used when correction is enabled. It exposes `query.original`, `query.altered`, and `query.cleaned`. Store these as separate observations, not successive overwrites of one search string. A normalized query and a spelling correction represent different transformations.

## Compare entities before evaluating answers

For a package name, a model suffix, or an exact error token, inspect whether the altered expression preserves the intended identifier. If not, classify the response as evidence for a different query. A plausible answer about that other subject should not count as success merely because it contains many authoritative-looking citations and a fluent explanation.

Keep a retry with explicit spellcheck policy separate from the first attempt. That makes it possible to measure whether the change restored the subject, rather than quietly combining unrelated candidates into one evidence pool. The caller's source selection should remain traceable to the query that actually produced it.

## Use exact syntax deliberately

The [operator guide](https://api-dashboard.search.brave.com/documentation/resources/search-operators) documents quoted phrases and other query modifiers, while also noting that operators are experimental. Treat an exact-phrase expression as a control to verify, not a blanket guarantee for every parser and upstream behavior. Inspect returned evidence for the identifier itself when the answer depends on it.

## Separate other retrieval controls

The [Web Search guide](https://api-dashboard.search.brave.com/documentation/services/web-search) distinguishes query operators from parameters such as language and freshness. Hold those settings constant when evaluating spellcheck. Otherwise changes in regional or temporal scope can be mistaken for an improvement caused by correction alone.

The existing guides to [exact identifiers in Russian retrieval](/journal/russian-bm25-analyzer-exact-identifiers/) and [tool observations](/journal/learn-codex-tool-observation/) complement this check. Include a genuine typo and a valid uncommon identifier in the sample. The desired outcome preserves the latter while making any correction of the former visible and reviewable.
