My LLM prompt for chat summaries
When actively coding, I’m typically interacting with LLMs via agents. But sometimes I will turn to a chat interface to explore an issue from a bigger perspective or to solve an issue where I want the LLM to explain and advise rather than have it take over. These chats can become lengthy and involve digressions and side branches to solve sub-issues that may not be strictly relevant to the overall goal. There may be facts, procedures and other information that I want to recall from this conversation; but not with all the side-branches that you would find if I just saved a link to the conversation. Even a straight export of the conversation would capture many irrelevant details.
So at the end of a long conversation, I ask the LLM to summarize the conversation so that I can save it in Obsidian. Here is my current prompt for this:
- Reorganize the material into a logical implementation
sequence rather than preserving the conversation's chronology
exactly.
- Document the final working solution, including commands,
scripts, configuration files, explanations, and verification
procedures.
- Include significant troubleshooting discoveries and explain why
particular approaches failed. Exclude irrelevant diversions and
superseded intermediate solutions.
- Distinguish between configurations that were actually tested and
verified, recommendations that were not implemented, and
unresolved issues.
- Preserve the exact content of final working scripts and
configurations wherever available. Do not fabricate missing
details.
- Include YAML frontmatter, descriptive headings, appropriately
labelled code blocks, and relevant references.
- Do not use headings larger than ## (<h2>). In other words, don't
create a title heading. Go straight into the content because I
will supply a title later. Hierarchical headings are encouraged.
Do not number headings though. Do not use bold in headings.
- If a code block consists of exactly one line, convert it to an
inline code block. This saves space.
- Where possible convert ASCII art diagrams into D2 charts and make
use of ```d2 ... ``` in the Markdown because we will often use the
Markdown directly in Obsidian for use with its D2 plugin. If no
diagrams are needed, do not fabricate one. It's OK not to have any
diagrams at all.
- Try to avoid writing one-sentence paragraphs. Prefer clean
narrative style over telegraphic writing.
- Produce a downloadable Markdown file.
If you have suggestions for improving this prompt, or have questions or comments, please get in touch through my contact page.