-
Notifications
You must be signed in to change notification settings - Fork 68
Add ai prompt v2 #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add ai prompt v2 #1249
Changes from all commits
5174166
abf4d06
3248453
a0767a7
e0e542e
df093fd
2a042ea
c7d87c9
38caeaf
818b7ee
0d51ac3
52b4a02
e25c4dc
88de125
e8ce97a
fa5456e
a5f4302
f484695
953e25e
0716de2
3382064
10dba6d
5c319a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # Prompt | ||
|
|
||
| ## Summary | ||
|
|
||
| Represents a prompt — instructions and directly accompanying content | ||
| provided to an AI system by an external entity to guide its output. | ||
|
|
||
| ## Description | ||
|
|
||
| A prompt is instructions, including directly accompanying natural language | ||
| text, documents, code, and/or media, provided to an AI system by an external | ||
| entity (human or otherwise), beyond the AI system's static models, programming, | ||
| and configuration files, to inform its output. | ||
|
|
||
| Prompts are categorized by their role (see `promptRole`): | ||
|
|
||
| - A **user prompt** is provided by a user (human or AI agent) and is associated | ||
| with a single query. | ||
| - A **system prompt** is provided by the system's owner or administrator to | ||
| inform the system's overall behavior for every query or instruction. | ||
| In agentic contexts, system prompts are sometimes referred to as | ||
| "instructions." | ||
|
|
||
| Context is the structured set of information provided to an AI system, model, | ||
| or agent at inference time — for example, the system prompt, the user prompt, | ||
| context history (including past prompts, outputs, and other session data that | ||
| may be compressed or windowed), and relevant grounding documents — that | ||
| influences the AI system's outputs and behaviour. | ||
|
|
||
| Properties and relationship types can be used for describing the prompt. | ||
| For example: | ||
|
|
||
| - The `promptRole` property can be used to indicate whether this is a | ||
| `user` or `system` prompt. | ||
| - The `/Software/primaryPurpose` and `/Software/additionalPurpose` properties | ||
| can be used to describe the purpose of the prompt. For example, a system | ||
| prompt's purpose might be described as `configuration` or `specification`. | ||
| - The `/Software/contentIdentifier` property can be used to identify the | ||
| prompt's content(s). Every `Prompt` must have at least one content | ||
| identifier. | ||
| - The `/Core/contentModality` property can be used to describe the modality | ||
| intended for the communication of the prompt content, | ||
| such as `audio`, `image`, `text`, or `video`. | ||
| - The `/Core/contentType` property can be used to describe the prompt's | ||
| physical content type, as stored in a computer memory, such as | ||
| `application/json`, `image/png`, `text/markdown`, or `text/plain`. | ||
| - The `/Dataset/confidentialityLevel` property can be used to record the | ||
| confidentiality of the prompt, for example when a system prompt is a | ||
| proprietary trade secret. | ||
| - When `isContextAugmented` is set to `true`, a Relationship of type `usesTool` | ||
| can be optionally used to describe the context augmentation mechanism or tool | ||
| employed (e.g., referencing a retrieval-augmented generation tool). | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: Prompt | ||
| - SubclassOf: /Software/SoftwareArtifact | ||
| - Instantiability: Concrete | ||
|
|
||
| ## Properties | ||
|
|
||
| - /Core/inLanguage | ||
| - type: /Core/LanguageTag | ||
| - minCount: 0 | ||
| - /Core/contentModality | ||
| - type: /Core/Modality | ||
| - minCount: 0 | ||
| - /Core/contentType | ||
| - type: /Core/MediaType | ||
| - minCount: 0 | ||
| - /Dataset/dataCollectionProcess | ||
| - type: xsd:string | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
| - /Dataset/dataPreprocessing | ||
| - type: xsd:string | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
| - /Dataset/hasSensitivePersonalInformation | ||
| - type: /Core/PresenceType | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
| - /Dataset/confidentialityLevel | ||
| - type: /Dataset/ConfidentialityLevelType | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
| - isContextAugmented | ||
| - type: xsd:boolean | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
| - promptPattern | ||
| - type: xsd:string | ||
| - minCount: 0 | ||
| - promptRole | ||
| - type: PromptRoleType | ||
| - minCount: 0 | ||
| - maxCount: 1 | ||
|
|
||
| ## External properties restrictions | ||
|
|
||
| - /Software/SoftwareArtifact/contentIdentifier | ||
| - type: /Software/ContentIdentifier | ||
| - minCount: 1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||
| SPDX-License-Identifier: Community-Spec-1.0 | ||||||
|
|
||||||
| # isContextAugmented | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## Summary | ||||||
|
|
||||||
| Indicates whether the prompt content has been automatically augmented or | ||||||
| enhanced with external supporting content intended to ground the model's | ||||||
| response in specific facts or knowledge. | ||||||
|
|
||||||
| `true` if the prompt is augmented with external context, `false` otherwise. | ||||||
|
|
||||||
| ## Description | ||||||
|
|
||||||
| Specifies whether an automated grounding mechanism is employed during prompt | ||||||
| construction. This technique (which may include Retrieval-Augmented Generation, | ||||||
| API results, or database lookups) is used to improve the accuracy and relevance | ||||||
| of responses from foundation models by programmatically providing them | ||||||
| with up-to-date or domain-specific supporting content. | ||||||
|
|
||||||
| Allowed values: | ||||||
|
|
||||||
| - `true`: The prompt includes automatically sourced external context or | ||||||
| supporting content. | ||||||
| - `false`: The prompt is constructed directly without automated external | ||||||
| augmentation. | ||||||
|
|
||||||
| ## Metadata | ||||||
|
|
||||||
| - name: isContextAugmented | ||||||
| - Nature: DataProperty | ||||||
| - Range: xsd:boolean | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # promptPattern | ||
|
|
||
| ## Summary | ||
|
|
||
| Identifies a design pattern or structured prompting strategy used within | ||
| a prompt to guide a foundation model toward a desired output or enhance | ||
| its performance. | ||
|
|
||
| ## Description | ||
|
|
||
| A free-form text field used to record the name of the prompt pattern or | ||
| high-level strategy given to the foundation model (e.g., a large language | ||
| model). | ||
|
|
||
| The purpose of this field is to document the specific technique that governs | ||
| the model's behavior during output generation. | ||
|
|
||
| This prompt pattern defines the core technique used to enhance the model's | ||
| reasoning or cognitive process, control its interaction flow, or ensure the | ||
| output adheres to specific criteria and constraints. | ||
|
|
||
| Although this is a free-form text field, it is recommended that standardized | ||
| terminology be utilized where possible to facilitate consistency and | ||
| interoperability. | ||
|
|
||
| Examples of possible values: | ||
|
|
||
| - `simple`: Use to indicate a prompt without any specific pattern. | ||
| - `chain-of-thought`: Explicitly requires sequential, step-by-step reasoning | ||
| before the answer. | ||
| - `decomposition`: Breaks a complex task into a collection of simpler | ||
| sub-tasks. | ||
| - `flipped-interaction`: Reverses roles, instructing the model to ask | ||
| clarifying questions first. | ||
| - `persona`: Instructs the model to adopt a specific role or character. | ||
| - `self-consistency`: Generates multiple outputs and selects the most common | ||
| (consensual) answer. | ||
| - `self-reflection`: Asks the model to critique and refine its own output or | ||
| steps. | ||
| - `tree-of-thought`: Explores and evaluates multiple branching lines of | ||
| reasoning. | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: promptPattern | ||
| - Nature: DataProperty | ||
| - Range: xsd:string |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # promptRole | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From 8 Apr 2026 SPDX AI WG call, the property name is update pending. The group is still to decide so Elyas can update this accordingly. Possible alternatives are:
or it can be others. |
||
|
|
||
| ## Summary | ||
|
|
||
| Indicates whether a prompt is a user prompt (scoped to a single query) or a | ||
| system prompt (governing overall behavior for every query). | ||
|
|
||
| ## Description | ||
|
|
||
| Specifies the role of a prompt within an AI interaction. Prompts are | ||
| categorized into two distinct roles: | ||
|
|
||
| - `user`: A user prompt is provided by a user (human or AI agent) of the AI | ||
| system and is associated with a single query or instruction. | ||
| - `system`: A system prompt is provided by the system's owner, maintainer, or | ||
| administrator to inform the system's overall behavior for every query or | ||
| instruction. In agentic contexts, system prompts are sometimes referred to as | ||
| "instructions." | ||
|
|
||
| This property is important for understanding provenance and scope: user prompts | ||
| describe individual interactions, while system prompts describe standing | ||
| configuration applied to all interactions. Both are distinct from the AI | ||
| system's static models, programming, and configuration files. | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: promptRole | ||
| - Nature: ObjectProperty | ||
| - Range: PromptRoleType | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # PromptRoleType | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When possible, avoid using "-Type" suffix for term that already indicate class or category. In this case, "Role" already implies a class/category, so it is unnecessary to repeat the notion again with "Type". No need to change anything here btw, since we will rename the |
||
|
|
||
| ## Summary | ||
|
|
||
| A controlled vocabulary for classifying the role of a prompt within an AI | ||
| system interaction. | ||
|
|
||
| ## Description | ||
|
|
||
| PromptRoleType defines the two fundamental roles a prompt can serve in an | ||
| AI system: | ||
|
|
||
| - **User prompts** originate from the consumer of the AI system (human or | ||
| automated agent) and are scoped to a single query or instruction. | ||
| - **System prompts** originate from the system's owner, maintainer, or | ||
| administrator and govern the AI system's overall behavior for every query. | ||
|
|
||
| This distinction is fundamental for documenting the provenance and scope of | ||
| prompts, especially in multi-turn, agentic, or RAG-based AI systems where | ||
| both role types may be represented separately. | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: PromptRoleType | ||
|
|
||
| ## Entries | ||
|
|
||
| - system: A prompt provided by the system's owner, maintainer, or administrator to inform the system's overall behavior for every query or instruction. Sometimes referred to as "instructions" in agentic contexts. | ||
| - user: A prompt provided by a user (human or AI agent) of the AI system, associated with a single query or instruction. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # contentModality | ||
|
|
||
| ## Summary | ||
|
|
||
| Provides information about the content modality of an Element or a property. | ||
|
|
||
| ## Description | ||
|
|
||
| A content modality describes the nature of the information channel or sensory | ||
| type through which content is communicated, perceived, or processed by agents | ||
| and software. This is used to specify how the content is intended to be | ||
| exchanged or presented (e.g., text, image, audio, video). | ||
|
|
||
| Use the value "other" if the modality is not listed in the defined `Modality` | ||
| vocabulary, and you should optionally provide the specific modality in the | ||
| `comment` property. | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: contentModality | ||
| - Nature: ObjectProperty | ||
| - Range: Modality |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| SPDX-License-Identifier: Community-Spec-1.0 | ||
|
|
||
| # Modality | ||
|
|
||
| ## Summary | ||
|
|
||
| A controlled vocabulary used to classify the nature of the data channel | ||
| (or sensory type) for content or interaction within a system. | ||
|
|
||
| ## Description | ||
|
|
||
| The Modality defines a standardized classification for the distinct data | ||
| channels or sensory types through which information is communicated, perceived, | ||
| or processed by agents and software. | ||
|
|
||
| This vocabulary enables system components to describe the specific modality or | ||
| form in which information is exchanged, serving functions such as: | ||
|
|
||
| - Human-computer interaction (HCI): Defining the sensory channels for input and | ||
| output. | ||
| - Foundation models: Specifying the nature of input data and the expected | ||
| output. | ||
| - Data classification: Categorizing data and collections of data based on | ||
| data's inherent form. | ||
|
|
||
| ## Metadata | ||
|
|
||
| - name: Modality | ||
|
|
||
| ## Entries | ||
|
|
||
| - audio: Spoken language and sound (e.g., voice commands, recorded dialog, music, environmental sounds, audio alerts). | ||
| - gesturePose: Body movement, hand gestures, facial expressions, or full-body pose estimation. | ||
| - hapticTactile: Touch, force, or tactile feedback data (e.g., vibrations, surface pressure, grip data). | ||
| - image: Still visual data (e.g., photographs, drawings, diagrams, charts). | ||
| - noAssertion: The modality is not known or cannot be reasonably determined, or the creator has made no attempt to determine this field, or the creator has intentionally provided no information (no meaning shall be implied by doing so). | ||
| - other: Any other modality not defined in this list. | ||
| - text: A sequence of characters intended to convey meaning in a natural human language. | ||
| - video: Temporal visual data (sequences of still visual data), which can associated time-synchronized data such as audio tracks or transcriptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isContextAugmented is bad name.
It can have two reads:
I think about intention is (2).
May need to rename