AI Pseudocode: A Condensed Guide

Forward

This guide provides an overview of AI pseudocode, with a focus on Generation One techniques. For practical examples, please go to Eli's Prompt Page or head to YouTube for a more in-depth presentation. Below is a bunch of quicklinks to get you to different sections easily:

Overview

Pseudocode is a flexible, informal method of describing algorithms and processes, bridging the gap between human language and computer code. In AI contexts, it's used for:

  • Sketching out designs
  • Enhancing Large Language Models (LLMs)
  • Creating character cards and jailbreaks
  • Setting up predictive analysis bots
    Key points:
  • No universal standard exists; flexibility is key
  • Sits between human-friendly and token-friendly language
  • Helps segment data for better AI processing
  • Useful for keeping AI responses coherent and on-topic

Generation One Pseudocode

Generation One pseudocode focuses on descriptive languages and data segregation. It's still relevant due to backward compatibility with newer models.

Square Bracket Formula

  • Uses brackets to section off data
  • Interchangeable with curly brackets, parentheses, dashes, or lines
  • Example: [Character Trait]

Quotation Formula

  • Wraps traits or text blocks in quotation marks
  • Ensures specific reference when relevant
  • Example: "Friendly and outgoing"

W++

  • Joins data using plus signs or commas
  • Often combined with other formulas
  • Example: "Trait1" + "Trait2" or "Trait1", "Trait2"

Custom Strings

  • Uses underscores to create unique token strings
  • Helps bypass rigid aspects of AI training data
  • Example: red_clothes vs. red clothes

ELIML

  • Advanced system combining separation, addition, and specification
  • Result of extensive research
  • Helps create more nuanced chatbots

Generation Two Pseudocode

Generation Two pseudocode represents a shift towards more structured, executable languages for AI interaction. It offers greater precision and control over AI behavior, albeit with increased complexity.

Key Features

  1. Structured Approach: Less flexible than Gen1, focusing on precision and executable commands.
  2. Non-Negotiable Outputs: Creates more strictly defined behaviors for the AI to follow.
  3. Developer's Notes: Allows for detailed explanations using hashtags (#) for clarification.
  4. Incompatibility: Not backward compatible with models preferring Gen1 styles.

Common Terminology

Gen2 pseudocode uses coding-inspired commands to control AI behavior:

  • Setting variables: DEFINE, SET, CONST
  • Flow control: function, next, return, run, execute, print, loop, stop
    These commands establish parameters and dictate the logical flow of AI processes.

If/Then Statements

Crucial for adding complexity and nuance to AI behavior. They allow for conditional responses based on specific variables, making interactions more dynamic.

Camel Casing

A naming convention used in Gen2 pseudocode, where compound words are written without spaces and each word after the first begins with a capital letter (e.g., camelCase). This helps organize variables and functions within the more complex Gen2 structure.

Complexity and Power

While more complex than Gen1, Gen2 pseudocode offers greater control and power, particularly useful for advanced techniques like "jailbreaking" AI models or extending their capabilities beyond default settings.

Edit Report
Pub: 31 Aug 2024 23:03 UTC
Edit: 01 Sep 2024 01:20 UTC
Views: 120