Skip to content

Commit 543a51d

Browse files
authored
[Language Question Answering - Generate] Fix result, maxQACount and examples (#20679)
* fix inconsistency in examples after swagger changes * fix answer tags * maxResultCount to maxQACount * Document -> GenerationDocument
1 parent bfbabdd commit 543a51d

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

dev/cognitiveservices/data-plane/Language/examples/questionanswering/generate/SuccessfulSubmitQAGenerationJob.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
{
1111
"id": "1",
1212
"documentKind": "raw",
13-
"content": "Satya Nadella was born in Hyderabad of present-day Telangana, India into a Telugu-speaking Hindu family. His mother Prabhavati was a Sanskrit lecturer and his father, Bukkapuram Nadella Yugandhar, was an [TAG]Indian Administrative Service[TAG] officer of the 1962 batch.",
13+
"content": "Satya Nadella was born in Hyderabad of present-day Telangana, India into a Telugu-speaking Hindu family. His mother Prabhavati was a Sanskrit lecturer and his father, Bukkapuram Nadella Yugandhar, was an <answer>Indian Administrative Service officer</answer> of the 1962 batch.",
1414
"language": "en"
1515
}
1616
],
17-
"qnAGenerationParameters": {
17+
"parameters": {
1818
"useMarkedAnswer": true
1919
}
2020
}

dev/cognitiveservices/data-plane/Language/examples/questionanswering/generate/SuccessfulSubmitQAGenerationJob_URL.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"language": "en"
1515
}
1616
],
17-
"qnAGenerationParameters": {
17+
"parameters": {
1818
"fetchRawContent": true,
1919
"maxQACount": 10
2020
}

dev/cognitiveservices/data-plane/Language/examples/questionanswering/generate/SuccessfulSubmitQAGenerationJob_useMarkedAnswer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
{
1111
"identifier": "1",
1212
"documentKind": "raw",
13-
"content": "<s>Photosynthesis is how plants and some microorganisms make carbohydrates.</s> It is an endothermic (takes in heat) chemical process which uses sunlight to turn carbon dioxide into sugars. The sugars are used by the cell as energy, and to build other kinds of molecules. Fundamentally, photosynthesis converts light energy into chemical energy. Photosynthesis is vital for life on Earth. Before photosynthesis Earth had no free oxygen in its atmosphere.Green plants build themselves using photosynthesis. Algae, protists and some bacteria also use it. ",
13+
"content": "<answer>Photosynthesis is how plants and some microorganisms make carbohydrates.</answer> It is an endothermic (takes in heat) chemical process which uses sunlight to turn carbon dioxide into sugars. The sugars are used by the cell as energy, and to build other kinds of molecules. Fundamentally, photosynthesis converts light energy into chemical energy. Photosynthesis is vital for life on Earth. Before photosynthesis Earth had no free oxygen in its atmosphere.Green plants build themselves using photosynthesis. Algae, protists and some bacteria also use it. ",
1414
"language": "en"
1515
}
1616
],
17-
"QnAGenerationParameters": {
18-
"useAnswerMarkedInContent": true
17+
"parameters": {
18+
"useMarkedAnswer": true
1919
}
2020
}
2121
},

dev/cognitiveservices/data-plane/Language/questionanswering-generate.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@
268268
"type": "boolean",
269269
"description": "Specify this as true - if the documents have marker tags &lt;answer&gt; and &lt;/answer&gt; for marked answers. Example: Satya Nadella was born in &lt;answer&gt; Hyderabad &lt;/answer&gt; of present-day Telangana, India into a Telugu-speaking Hindu family."
270270
},
271-
"maxResultCount": {
271+
"maxQACount": {
272272
"type": "integer",
273-
"description": "Maximum number of results (question answers) to be generated.",
273+
"description": "Maximum number of question answer pairs to be generated.",
274274
"format": "int32",
275275
"maximum": 30,
276276
"minimum": 1
@@ -284,10 +284,19 @@
284284
"$ref": "common.json#/definitions/JobState"
285285
},
286286
{
287-
"$ref": "#/definitions/GenerationResult"
287+
"$ref": "#/definitions/GenerationJobResult"
288288
}
289289
]
290290
},
291+
"GenerationJobResult": {
292+
"description": "Generation Job result represents the job result with extracted documents and question answers generated.",
293+
"type": "object",
294+
"properties": {
295+
"result": {
296+
"$ref": "#/definitions/GenerationResult"
297+
}
298+
}
299+
},
291300
"GenerationResult": {
292301
"type": "object",
293302
"description": "Result of question answer generation job.",
@@ -296,7 +305,7 @@
296305
"type": "array",
297306
"description": "The set of documents with processed raw contents.",
298307
"items": {
299-
"$ref": "#/definitions/Document"
308+
"$ref": "#/definitions/GenerationDocument"
300309
}
301310
},
302311
"value": {

0 commit comments

Comments
 (0)