Used to correct grammatical errors in text.
AI_FIXGRAMMAR([<resource_name>], <text>)
| Parameter | Description |
|---|---|
<resource_name> | The specified resource name, optional |
<text> | The text to be grammar-corrected |
Returns the text string after grammar correction.
If any input is NULL, returns NULL.
The result is generated by a large language model, so the output may vary.
SET default_ai_resource = 'resource_name'; SELECT AI_FIXGRAMMAR('Apache Doris a great system DB') AS Result;
+------------------------------------------+ | Result | +------------------------------------------+ | Apache Doris is a great database system. | +------------------------------------------+
SELECT AI_FIXGRAMMAR('resource_name', 'I am like to using Doris') AS Result;
+--------------------+ | Result | +--------------------+ | I like using Doris | +--------------------+