Skip to content

Add AI vocabulary with AI.hint as first property.#169

Open
Fannon wants to merge 7 commits into
mainfrom
add-ai-hint-extension
Open

Add AI vocabulary with AI.hint as first property.#169
Fannon wants to merge 7 commits into
mainfrom
add-ai-hint-extension

Conversation

@Fannon

@Fannon Fannon commented May 12, 2026

Copy link
Copy Markdown
Member

Added

  • Added new @AI annotation vocabulary for AI consumption hints
    • @AI.hint: Provides a hint for AI consumers (e.g., LLMs) on how to use or interpret an Entity, Type, or Service — kept separate from human-readable @EndUserText descriptions

We'll have to create related annotations for other formats, e.g. x-sap-ai-hint for JSON Schema based standards like OpenAPI

@Fannon Fannon self-assigned this May 12, 2026
@open-resource-discovery-bot

open-resource-discovery-bot commented May 12, 2026

Copy link
Copy Markdown
PR Preview

QR code for preview link

🚀 View preview at:
https://sap.github.io/csn-interop-pr-preview/csn-interop-specification/pr-169/

Built to branch main at 2026-06-16 14:02 UTC.
open-resource-discovery/pr-preview-action

description: This is the interface description of @AI.
type: object
definitions:
"@AI.hint":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing that I usually tend to focus on is to clarify the scope and purpose of any extension. In this case, if the objective is to guide AI consumers "on how to use or interpret the annotation target", I would suggest to use @AI.instructions or `@Ai.usageHints" so users clearly understand the purpose of it by just looking at the extension name.

Again, I do like the propose one, just my two cents.

title: AI Document
description: This is the interface description of @AI.
type: object
definitions:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just dropping a few additional thoughts on AI-related “hints” that could be useful to consider:

  • @AI.intent → short “when to use” (task framing)
  • @AI.recoveryHints → runtime guidance for expected error scenarios (e.g., when → do )
  • @AI.preconditions → required states / data
  • @AI.postconditions → what changes in the system
  • @AI.sideEffects → explicit side effects (external actions, observable state changes beyond outcome..)
  • @AI.idempotency → behavior + retry semantics (safe, conditional, unsafe, etc.)

I prefer starting light, but could help make the overall model a bit more expressive and useful for agents.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas / suggestions! The first two would fit well into the @ai. scope, the other ones feel like they're more general, so I would expect them more like in an @API.* scope?

@frankejoe frankejoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also prefer to start small with a single annotation in which we can add all kinds of stuff. Guess we will be able to distinguish with the string field the different use cases similar to what you do for claude skills where you also just define a single markdown file.

What information I could imagine would be helpful:

  • Usage hints: analytics, search, ...
  • Example values: A few sample values for key columns
  • Synonym mappings: revenue / sales / ...
  • Safety rules: Always limit to top 100
  • Pairs of natural language and resulting sql

But as said - I guess we can add all these into the AI.hint

Adds annotations overview table, usage examples at entity/property
and service level, best practices section adapted for CDS context
(entity semantics, navigation, service authorization — not
operation-level pre/post-conditions), and cross-reference to
x-sap-ai-hint for JSON-based formats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants