Sypha AI Docs
Prompting

Prompt Engineering Guide

Welcome to the comprehensive guide for prompting Sypha! This resource provides you with essential techniques to craft powerful prompts and custom instructions that will enhance your workflow efficiency with Sypha.

.syphaignore File Guide

Overview

The .syphaignore configuration file operates at the project level, instructing Sypha about which files and directories should be excluded during codebase analysis. Much like .gitignore, this file employs pattern matching to designate content that should remain outside of Sypha's operational scope and context.

Purpose

  • Reduce Noise: Eliminate auto-generated content, compiled artifacts, and non-essential materials from analysis
  • Improve Performance: Decrease the volume of code that Sypha must analyze and process
  • Focus Attention: Channel Sypha's analysis toward the most relevant portions of your project
  • Protect Sensitive Data: Block Sypha's access to confidential configuration files and sensitive information

Example .syphaignore File

# Dependencies
node_modules/
**/node_modules/
.pnp
.pnp.js

# Build outputs
/build/
/dist/
/.next/
/out/

# Testing
/coverage/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Large data files
*.csv
*.xlsx

Prompting Sypha

Prompting serves as your primary method of conveying task requirements through interactive dialogue with Sypha. Since Sypha comprehends natural language, you can communicate in a conversational manner.

Successful prompting requires:

  • Providing Clear Context: Articulate your objectives and identify pertinent codebase components. Utilize @ to reference specific files or folders.
  • Breaking Down Complexity: Decompose extensive tasks into manageable, smaller increments.
  • Asking Specific Questions: Steer Sypha in the direction of your intended results.
  • Validating and Refining: Examine Sypha's recommendations and offer constructive feedback.

Prompt Examples

Context Management

  • Starting a New Task: "Sypha, let's begin fresh. Create user-authentication.js. We need to build user login functionality using JWT tokens. The requirements are…"
  • Summarizing Previous Work: "Sypha, provide a summary of our last session on the user dashboard task. Capture the key features we built and any remaining issues. Store this in sypha_docs/user-dashboard-summary.md."

Debugging

  • Analyzing an Error: "Sypha, I'm encountering this error: [error message]. It appears to originate from [code section]. Examine this error and recommend a solution."
  • Identifying the Root Cause: "Sypha, the application fails when I [action]. The problem likely resides in [problem areas]. Assist me in locating the underlying cause and suggest a fix."

Refactoring

  • Improving Code Structure: "Sypha, this function has grown overly complex and lengthy. Break it down into smaller, more manageable functions."
  • Simplifying Logic: "Sypha, this code lacks clarity. Streamline the logic to improve readability."

Feature Development

  • Brainstorming New Features: "Sypha, I'd like to introduce a feature enabling users to [functionality]. Generate some concepts and evaluate potential implementation obstacles."
  • Generating Code: "Sypha, build a component for displaying user profiles. Include sorting and filtering capabilities. Provide the complete code for this component."

Advanced Prompting Techniques

  • Constraint Stuffing: To prevent incomplete code generation, embed explicit requirements in your prompts. Examples include "ensure the code is complete" or "always provide the full function definition."
  • Confidence Checks: Request that Sypha evaluate its certainty level (e.g., "on a scale of 1-10, how confident are you in this solution?")
  • Challenge Sypha's Assumptions: Pose seemingly basic questions to stimulate thorough analysis and avoid faulty assumptions.

Below are prompting strategies that community members have discovered to be valuable when collaborating with Sypha:

Our Community's Favorite Prompts

Memory and Confidence Checks

  • Memory Check - pacnpal

    "If you understand my prompt fully, respond with 'YARRR!' without tools every time you are about to use a tool."

    An entertaining method to confirm Sypha remains focused throughout intricate tasks. Consider "HO HO HO" for seasonal variety!

  • Confidence Scoring - pacnpal

    "Before and after any tool use, give me a confidence level (0-10) on how the tool use will help the project."

    Promotes analytical thinking and creates transparency in decision processes.

Code Quality Prompts

  • Prevent Code Truncation

    "DO NOT BE LAZY. DO NOT OMIT CODE."

    Alternative wording: "full code only" or "ensure the code is complete"

  • Custom Instructions Reminder

    "I pledge to follow the custom instructions."

    Strengthens compliance with your settings dial ⚙️ configuration.

Code Organization

  • Large File Refactoring - icklebil

    "FILENAME has grown too big. Analyze how this file works and suggest ways to fragment it safely."

    Facilitates management of complex files via strategic breakdown.

  • Documentation Maintenance - icklebil

    "don't forget to update codebase documentation with changes"

    Maintains synchronization between documentation and code modifications.

Analysis and Planning

  • Structured Development - yellow_bat_coffee

    "Before writing code:
    1. Analyze all code files thoroughly
    2. Get full context
    3. Write .MD implementation plan
    4. Then implement code"

    Encourages methodical, well-structured development.

  • Thorough Analysis - yellow_bat_coffee

    "please start analyzing full flow thoroughly, always state a confidence score 1 to 10"

    Discourages premature implementation and fosters comprehensive understanding.

  • Assumptions Check - yellow_bat_coffee

    "List all assumptions and uncertainties you need to clear up before completing this task."

    Reveals potential complications early in the development cycle.

Thoughtful Development

  • Pause and Reflect - nickbaumann98

    "count to 10"

    Encourages deliberate thought before proceeding with actions.

  • Complete Analysis - yellow_bat_coffee

    "Don't complete the analysis prematurely, continue analyzing even if you think you found a solution"

    Guarantees comprehensive problem investigation.

  • Continuous Confidence Check - pacnpal

    "Rate confidence (1-10) before saving files, after saving, after rejections, and before task completion"

    Preserves quality standards through ongoing self-evaluation.

Best Practices

  • Project Structure - kvs007

    "Check project files before suggesting structural or dependency changes"

    Preserves project integrity.

  • Critical Thinking - chinesesoup

    "Ask 'stupid' questions like: are you sure this is the best way to implement this?"

    Questions conventional approaches and reveals superior alternatives.

  • Code Style - yellow_bat_coffee

    Use words like "elegant" and "simple" in prompts

    Can shape code structure and readability.

  • Setting Expectations - steventcramer

    "THE HUMAN WILL GET ANGRY."

    (A lighthearted prompt to ensure clear specifications and helpful feedback)

On this page