azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

How to add new files and make them searchable without deploying

Open PDiracDelta opened this issue 1 year ago • 7 comments

Please provide us with the following information:

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

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

Minimal steps to reproduce

prompt the chatGPT with "does joris like bagels?". It should say there are no relevant sources for this info. Then, create a file called "joris likes bagels.pdf" containing 2 pages of repeated text "joris likes bagels". Then run .\scripts\prepdocs.ps1.

Any log messages given by the failure

Expected/desired behavior

when I prompt the chatGPT "does joris like bagels?" it should refer to that file. However, It still says there are no relevant sources.

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

I read in the FAQ https://github.com/Azure-Samples/azure-search-openai-demo#faq that this should upload the files. It doesn't explicitly say this also embeds, indexes, and makes the files available for searching, but I assumed it does so automatically. This may not be true, so what additional (to running prepdocs.ps1) steps do I need to take?. Suggestion to add it to the FAQ. image

PDiracDelta avatar Oct 25 '23 10:10 PDiracDelta

That should work, in theory - we've actually done presentations where we've uploaded a doc and asked a question after. A few things to check:

  • Did ./scripts/prepdocs show that it processed the new file?
  • Does your search index show results for the search query? (You can query your index in Azure Portal)

pamelafox avatar Oct 25 '23 10:10 pamelafox

That should work, in theory - we've actually done presentations where we've uploaded a doc and asked a question after. A few things to check:

  • Did ./scripts/prepdocs show that it processed the new file?

Yes.

  • Does your search index show results for the search query? (You can query your index in Azure Portal)

Yes.

I just discovered that it is registered as supporting content, but the chat doesn't understand the text. I would test more (e.g. adding periods in between the repetitions) but need to remove the existing files first. Is this the easiest way to do that? (it's a bit cumbersome on large scale but ~~works for this test~~). It seems I cannot delete the file following the instructions ... I get an error for parameter "value", which is literally mentioned in every example on the docu...

"The request is invalid. Details: The parameter 'value' in the request payload is not a valid parameter for the operation 'search'."

image

PDiracDelta avatar Oct 25 '23 12:10 PDiracDelta

See my comment here re removing- https://github.com/Azure-Samples/azure-search-openai-demo/issues/714#issuecomment-1743651101

Also, its strange that it responded like that.

pamelafox avatar Oct 25 '23 13:10 pamelafox

@PDiracDelta Hm you're not the first developer to have issues figuring out the right payload. If you do end up getting that working (vs using prepdocs), let me know. Either way I can tell the tech writer that the docs need clarifying.

pamelafox avatar Oct 25 '23 13:10 pamelafox

Hmm... the Q&A for this one seems to have disappeared from the FAQ section...

felixwcf avatar Nov 15 '23 03:11 felixwcf

I wrote a whole doc instead: https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/data_ingestion.md

Please let me know if anything's missing from that.

pamelafox avatar Nov 15 '23 06:11 pamelafox

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Jan 24 '24 01:01 github-actions[bot]