Prompt Writing Guide
# Prompt Writing Guide This document provides reusable, high-fidelity prompt templates, frameworks, and guidelines on how to author and configure production-grade, deterministic AI prompts. It aligns prompt designs with the [AI Engineering Standards](file:///d:/projects/Nexulyt-AI-OS/standards/ai-engineering-standards.md). --- ## 1. Overview * **Purpose**: Provide developers with a systematic methodology to write instructions that minimize LLM hallucinations, enforce output formats, optimize system boundaries, and regulate context usage. * **When to Use**: When creating new prompt configurations, writing agent system profiles, constructing prompt-based templates, or refining LLM interaction loops. * **Inputs**: Target tasks, framework preferences (e.g., CO-STAR), output schema definitions, variables configurations, and context scopes. * **Expected Outputs**: Production-grade system prompts, few-shot examples layouts, context boundary structures, and instruction filters. * **Best Practices**: - Leverage structured XML tags (`<identity>`, `<instructions>`, `<constraints>`) to separate prompts sections. - Define explicit output models (JSON schemas, YAML) to enable automated downstream parsing. - Run prompts through systematic evaluations using representative benchmark sets before committing to production. * **Common Mistakes**: - Utilizing vague descriptors like "be helpful" or "avoid bad quality code" instead of concrete, actionable rules. - Hardcoding variables in the prompt instead of using standard templating variables (e.g., `{{VARIABLE_NAME}}`). --- ## 2. Prompt Engineering Frameworks ### CO-STAR Prompting Framework Use the CO-STAR structure to construct comprehensive prompts: * **Context (C)**: Provide background on the task or scenario. * **Objective (O)**: State the exact task the model must perform. * **Style (S)**: Define the tone and writing persona (e.g., technical analyst). * **Tone (T)**: Establish the execution vibe (e.g., direct, objective). * **Audience (A)**: Detail who will consume the output (e.g., backend developers). * **Response (R)**: Enforce the precise format (e.g., JSON schema, Markdown tables). ### CREATE Prompting Framework Use the CREATE structure for task-oriented outputs: * **Character (C)**: Define the role or expert persona. * **Request (R)**: Clearly state the goal or request. * **Examples (E)**: Embed few-shot input-output pairs to guide the model. * **Adjustment (A)**: Outline negative constraints (what *not* to do). * **Type (T)**: Enforce the output structure (e.g., code diff, checklist). * **Execution (E)**: Guide the logical path the model should take. --- ## 3. Prompt Templates ### System Prompt & Meta-Prompt Blueprint
fill the variables
This prompt has 1 variable. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{{VARIABLE_NAME}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo Shivangkesarwani/Nexulyt-AI-OS (MIT). A "Prompt Writing Guide" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
Shivangkesarwani/Nexulyt-AI-OS · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions