Azure-Samples / azure-search-openai-demo-csharp

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
MIT License
555 stars 346 forks source link

Az Function Embedding Service Proposed Updates #203

Closed luisquintanilla closed 6 months ago

luisquintanilla commented 8 months ago

User Flow

graph LR
    UI[User Interface] --> |Uploads document|Backend[Backend Service]
    Backend --> |Uploads document|Storage[Azure Blob Storage]
    Storage -->|Blob trigger| Function[Azure Function]
    Function -->|Generate embeddings and index document| Search[Azure Cognitive Search]

Tasks

System.Net.Http.HttpRequestException: TypeError: Failed to fetch ---> TypeError: Failed to fetch Exception_EndOfInnerExceptionStack at System.Net.Http.BrowserHttpInterop.d__13`1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Net.Http.BrowserHttpHandler.CallFetch(HttpRequestMessage , CancellationToken , Nullable`1 ) at System.Net.Http.BrowserHttpHandler.g__Impl|53_0(HttpRequestMessage , CancellationToken , Nullable`1 ) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.g__Core|5_0(HttpRequestMessage , Boolean , CancellationToken ) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.g__Core|5_0(HttpRequestMessage , Boolean , CancellationToken ) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage , HttpCompletionOption , CancellationTokenSource , Boolean , CancellationTokenSource , CancellationToken ) at ClientApp.Services.ApiClient.UploadDocumentsAsync(IReadOnlyList`1 files, Int64 maxAllowedSize)
luisquintanilla commented 8 months ago

How to (manually) test

  1. In the Azure portal, navigate to the storage account tied to the deployment.
  2. Use the Storage Browser to upload a PDF file to the content blob container.

    image

    This assumes that you used the default azure storage container. Otherwise, use the value of AZURE_STORAGE_CONTAINER set in the .env file.

  3. In the Azure portal, navigate to the search service tied to the deployment and click on the Seach explorer

image

  1. In the search explorer, conduct a keyword search for terms that might be found in the document you uploaded. For example, if the documents you uploaded contain healthcare information, you might want to use that as the keywords. If successful, it should return relevant search results.

image

igrgurina commented 7 months ago

This would be incredibly useful

luisquintanilla commented 6 months ago

Marking this issue as complete since this service now lives in the EmbedFunctions project.