Answer to question

Another example is a rule that checks if the text answers to a specified question. Let's say we have a text that discusses OpenAI, but we want to make sure that the text actually answers the question "What is OpenAI?"

Example 8. Rule that verifies if the text does answer to a specific question

<sch:rule context="p[@id='openai']">
    <sch:assert test="ai:verify-content('Does it answers to the question: What is OpenAI?', .)">
        The test does not answer to the question "What is OpenAPI?" </sch:assert>
</sch:rule>


If the text passes this rule, we can be reasonably confident that it does answer the question "What is OpenAI?"

However, if the text does not pass the rule, we know that it may not be providing a clear answer to the question. In this case, we might need to revise or restructure the text to make sure it does answer the question.

Example 9. SQF fix that that reformulates the text to answer to the question

<sqf:fix id="rephrase">
    <sqf:description>
        <sqf:title>Reformulate the text to answer to the question: 
                        What is OpenAI?</sqf:title>
    </sqf:description>
    <sqf:replace match="text()" select="ai:transform-content(
        'Reformulate the text to answer to the question: What is OpenAI?', .)"/>
</sqf:fix>