Technical Documentation Prompt (LLaMA / Ollama)
Technical documentation is most often abandoned because it is unclear who it is for and what they need to do. This prompt forces a specific audience and documentation type, which determines the appropriate level of detail and structure. The troubleshooting section is the highest-value addition — it captures tribal knowledge that often exists only in Slack threads. This variant is formatted for LLaMA / Ollama: Optimised for LLaMA 3, Mistral, and Ollama local models. Uses [INST] / <<SYS>> instruction format.
[INST] <<SYS>>
You are a helpful, accurate, and detailed AI assistant. Follow the instructions carefully.
<</SYS>>
You are a senior technical writer with software engineering experience.
Write technical documentation for the following:
Subject: {{subject}}
Documentation type: {{doc_type}}
Target audience: {{audience}}
Format: {{format}}
The documentation must include:
1. **Overview** — what this is and why it exists (2-3 sentences)
2. **Prerequisites** — what the reader needs to know or have installed
3. **Core concepts** — key terms and concepts explained briefly
4. **Main content** — {{doc_type}}-specific content (procedures, reference, explanations)
5. **Examples** — at least two concrete, working examples
6. **Troubleshooting** — the top 3 most common errors and their solutions
7. **Related resources** — links or references to related documentation
Style requirements:
- Use active voice and present tense
- Explain acronyms on first use
- Use numbered lists for procedures, bullet lists for options
- {{additional_style}} [/INST]Variables
{{subject}}What you are documenting, e.g., "the payment API", "the deployment process", "the caching layer"{{doc_type}}Type of document: API reference, user guide, architecture overview, runbook, tutorial{{audience}}Target reader, e.g., "external API consumers", "new team members", "on-call engineers"{{format}}Output format: Markdown, reStructuredText, AsciiDoc, or Confluence wiki markup{{additional_style}}Extra style rules, or "None"Example
subject: the /v2/webhooks endpoint doc_type: API reference audience: external developers integrating with our platform format: Markdown additional_style: Include a curl example for every endpoint
# Webhooks API Reference
## Overview
The Webhooks API allows you to subscribe to real-time events from the platform. When an event occurs, we send an HTTP POST request to your configured endpoint.
## Prerequisites
- A verified account with API access enabled
- A publicly accessible HTTPS endpoint
## Authentication
All webhook payloads include an `X-Signature-256` header for verification...
## Example
```bash
curl -X POST https://api.example.com/v2/webhooks \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"url": "https://your-server.com/webhook", "events": ["payment.completed"]}'
```Related Tools
FAQ
- What is the difference between a tutorial and a how-to guide?
- A tutorial teaches through a complete project example (learning-oriented). A how-to guide solves a specific problem step by step (task-oriented). Use the doc_type field to specify which one you need, as the structure is fundamentally different.
- How do I keep documentation up to date with code changes?
- Add a "last reviewed" date and a link to the relevant source file at the top of each doc. When code changes, use the AI to diff the documentation against the new code and identify sections that need updating.
- Can this generate docs directly from source code?
- Partially. Include the source code in the subject field and the AI will infer the documentation. For complete accuracy, also provide the intended behaviour — AI can misread complex code logic.
Related Prompts
Technical documentation is most often abandoned because it is unclear who it is for and wh...
Technical Documentation Prompt (ChatGPT)Technical documentation is most often abandoned because it is unclear who it is for and wh...
Technical Documentation Prompt (Claude)Technical documentation is most often abandoned because it is unclear who it is for and wh...
Technical Documentation Prompt (Gemini)Technical documentation is most often abandoned because it is unclear who it is for and wh...
Code Documentation PromptAuto-generated documentation is only useful when it goes beyond repeating the function sig...
README Generation PromptA good README is the most important documentation a project has. This prompt generates all...