How do I extract sensitive data, credit card details, from a piece of text and format it in JSON using Azure OpenAI Service

John 0 Reputation points
2024-01-03T17:23:37.4066667+00:00

I want to be able to extract card details from spoken text and format into JSON. I am doing this already for non-sensitive data using the OpenAI JSON formatter template. I want to do the same for sensitive data but the Azure OpenAI service will not allow this. What is the best way to do this using Azure AI services? Is it text analytics ? Is there an option to enable Azure OpenAI service to accept this type of input?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,392 questions
Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
372 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,484 questions
{count} votes

2 answers

Sort by: Most helpful
  1. YutongTie-MSFT 47,336 Reputation points
    2024-01-04T01:20:52.7033333+00:00

    @John Thanks for reaching out to us John, have you got a chance to check on PII feature of Azure Language Service? It help you to detect and redact Personally Identifying Information (PII). The PII feature can evaluate unstructured text, extract and redact sensitive information (PII) and health information (PHI) in text across several pre-defined categories.

    https://learn.microsoft.com/en-us/azure/ai-services/language-service/personally-identifiable-information/how-to-call

    Please take a look at it and see if that fit your case, let us know, we could discuss further for your scenario.

    Regards, Yutong -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

  2. shirivo 160 Reputation points
    2024-01-04T03:49:43.79+00:00

    Hello.

    Azure AI provides several services that can help you extract Personally Identifiable Information (PII) from text and format it into JSON.

    So, here are a few options:

    • Azure Text Analytics PII Detection: Azure Text Analytics provides a PII Detection feature that can evaluate unstructured text, extract, and redact sensitive information (PII) across several pre-defined categories1. You can use this feature to submit raw unstructured text for analysis and handle the API output in your application. You can also create and train custom models using the Text Analytics Custom Model API.
    • Azure AI Search PII Detection Skill: Azure AI Search offers a PII Detection skill that extracts personal information from an input text and gives you the option of masking it. This skill uses the detection models provided in Azure AI Language.
    • Azure OpenAI Service: While Azure OpenAI Service does not allow processing of sensitive data by default, it does provide options for managing data privacy and security. Azure OpenAI processes prompts and generated content, and it ensures that your prompts (inputs) and completions (outputs), your embeddings, and your training data are not available to other customers or even OpenAI itself4. However, for use cases that involve the processing of sensitive, highly confidential, or legally-regulated input data but where the likelihood of harmful outputs and/or misuse is low, some customers may apply to modify abuse monitoring.
    • Azure OpenAI on Your Data: This feature enables you to run supported chat models such as GPT-35-Turbo and GPT-4 on your data without needing to train or fine-tune models5. Running models on your data enables you to chat on top of and analyze your data with greater accuracy and speed.

    ** Important: Note that while these services can help you extract PII details from text, you should always ensure that you are handling and storing sensitive data in a secure and compliant manner.

    More info:

    Wishing you well,

    @shirivo