Skip to Content

AI-102: What’s the Correct Parameter to Disable Logging in Azure Language Service?

Struggling with data persistence in Azure AI? Learn how to use the LoggingOptOut parameter to ace the AI-102 exam question on input data storage prevention. Get step-by-step Python code examples and expert tips for Microsoft Azure AI Engineer certification.

Table of Contents

Question

Xerigon has an application that uses the Language service for the following:

  • Key phrase extraction
  • Sentiment analysis
  • Named Entity Recognition
  • Health features
  • Personally Identifiable Information (PII)

You want to ensure that storage of the input data does not persist once the data has been analyzed.

The following partial Python script is used to create an endpoint used by the application:

import requests
# Define the endpoint and API key
endpoint = "https://<your-resource-name>.cognitiveservices.azure.com/"
api_key = "<your-api-key>"
# Define the headers
headers = {
"Ocp-Apim-Subscription-Key": api_key,
"Content-Type": "application/json"
}
# Define the parameters
params = {
MISSING
# prevent temporary storage of input data once the data is analyzed.
}
# Define the input data
data = {
"documents": [
{"id": "1", "text": " The Atlanta Falcons had an improbable last-second win over the Philadelphia Eagles 22-21 on Monday Night Football. The Eagles optioned to throw the ball on 3rd and 3 from the Atlanta 10-yard line with 1:41 left in the game instead of running the ball. Eagles receiver Saquon Barkley dropped the pass, stopping the clock. The Eagles kicked a field goal to go up by 6, but the incompletion gave the Falcons extra time. The Falcons went 70 yards with no timeouts and scored, crushing the soul of the Philadelphia fans in Lincoln Financial Field.
Wade Owens
Football Reporter
Owens Sports Media
wade.owens.owensports.com
404-555-7641”
}
]
}
# Make the request
response = requests.post(
url=f"{endpoint}/text/analytics/v3.1/sentiment",
headers=headers,
params=params,
json=data
)
# Print the response

print(response.json())

Which query parameter is missing from the script to prevent the storage of input data?

A. “QueryType”:full
B. “LoggingOptOut”: False
C. “QueryType”:simple
D. “Skip”:0
E. “LoggingOptOut”: True
F. “Skip”:1

Answer

E. “LoggingOptOut”: True

Explanation

You would choose the query parameter “LoggingOptOut”: True. This parameter stops the temporary storage of data once the data has been analyzed. It is set by default to “LoggingOptOut”: False for Named Entity Recognition language detection, sentiment analysis, and key phrase extraction endpoints and is set by default to “LoggingOptOut”: True for health features and PII endpoints. If data is stored temporarily by the AI Language service, the data is encrypted and stored for up to 48 hours.

You would not choose the query parameter “LoggingOptOut”: False because this setting will persist the temporary storage.

You would not choose either “Skip”:0 or “Skip”:1 because the “Skip” parameter specifies the number of pages for the results. This parameter will not prevent the storage of input data.

You would not choose either “QueryType”:full or “QueryType”:simple because the “QueryType” parameter specifies the type of query that will be used. “QueryType”:full uses full Lucene query syntax. “QueryType”:simple uses an abbreviated, simple query syntax. This parameter will not prevent the storage of input data.

Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.