Repository navigation
fix(citations): report not_measurable when the provider returns no sources and the brand is not mentioned - #781
Merged
Conversation
…urces and the brand is not mentioned For every provider except Perplexity the check cannot see sources, so "no citation" is not an observation. With no brand mention either, the verdict was "invisible", which reads as a measured absence. It is now "not_measurable". The existing verdicts keep their names and meaning.
…s no sources geo citations printed "never cites" for mentioned_only from every provider. Only providers that return sources (Perplexity, serpbase) can show that. For the others the text now says the brand is named and that citations cannot be checked.
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. D10 decided by the owner: the new
not_measurableverdict is approved; keep it as a draft PR.What changes
geo citationsandPOST /api/citations: when the provider returns no sources (every provider except Perplexity) and the answers do not mention the brand either, the verdict is nownot_measurableinstead ofinvisible.Without sources the check cannot tell "not cited" from "sources not available" (
source_observation_statusis alreadynot_supportedfor these providers since #761).invisibleread as a measured absence.strong,cited,mentioned_only,invisible) keep their names and meaning. Perplexity still givesinvisible.mentioned_onlykeeps its name; second commit: its CLI text no longer says "never cites" when the provider returns no sources (only Perplexity and serpbase can show that).stableflag uses the same rule.Not in this PR
The first half of the handoff item (the
(?!\.\w)guard on the platform-name match) is already onmain:utils/brand_match.pyapplies it to every brand match (7efa0c2), with teststests/test_brand_match.py:24andtests/test_citations.py:70forgeoready.app. No commit was needed.Impact on the platform (read-only check)
frontend/src/components/CitationCheckContent.tsxmaps verdicts to text; an unknown one shows "—" / "No verdict for this check." (no crash). It only calls Perplexity today, so it never receivesnot_measurable.frontend/src/lib/api.ts:1375typesverdictas a closed union: add"not_measurable"when the platform adopts this engine version.backend/services/one_shot_service.py:175copiesverdictthrough as a string.Tests
tests/test_citations.py::TestProviderWithoutSources(no mention + no sources, mention + no sources, Perplexity stillinvisible, CLI tables). Two of them fail without the change.ruff checkandruff format --checkclean on the touched files.CHANGELOG.md.