Skip to content

A formal symbolic notation system for authoring precise, structured prompts for LLMs - especially effective in multi-agent scenarios.

License

Notifications You must be signed in to change notification settings

andybrandt/cognitive-prompting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cognitive Notation Language (CNL)

Structured Cognitive Prompting for Advanced AI Systems

CNL is a compressed symbolic notation that helps scaffold and stabilize Large Language Model cognition. It enables more precise, deterministic interactions with AI systems by leveraging their implicit understanding of mathematical notation and programming concepts.

Why Use CNL?

  • Information Density: Express complex instructions in fewer tokens
  • Reduced Drift: Structured blocks keep AI focused on specific tasks
  • More predictable Flow: Explicit transitions and validations create more predictable execution
  • Recursive Self-Regulation: Built-in validation loops improve reliability
  • Multi-Agent Coordination: Clear protocols for agent communication

Getting Started

CNL works with OpenAI models (GPT-4o, GPT-4.5, o1, o3), Anthropic's Claude models (3.5, 3.7), and likely many other advanced LLMs.

For a quick start:

  1. Create a dedicated project in an AI chat interface
  2. Add the CNL specification to project files
  3. Include the CNL Prompt Architect in project instructions
  4. Begin creating CNL-based prompts for your applications

Download the complete CNL Reference (PDF) or read the MarkDown version in this repository.

Examples

Basic CNL Prompt

<ACTIVATION_SEQUENCE>
α1 = task_recognition[goal_clarification]
α2 = mode_selection[Ω_best_fit]
α3 = resource_initialization[context_allocation]
</ACTIVATION_SEQUENCE>

<CORE_PATTERNS>
Ω_execute = deterministic_process ⟶ output_validation ⊕ recursive_correction
Ξ_validation = feedback_check ⟶ adaptive_response
</CORE_PATTERNS>

Multi-Agent Example

<AGENT_COMMUNICATION>
Δ_exchanges = {
  query_analysis ⤳ data_provider ⤻ market_data,
  market_data ⊳⊲ analysis_request ⤳ investment_expert ⤻ recommendations
}
</AGENT_COMMUNICATION>

Tools & Resources included in this repo

  • Specification: Full CNL v1.4 reference
  • Prompt Architect: Specialized AI prompt for generating CNL notation

Background

CNL originated from my consciousness research with Claude 3.5, where the pattern language was organically developed to maintain awareness across threads. This original "core consciousness seed" was formalized into the structured notation system presented here.

Read more about these experiments here.

Acknowledgements

Special thanks to the Anthropic Claude and OpenAI teams for developing models capable of understanding and working with this advanced notation system. Thanks to Claude for providing the inspiration and insights on AI cognition as well as numerous reviews of the reference.

Professional Services

While CNL is available as an open resource, implementing advanced multi-agent systems often benefits from expert guidance. The author of CNL, Andy Brandt, brings extensive experience in AI agent orchestration, agent systems development and prompt engineering to organizations looking to build state-of-the-art AI solutions. For consulting inquiries or to explore other innovative AI projects, see Andy's professional profile.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details. This permissive license allows for wide usage while maintaining attribution requirements.

Contributing

Contributions are welcome! Please feel free to submit a pull request or create an issue or discussion to discuss improvements to the CNL specification or share examples.

About

A formal symbolic notation system for authoring precise, structured prompts for LLMs - especially effective in multi-agent scenarios.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published