-
Ranking position of the product
-
Frequency of the product
-
Sentiment analysis of description
-
Subquery generation for queries
-
Authority Score (from SerpApi)
Add these to your .env file:
OPENAI_API_KEY= GEMINI_API_KEY= OPENROUTER_API_KEY= Used Model : https://openrouter.ai/nvidia/nemotron-nano-12b-v2-vl:free SERPAPI_API_KEY= OPENPAGERANK_API_KEY= https://www.domcop.com/openpagerank/auth/signup
You can copy the placeholders from .env.example.
This is basically having 3 llm where a user gives query or multiple queries and then those 3 llm makes 4 subqueries each in unified list and then we attempt 3 times on each query and subquery across those 3 llms
This process those responses in the "llm_responses.json" and generates
This generates authority scores for websites mentioned across the web using the SERPAPI_API_KEY.
Calculates the rank frequency score by normalizing it in
It basically Can extract a specific brand from the "llm_responses.json"
It can generate sentiments for llm response made for giving sentimental analaysis for file "extract_specific_brand_queries.py"
This calculates sentimental analysis and there avg for each brand, avg is affected by sample size more "positive sample" dominates the case
Combines output from "rank_frequency_summary.csv" and "brand_sentiment_analysis.json" and authorative score from "source_authority.py" and calculates visbility score using this by formula
merged["visibility_score"] = 100 * (
(w1 * merged["rank_freq_score_norm"]) +
(w2 * merged["sentiment_norm"]) +
(w3 * merged["authority_norm"])
) * merged["freq_ratio"]
# weights
w1, w2, w3 = 0.5, 0.3, 0.2
# w1 is for RF value
# w2 is for Sentiment value
# w3 is for Authority value