ppl-ai / api-discussion

Discussion forum for Perplexity API
5 stars 0 forks source link

Does perplexity API have access to internet data ? #18

Open ihateids opened 2 months ago

ihateids commented 2 months ago

It seems that perplexity API does not behave in the same way as perplexity.ai. Is it correct to assume that the API does not have access to internet data ? E.g., with perplexity.ai I am able to find actual info about a specific company or domain content. But with API, I am not. Is this something you plan to add as a feature soon, please ? It would be very valuable tool then.

Thank you M

satounity commented 2 months ago

It seems that perplexity API does not behave in the same way as perplexity.ai. Is it correct to assume that the API does not have access to internet data ? E.g., with perplexity.ai I am able to find actual info about a specific company or domain content. But with API, I am not. Is this something you plan to add as a feature soon, please ? It would be very valuable tool then.

Thank you M

llama-3.1-sonar-small-128k-online llama-3.1-sonar-large-128k-online llama-3.1-sonar-huge-128k-online

ihateids commented 2 months ago

Thank you for the models provided, however I am still struggling to get the desired output. I am using your API playground with default settings:

curl --request POST \
  --url https://api.perplexity.ai/chat/completions \
  --header 'Authorization: Bearer pplx-....' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "llama-3.1-sonar-huge-128k-online",
  "messages": [
    {
      "role": "system",
      "content": "Be precise and concise"
    },
    {
      "role": "user",
      "content": "What do you know about company with domain mall.sk ?"
    }
  ]
}'

This is the result:


{
  "id": "09ce94f8-4733-4e34-aac5-0f5a01ea0b62",
  "model": "llama-3.1-sonar-huge-128k-online",
  "created": 1725348540,
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 15,
    "total_tokens": 30
  },
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "message": {
        "role": "assistant",
        "content": "I do not have information on a company with the domain \"mall.sk\"."
      },
      "delta": {
        "role": "assistant",
        "content": ""
      }
    }
  ]
}

However, when asking the same question directly on perplexity, I am getting expected result:

image

Any idea what is wrong here, please ?

Thanks a lot. M

satounity commented 2 months ago

When I tried it, I got the following

{ "id": "c012b80f-c734-4f19-a341-8a1c58141283", "model": "llama-3.1-sonar-small-128k-online", "created": 1725352281, "usage": { "prompt_tokens": 15, "completion_tokens": 117, "total_tokens": 132 }, "object": "chat.completion", "choices": [ { "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "The domain \"mall.sk\" does not appear in the provided search results. However, based on the information available, if you are looking for details about a specific mall, you might consider The Domain in Austin, TX, which is a shopping center featuring 100 upscale and mainstream retail stores and restaurants, including Aéropostale. For more specific information about a mall with the domain \"mall.sk,\" you would need to search for that domain directly or look for specific details about a mall in Slovakia, as \"sk\" is the top-level domain for Slovakia." }, "delta": { "role": "assistant", "content": "" } } ] }

satounity commented 2 months ago

When I changed the query to the following, the answer changed.

↓↓↓ Please tell me about the company that owns the "mall.sk" domain. ↓↓↓

{ "id": "7949348f-c7b9-47ac-ac24-36f75fe30143", "model": "llama-3.1-sonar-small-128k-online", "created": 1725352748, "usage": { "prompt_tokens": 19, "completion_tokens": 88, "total_tokens": 107 }, "object": "chat.completion", "choices": [ { "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "The company that owns the \"mall.sk\" domain is part of the Allegro Group, which operates a range of e-commerce platforms across Central and Eastern Europe. Specifically, \"mall.sk\" is one of the brands under the Mall Group, which was acquired by Allegro in 2022. The Mall Group operates in several countries, including the Czech Republic, Slovakia, and Slovenia, offering e-commerce and logistics services." }, "delta": { "role": "assistant", "content": "" } } ] }

ihateids commented 2 months ago

Yes, but this is contextually quite different to what I need to get and what I am getting with perplexity.ai. So the question is, why is API not returning the company description as perplexity.ai ? I need to know what is the company doing and not who owns it. Also, the company is on the market since 2005 as also confirmed by perplexity.ai. So it is for me a questionable why it is not in result :(

ihateids commented 2 months ago

I have just tested the same query with a PRO user API key and the result is the same. So the API indeed does not reveal the same results as perplexity.ai.

d-zip commented 2 months ago

Same here using llama-3.1-sonar-small-128k-online. If I ask for direct links to a given consumer product:

Here is a hypothetical example of how you might set up your search:

- **Search Query**: "Nike shoes"
- **Website**: Use a search engine like Google to find relevant results.
ihateids commented 2 months ago

Is there any update on this topic from perplexity.ai, please ? Since I became paid subscriber just to use the API and the API does not work as expected, it would be fair to provide some insights or resolution.

Thank you M

pfjarschel commented 1 week ago

I am very new to the API, and here are my 2 cents on this issue. First, using the exact same prompt as you, I got the same results, nothing. Then I changed it to "What do you know about the company mall.sk ?", and I got something similar as we would get in the web interface, like your screenshot:

"MALL.SK is a prominent e-commerce company based in Slovakia, offering a wide range of consumer goods. Here are some key points about the company:

  1. Establishment and History:

    • MALL.SK was founded in 2005 and has since become a leading e-commerce platform in Slovakia[2][4].
    • In 2016, it became part of the MALL Group, the largest e-commerce group in Central and Eastern Europe[4].
    • As of 2022, MALL.SK is part of the Allegro Group, a rapidly growing e-commerce platform for European consumers and merchants[4].
  2. Product Range:

    • The company provides an extensive selection of products, including electronics, fashion, furniture, home appliances, sports equipment, outdoor gear, musical instruments, and large garden items like trampolines and lawn mowers[2][4].
  3. Operations and Reach:

    • MALL.SK operates primarily in Slovakia but also has a presence in other countries such as the Czech Republic, Poland, Hungary, Slovenia, and Croatia[4].
    • The company has a large logistical center in Central Europe, enabling it to offer quick and efficient delivery services[1][4].
    • Orders can be picked up at over 1,500 locations across Slovakia[4].
  4. Market Position:

    • MALL.SK is known for having one of the widest product offerings on the Slovak market, with over 1 million products available[4].
    • The company aims to be the number one shopping destination for online consumers, focusing on providing a wide selection of goods at favorable prices with convenient and fast delivery[4].
  5. Parent Company:

    • The MALL Group, which MALL.SK is part of, operates in nine countries and employs over 4,000 people, serving 130 million consumers in Central and Eastern Europe[4].
    • The Allegro Group, the parent company of MALL Group since 2022, is a leading e-commerce platform in Central and Eastern Europe, listed on the Warsaw Stock Exchange[4].

Overall, MALL.SK is a significant player in the e-commerce sector in Slovakia and Central Europe, offering a broad range of products and focusing on customer satisfaction through efficient delivery and a wide product selection.

Citations: ['https://rocketreach.co/mallsk-profile_b45ddb1efc67596f', 'https://ecommercedb.com/store/mall.sk', 'https://www.cbinsights.com/company/mallsk', 'https://www.mall.sk/o-nas', 'https://www.signalhire.com/companies/mall-sk']"

I used the huge model, by the way.