Skip to main content

We're excited to be creating more content for you! Additional modules are being added regularly.

Module 1.7

Example: Technical Documentation

Let's walk through the process of creating technical documentation for a new software feature, seeing how different prompt engineering techniques work together to achieve precise, accurate results.

Initial Setup

AI: What can I help with?  
  You: I need to create documentation for a new user authentication feature. Before we begin, I'd like you to act as a technical writer with experience in API documentation. Can you confirm this role and let me know what initial information you'll need?
AI: Yes, I'll approach this from the perspective of a technical writer specializing in API documentation. To create comprehensive documentation, I'll need:
1. The feature's core functionality
2. Target audience (developers, end-users, admins?)
3. Required technical prerequisites
4. Expected documentation format/style guide
 
  You: Thank you. Here's what I can provide:
1. It's a two-factor authentication system for our REST API
2. This is for third-party developers integrating our API
3. Users need basic REST API knowledge and our API key
4. We use OpenAPI/Swagger format with markdown
AI: Understood. I'll structure the documentation following OpenAPI standards for a 2FA REST API integration, aimed at developers with REST experience. Would you like to start with the endpoint specifications or the implementation guide?  

 

Why We Did This:

  • Set technical expertise context
  • Established documentation standards upfront
  • Identified specific audience needs
  • Confirmed format requirements
  • Created focused scope

 

Format Definition

  You: Let's start by defining our documentation structure. Here's our standard format:

# [Endpoint Name]
## Authentication Requirements
## Request Format
## Response Format
## Example Usage
## Error Handling

Can you confirm this structure and suggest any additions specific to 2FA?
AI: I understand the structure. For 2FA documentation, I recommend adding these sections:

# [Endpoint Name]
## Authentication Requirements
- Base API authentication
- 2FA-specific headers
## Request Format
- Endpoint URL
- HTTP Method
- Required parameters
## Response Format
- Success response
- Verification required response
## Implementation Steps
- Initial request flow
- Verification flow
- Session management
## Example Usage
- Initial authentication
- Verification process
## Error Handling
- Error codes
- Troubleshooting
## Security Considerations
- Token lifecycle
- Rate limiting
- Security best practices

Would you like me to explain the rationale for these additions?
 

 

Why We Did This:

  • Provided clear structure template
  • Adapted format for specific needs
  • Maintained standard conventions
  • Added context-specific sections
  • Organized information logically

 

The Whole Picture

While this conversation was broken down into individual sections that we could focus on, the whole thread would look be much longer. We added spaces between each of the sections in the thread below so you can see where it was broken down.

AI: What can I help with?  
  You: I need to create documentation for a new user authentication feature. Before we begin, I'd like you to act as a technical writer with experience in API documentation. Can you confirm this role and let me know what initial information you'll need?
AI: Yes, I'll approach this from the perspective of a technical writer specializing in API documentation. To create comprehensive documentation, I'll need:
1. The feature's core functionality
2. Target audience (developers, end-users, admins?)
3. Required technical prerequisites
4. Expected documentation format/style guide
 
  You: Thank you. Here's what I can provide:
1. It's a two-factor authentication system for our REST API
2. This is for third-party developers integrating our API
3. Users need basic REST API knowledge and our API key
4. We use OpenAPI/Swagger format with markdown
AI: Understood. I'll structure the documentation following OpenAPI standards for a 2FA REST API integration, aimed at developers with REST experience. Would you like to start with the endpoint specifications or the implementation guide?  
   
  You: Let's start by defining our documentation structure. Here's our standard format:

# [Endpoint Name]
## Authentication Requirements
## Request Format
## Response Format
## Example Usage
## Error Handling

Can you confirm this structure and suggest any additions specific to 2FA?
AI: I understand the structure. For 2FA documentation, I recommend adding these sections:

# [Endpoint Name]
## Authentication Requirements
- Base API authentication
- 2FA-specific headers
## Request Format
- Endpoint URL
- HTTP Method
- Required parameters
## Response Format
- Success response
- Verification required response
## Implementation Steps
- Initial request flow
- Verification flow
- Session management
## Example Usage
- Initial authentication
- Verification process
## Error Handling
- Error codes
- Troubleshooting
## Security Considerations
- Token lifecycle
- Rate limiting
- Security best practices

Would you like me to explain the rationale for these additions?
 

 

Key Techniques Used in This Example

Throughout this conversation, we've seen several prompt engineering techniques specific to technical documentation. Like a well-designed API, each technique serves a specific purpose while contributing to the overall system. Let's break down the key techniques:

  1. Precision Setting
    • Used specific technical terms
    • Defined exact requirements
    • Maintained consistent terminology
    • Verified technical accuracy
  2. Format Control
    • Established clear structure
    • Used standardized patterns
    • Maintained documentation standards
    • Ensured consistent formatting
  3. Audience Alignment
    • Matched technical level
    • Used appropriate terminology
    • Maintained consistent perspective
    • Focused on developer needs
  4. Verification Loops
    • Confirmed technical accuracy
    • Validated format compliance
    • Checked completeness
    • Ensured consistency

 

What Makes This Approach Successful

Looking back at our conversation, we can see how each technique contributed to the final result:

  • Precision setting ensured accuracy
  • Format control maintained standards
  • Audience alignment kept focus
  • Verification loops guaranteed quality

Most importantly, these techniques worked together to create documentation that is both technically accurate and practically useful.

 

Try It Yourself!

Choose a technical feature to document and follow this pattern:

  1. Define technical scope and audience
  2. Establish documentation structure
  3. Create content with precise terminology
  4. Verify accuracy and completeness
  5. Review for technical clarity

Putting It All Together

Now that you've completed this practice experience, be sure to check out the next example!