Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.63k stars 3.77k forks source link

Enable Web search/ Bing Search #1496

Open rpaGuyai opened 3 months ago

rpaGuyai commented 3 months ago

Please provide us with the following information: Hello, Is it possible to enable web search like Chat GPT? If the answer is not present within the document, it should search the web, also it should mention in the answers provided that it was part of web search. I did enable it partially by changing the prompt but doesn't work efficiently. Also, How can I exceed the token limit for input message?

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

pamelafox commented 2 months ago

This repo does not have any integration with web search. You could add your own calls to a web search, using the Bing Search API, if you get 0 relevant search results for a query.

As for your second question, "How can I exceed the token limit for input message?", you cannot send in more than the token length for the GPT model you are using. If you need a higher context window, you need to upgrade the model, like to "gpt-3.5-turbo-16k", or "gpt-4-32k".

rpaGuyai commented 2 months ago

As for your second question, "How can I exceed the token limit for input message?", you cannot send in more than the token length for the GPT model you are using. If you need a higher context window, you need to upgrade the model, like to "gpt-3.5-turbo-16k", or "gpt-4-32k".

Thanks for your response, For second pointer, if I am not wrong below are the token limits, however, even If I try to paste a chunk of say around 300 tokens and try to summarize it does not allow (it does not copy paste anything the search bar).

It does allow to copy paste chunk around 200 tokens which seems to be very less. May be I am doing something wrong, need your guidance please.

  1. gpt-3.5-turbo: 4096 tokens
  2. gpt-3.5-turbo-16k: 16384 tokens
  3. gpt-4-32k: 32768 tokens