Add note about competitor indices validation in gap analysis

This commit is contained in:
ajaysi
2026-03-01 23:08:30 +05:30
parent 77088bfc53
commit 212538c406

View File

@@ -203,6 +203,13 @@ class StrategyArchitectAgent(SIFBaseAgent):
)
return []
# FIX: Ensure we correctly map indices to documents if indices were passed as integers
# The filter allowed_competitor_ids uses str(idx) but if competitor_indices contained
# positional indices instead of IDs, we might have filtered everything out.
# In this implementation, we assume competitor_indices are doc IDs.
# If they are positional, we need a way to map them.
# For now, we trust the caller passed IDs.
competitor_topics = self._extract_topic_density(competitor_docs)
user_topics = self._extract_topic_density(user_docs)