UPMD

UPMD Syntax

UPMD (Unified Prompt Markup Definition) is a next-generation prompt language designed to bridge the gap between traditional programming languages and natural language prompting. It integrates quantum computing principles and context-aware technologies to provide a more intuitive and powerful AI control mechanism.

Basic Syntax

UPMD documents consist of a series of blocks enclosed in pipe characters (|). Blocks can be nested to express hierarchical structures.

Variable Definition

|variable_name: attribute| = {value1: probability1, value2: probability2}
|quantum_variable: translation_approach| = {literal: 0.3, free: 0.7}

Declares a variable with probabilistic states. Each value can be assigned a probability between 0 and 1, and the sum of all probabilities should be 1.

Dynamic Grammar

|dynamic_grammar| ... |/dynamic_grammar|
|dynamic_grammar| [beginner] Use simple terms... |/dynamic_grammar|

Applies different rules based on variable values. Specify the variable value in square brackets and define the rules to be applied for that value.

Function Definition

|function: function_name(@parameter)| ... |return: result| ... |/function|
|function: analyze_text(@text)| ... |return: analysis_result| ... |/function|

Defines a function that performs a specific task. Functions can include step-by-step instructions and return values.

Comments

(( Comment content ))
(( This part is visible to the AI but not executed ))

In UPMD, comments are enclosed in double parentheses. Comments are used to add explanations or notes to your prompt.

Data Types

@variable_name = value
@name = "John Doe"
@age = 30
@is_student = true
@hobbies = ["reading", "painting", "coding"]
@profile = {"name": @name, "age": @age, "occupation": "engineer"}

UPMD supports various data types including strings, numbers, booleans, lists, and dictionaries. Variables are declared using the @ symbol.

Control Structures

UPMD provides control structures similar to traditional programming languages but with more natural language-like syntax.

|if: @age >= 18| You are eligible to vote. |else| You are not yet eligible to vote. |/if| |for_each: @hobby in @hobbies| You enjoy @hobby. |/for_each|