"We have all our data stored in Azure Database for PostgreSQL. Could you provide guidance on how we can utilize Azure OpenAI's REST API to query this data? Specifically, we are interested in understanding if the REST API supports functionalities like inde

Polisetty, Balaji 0 Reputation points
2024-01-05T03:54:59.27+00:00

"We have all our data stored in Azure Database for PostgreSQL. Could you provide guidance on how we can utilize Azure OpenAI's REST API to query this data? Specifically, we are interested in understanding if the REST API supports functionalities like inde

Azure Database for PostgreSQL
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,602 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2024-01-19T05:15:05.2533333+00:00

    Polisetty, Balaji Thanks for sharing the additional details.

    Please see below answers to your queries.

    Data Storage and Access: All our operational data is stored in Azure Database for PostgreSQL. We need to understand the best practices and methodologies for accessing and querying this data using Azure OpenAI.

    Azure OpenAI can access data stored in Azure Database for PostgreSQL using the REST API. You can use the REST API to send queries to the database and retrieve the results. You can also use the REST API to perform advanced data processing tasks, such as natural language processing and image recognition.

    See Using OpenAI REST Endpoints with Azure SQL Database and Integrate Azure AI capabilities into Azure Database for PostgreSQL for more details.

    Indexing and Searching Capabilities: In Azure Blob Storage, we utilize indexing and indexers for efficient data retrieval. Can similar indexing functionalities be implemented when working with Azure Database for PostgreSQL in conjunction with Azure OpenAI? If so, how can we set this up?

    Please see Introducing the azure_ai extension to Azure Database for PostgreSQL if it helps.

    Integration Specifics: Are there any specific configurations, plugins, or extensions required on the PostgreSQL side to facilitate seamless integration with Azure OpenAI?

    Please see OpenAI/ChatGPT retrieval plugin and PostgreSQL on Azure for more details.

    Use Case Examples: If possible, could you provide any use case examples or documentation where Azure OpenAI has been successfully integrated with Azure Database for PostgreSQL, highlighting the querying and data processing capabilities?

    There are many use case examples where Azure OpenAI has been successfully integrated with Azure Database for PostgreSQL. For example

    Generate embeddings from within the database with a single line of SQL code invoking a UDF.

    Call various service from SQL with a simple function call enabling scenarios such as:

    • Sentiment Analysis
    • Language detection
    • Summarization
    • PII information detection
    • Key phase extractions

    Harness the power of large language models (LLMS) alongside your operational data in PostgreSQL. You can also check the above documentations on how the integration works and how to use.

    Security and Compliance: How do we ensure that the data security and compliance standards are maintained during this integration?

    Azure OpenAI automatically encrypts your data when it's persisted to the cloud. The encryption protects your data and helps you meet your organizational security and compliance commitments. Additionally, Azure Database for PostgreSQL provides built-in security features, such as firewall rules and SSL encryption, to protect your data.

    Do let me know if that helps or have any other queries.

    If the response helped, please do click Accept Answer and Yes for was this answer helpful.

    Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments

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.