Skip to content

Commit

Permalink
Flag suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Jan 10, 2024
1 parent ceb9b45 commit 3b69ed9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
8 changes: 7 additions & 1 deletion vocabularies/AI.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"$Abstract": true,
"@Common.Experimental": true,
"@Core.Description": "Base type containing AI-based recommendations for an entity type property",
"@Core.LongDescription": "Specializations of this base type have three properties:\n- a property that is the target of a [`Common.Text`](Common.md#Text) annotation, its name may differ from `AIRecommendedFieldValue`\n- a property to which the `Common.Text` annotation evaluates, its name may differ from `AIRecommendedFieldDescription`\n- a property named `AIRecommendedFieldScoreValue`.",
"@Core.LongDescription": "Specializations of this base type have four properties:\n- a property that is the target of a [`Common.Text`](Common.md#Text) annotation, its name may differ from `AIRecommendedFieldValue`\n- a property to which the `Common.Text` annotation evaluates, its name may differ from `AIRecommendedFieldDescription`\n- a property named `AIRecommendedFieldScoreValue`\n- a Boolean property named `AIRecommendedFieldIsSuggestion`.",
"AIRecommendedFieldValue": {
"$Type": "Edm.PrimitiveType",
"@Core.Description": "Recommended value",
Expand All @@ -58,6 +58,12 @@
"$Type": "Edm.Decimal",
"$Nullable": true,
"@Core.Description": "Confidence score of the recommended value"
},
"AIRecommendedFieldIsSuggestion": {
"$Type": "Edm.Boolean",
"$DefaultValue": false,
"@Core.Description": "Whether the recommended value shall be suggested in the input field",
"@Core.LongDescription": "For any collection of `PropertyRecommendationType` in the return type of the [`Recommendations`](#Recommendations) function,\n this flag can be true in at most one instance of the collection,\n and only if the `AIRecommendedFieldScoreValue` exceeds a certain threshold."
}
},
"RecommendationsRole": {
Expand Down
24 changes: 13 additions & 11 deletions vocabularies/AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Terms for AI-related functionality at SAP

Term|Type|Description
:---|:---|:----------
[RecommendationsRole](./AI.xml#L85:~:text=<Term%20Name="-,RecommendationsRole,-") *([Experimental](Common.md#Experimental))*|[RecommendationsRoleType](#RecommendationsRoleType)|<a name="RecommendationsRole"></a>Role of this property or parameter regarding AI-based recommendations
[RecommendationsRole](./AI.xml#L94:~:text=<Term%20Name="-,RecommendationsRole,-") *([Experimental](Common.md#Experimental))*|[RecommendationsRoleType](#RecommendationsRoleType)|<a name="RecommendationsRole"></a>Role of this property or parameter regarding AI-based recommendations


## Functions
Expand All @@ -30,26 +30,28 @@ Parameter|Type|Description
## [*PropertyRecommendationType*](./AI.xml#L59:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-") *([Experimental](Common.md#Experimental))*
Base type containing AI-based recommendations for an entity type property

Specializations of this base type have three properties:
Specializations of this base type have four properties:
- a property that is the target of a [`Common.Text`](Common.md#Text) annotation, its name may differ from `AIRecommendedFieldValue`
- a property to which the `Common.Text` annotation evaluates, its name may differ from `AIRecommendedFieldDescription`
- a property named `AIRecommendedFieldScoreValue`.
- a property named `AIRecommendedFieldScoreValue`
- a Boolean property named `AIRecommendedFieldIsSuggestion`.

Property|Type|Description
:-------|:---|:----------
[AIRecommendedFieldValue](./AI.xml#L68:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|PrimitiveType|Recommended value<br>In specializations of this base type, this property is specialized to the primitive type of the entity type property.
[AIRecommendedFieldDescription](./AI.xml#L75:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|String?|Description of the recommended value<br>In specializations of this base type, this property is specialized to the string type of the text property corresponding to the entity type property.
[AIRecommendedFieldScoreValue](./AI.xml#L81:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|Decimal?|Confidence score of the recommended value
[AIRecommendedFieldValue](./AI.xml#L69:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|PrimitiveType|Recommended value<br>In specializations of this base type, this property is specialized to the primitive type of the entity type property.
[AIRecommendedFieldDescription](./AI.xml#L76:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|String?|Description of the recommended value<br>In specializations of this base type, this property is specialized to the string type of the text property corresponding to the entity type property.
[AIRecommendedFieldScoreValue](./AI.xml#L82:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|Decimal?|Confidence score of the recommended value
[AIRecommendedFieldIsSuggestion](./AI.xml#L85:~:text=<ComplexType%20Name="-,PropertyRecommendationType,-")|Boolean|Whether the recommended value shall be suggested in the input field<br>For any collection of `PropertyRecommendationType` in the return type of the [`Recommendations`](#Recommendations) function, this flag can be true in at most one instance of the collection, and only if the `AIRecommendedFieldScoreValue` exceeds a certain threshold.

<a name="RecommendationsRoleType"></a>
## [RecommendationsRoleType](./AI.xml#L89:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-") *([Experimental](Common.md#Experimental))*
## [RecommendationsRoleType](./AI.xml#L98:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-") *([Experimental](Common.md#Experimental))*
**Type:** String



Allowed Value|Description
:------------|:----------
[Input](./AI.xml#L93:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is input for some recommendation
[Output](./AI.xml#L97:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property or parameter is the target of some recommendation
[InputOutput](./AI.xml#L101:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is input for and the target of some recommendation
[RequiredInput](./AI.xml#L105:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is required input before any recommendations are requested
[Input](./AI.xml#L102:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is input for some recommendation
[Output](./AI.xml#L106:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property or parameter is the target of some recommendation
[InputOutput](./AI.xml#L110:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is input for and the target of some recommendation
[RequiredInput](./AI.xml#L114:~:text=<TypeDefinition%20Name="-,RecommendationsRoleType,-")|The property is required input before any recommendations are requested
13 changes: 11 additions & 2 deletions vocabularies/AI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Base type containing AI-based recommendations for an entity type property" />
<Annotation Term="Core.LongDescription">
<String>Specializations of this base type have three properties:
<String>Specializations of this base type have four properties:
- a property that is the target of a [`Common.Text`](Common.md#Text) annotation, its name may differ from `AIRecommendedFieldValue`
- a property to which the `Common.Text` annotation evaluates, its name may differ from `AIRecommendedFieldDescription`
- a property named `AIRecommendedFieldScoreValue`.</String>
- a property named `AIRecommendedFieldScoreValue`
- a Boolean property named `AIRecommendedFieldIsSuggestion`.</String>
</Annotation>
<Property Name="AIRecommendedFieldValue" Type="Edm.PrimitiveType" Nullable="false">
<Annotation Term="Core.Description" String="Recommended value" />
Expand All @@ -81,6 +82,14 @@
<Property Name="AIRecommendedFieldScoreValue" Type="Edm.Decimal" Scale="variable" Nullable="true">
<Annotation Term="Core.Description" String="Confidence score of the recommended value" />
</Property>
<Property Name="AIRecommendedFieldIsSuggestion" Type="Edm.Boolean" Nullable="false" DefaultValue="false">
<Annotation Term="Core.Description" String="Whether the recommended value shall be suggested in the input field" />
<Annotation Term="Core.LongDescription">
<String>For any collection of `PropertyRecommendationType` in the return type of the [`Recommendations`](#Recommendations) function,
this flag can be true in at most one instance of the collection,
and only if the `AIRecommendedFieldScoreValue` exceeds a certain threshold.</String>
</Annotation>
</Property>
</ComplexType>
<Term Name="RecommendationsRole" Type="AI.RecommendationsRoleType" Nullable="false" AppliesTo="Property Parameter">
<Annotation Term="Common.Experimental" />
Expand Down

0 comments on commit 3b69ed9

Please sign in to comment.