Some citations are missing from the llm response content

the full content i got from the api as below. i got 5 citations, but the model output only mentions [2][3][5]. i wonder if it’s a bug or i should just consider [1][4] are citations for the entire content rather than a specific sentence?

{
    "id": "5d73f356-f79a-4d09-ba41-f269e408dc27",
    "model": "sonar",
    "created": 1749008320,
    "usage":
    {
        "prompt_tokens": 6,
        "completion_tokens": 91,
        "total_tokens": 97,
        "search_context_size": "low"
    },
    "citations":
    [
        "https://www.youtube.com/shorts/jvjb114Czrg",
        "https://www.shopify.com/ph/tools/business-name-generator/sportswear",
        "https://ecomposer.io/blogs/business/sportswear-brand-name-ideas",
        "https://www.sportsdirect.com/brands",
        "https://en.wikipedia.org/wiki/Category:Sportswear_brands"
    ],
    "search_results":
    [
        {
            "title": "Guess their Answers: Name a Sportswear Brand ... - YouTube",
            "url": "https://www.youtube.com/shorts/jvjb114Czrg",
            "date": "2022-11-14"
        },
        {
            "title": "Sportswear Business Name Ideas Generator (2025) - Shopify",
            "url": "https://www.shopify.com/ph/tools/business-name-generator/sportswear",
            "date": null
        },
        {
            "title": "120+ Sportswear Brand Name Ideas For Inspiration - EComposer",
            "url": "https://ecomposer.io/blogs/business/sportswear-brand-name-ideas",
            "date": null
        },
        {
            "title": "Brands AZ - Sports Direct",
            "url": "https://www.sportsdirect.com/brands",
            "date": null
        },
        {
            "title": "Category:Sportswear brands - Wikipedia",
            "url": "https://en.wikipedia.org/wiki/Category:Sportswear_brands",
            "date": null
        }
    ],
    "object": "chat.completion",
    "choices":
    [
        {
            "index": 0,
            "finish_reason": "stop",
            "message":
            {
                "role": "assistant",
                "content": "Here are a few well-known sportswear brands:nn- **Nike**n- **Adidas**n- **Under Armour**n- **Champion**n- **Lululemon Athletica**nnAdditionally, there are lesser-known brands like **Kappa** and **Karhu**. If you're interested in starting your own brand, names like **FlexTech Athletics** or **Vigor Valor** could be considered[2][3][5]."
            },
            "delta":
            {
                "role": "assistant",
                "content": ""
            }
        }
    ]
}

Thanks for the flag! Looking into this right now. Do you mind sharing the exact query / call that you made?

hi @vikvang , i cannot provide the exact query since i didn’t log them. but i will provide as much as i can.
endpoint: /chat/completions
model: sonar
web_search_options: {search_context_size: low, user_location: IN}

obviously, the bad cases happen at a chance, and from what i can tell, regardless of country.

Hmm I would try once more! Try to add the latitude and longitude filters along with the country code. In the meantime, I’ll make sure the team looks into this!

thanks for your help! while in my use case, i can only provide country code, no lat and lon available(and those 2 are optional args).

1 Like

Thanks! Will flag this as a bug and fix.