Skip to content

fix: improve snapshot competitor extraction#194

Merged
arberx merged 1 commit intomainfrom
fix/snapshot-competitor-extraction
Mar 30, 2026
Merged

fix: improve snapshot competitor extraction#194
arberx merged 1 commit intomainfrom
fix/snapshot-competitor-extraction

Conversation

@arberx
Copy link
Copy Markdown
Member

@arberx arberx commented Mar 30, 2026

Fixes #193

Changes

  1. Increased answer text clip limit from 420 to 2,000 characters. Provider responses are typically 1,500–7,000 chars, and competitor names appear throughout. The analysis LLM was seeing truncated text and couldn't extract competitor names.

  2. Strengthened batch analysis prompt to emphasize competitor extraction as the most critical field. Added explicit instructions to extract every company/brand name recommended in the response.

  3. Increased per-assessment competitor limit from 6 to 10 to accommodate responses that list many alternatives.

Root Cause

The snapshot report was returning empty recommendedCompetitors arrays despite provider responses containing multiple named competitors. Two factors:

  • 420-char clip meant the analysis LLM couldn't see competitor names
  • The prompt didn't emphasize competitor extraction strongly enough

Testing

  • All 693 tests pass
  • Typecheck clean
  • Lint clean

- Increase answer text clip limit from 420 to 2000 chars so analysis
  LLM can see competitor names in full responses
- Strengthen batch analysis prompt to emphasize competitor extraction
  as the most critical field
- Increase per-assessment competitor limit from 6 to 10
@arberx arberx merged commit e7f53c7 into main Mar 30, 2026
2 checks passed
@arberx arberx deleted the fix/snapshot-competitor-extraction branch March 30, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

snapshot: competitor extraction returns empty arrays

1 participant