Programmatically upload file and get response as file or stream

Subijay Bhattacharya 0 Reputation points
2025-01-28T08:31:09.88+00:00

Hi,

We would like to leverage AI for a business case. We will upload recommended device configuration matrix as a file and add it to the DataSource and will create a search index.

Next there will be another file with current device configurations which could be old and outdated. This file will contain hundreds of thousands of rows.

Each row represents the current device configuration.

E.g.

Device-1,currenConfiguration-1,supportedDeviceConfiguration-1

Device-2,currenConfiguration-2,supportedDeviceConfiguration-2

...

Device-N,currenConfiguration-N,supportedDeviceConfiguration-N

We would like to feed this current device configuration file to AI service and get most appropriate recommendations from AI for each of the devices. AI has to provide the recommendation based on the configuration matrix file pre-uploaded in the DataSource.

We would like to get the response as a file / stream where each row will have the recommended configuration for the device.

e.g

Recommends Device-1 to use latestConfigration-1.1,latestSupportedDeviceConfiguration-1.1

Recommends Device-2 to use latestConfigration-2.1,latestSupportedDeviceConfiguration-2.1

...

Recommends Device-N to use latestConfigration-N.1,latestSupportedDeviceConfiguration-N.1

We would like to upload this file and get the response as a file/stream programmatically. We would like to know if this can be achieved via Java and if yes could you please point me to any APIs/Classes in the Azure AI Services Java SDK that we can use?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,076 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. santoshkc 11,875 Reputation points Microsoft Vendor
    2025-01-28T12:16:19.23+00:00

    Hi @Subijay Bhattacharya,

    Thank you for reaching out to Microsoft Q&A forum!

    You can achieve the described functionality using Azure AI services by leveraging the "Add Your Own Data" or "Assistant feature" from Azure OpenAI.

    Programmatically upload the device configuration matrix into a vector store or azure blob storage and query the Azure OpenAI to get recommendations for each device based on the pre-uploaded data. To ensure the responses are formatted as required (e.g., "Recommends Device-1 to use latestConfiguration-1.1, latestSupportedDeviceConfiguration-1.1"), include this sample output in the chat prompt or system prompt during interaction.

    Use Azure AI SDKs or APIs, such as the Java SDK for Azure OpenAI or AI Search, to upload data, process rows, retrieve recommendations, and compile results into a file or stream.

    Please note: While Add Your Own Data is production-ready, but the Assistant feature is in public preview and not recommended for production use.

    I hope this helps! Thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.