Skip to main content

AI Prompts for Documentation

This file contains example prompts for using AI tools to generate documentation.

Example Prompts​

Creating a New SDK Documentation Page​

Create a documentation page for the [Language] SDK following this structure:

1. Installation instructions using [package manager]
2. Initialization example with API keys
3. Basic usage example for evaluating a feature flag
4. Example with user context for targeting
5. Integration example for [framework]
6. Caching configuration
7. Error handling example
8. Best practices section

Use the existing SDK documentation pages as a reference for style and format.
Include code examples in [language] with proper syntax highlighting.

Adding a New Feature Guide​

Write a guide for [feature name] that includes:

1. Overview of what the feature does
2. When to use this feature
3. Step-by-step setup instructions
4. Configuration options
5. Code examples in TypeScript, Python, and .NET
6. Common use cases
7. Best practices
8. Troubleshooting tips

Follow the style guide: present tense, second person, short paragraphs, clear headings.
Include at least 3 code examples showing different scenarios.

Updating API Reference​

Update the API reference for the [endpoint name] endpoint:

1. Endpoint URL and HTTP method
2. Request parameters with types and descriptions
3. Request body example (JSON)
4. Response format with example
5. Error responses with status codes
6. Rate limiting information
7. Authentication requirements

Use the existing API reference pages as a template.
Include realistic example requests and responses.

Creating a Troubleshooting Guide​

Create a troubleshooting guide for [common issue] that includes:

1. Symptoms of the issue
2. Common causes
3. Step-by-step troubleshooting steps
4. Code examples showing the problem and solution
5. Prevention tips
6. When to contact support

Write in a clear, helpful tone. Use code blocks for examples.
Include both the incorrect and correct approaches.

Tips for Using AI Prompts​

  1. Be Specific: Include details about format, style, and structure
  2. Provide Context: Reference existing documentation for consistency
  3. Request Examples: Always ask for code examples
  4. Specify Languages: Mention which programming languages to include
  5. Review Output: Always review and verify AI-generated content

Best Practices​

  • Verify Accuracy: Check all technical details
  • Test Code Examples: Ensure code examples work
  • Check Links: Verify all links are correct
  • Follow Style Guide: Ensure content matches our style
  • Add Value: Don't just copy existing content

Getting Help​

If you need help crafting prompts or have questions about using AI tools for documentation, open an issue or contact the documentation team.