Custom Prompts
How to use custom prompts.
Custom prompts in Copilot for Obsidian offer a powerful way to tailor your AI assistant to your specific needs. It's one simple key stroke away in the chat input box, just type /
to bring up the modal of your existing prompts.
By creating and using custom prompts, you can automate complex tasks, generate ideas, and analyze your notes in ways that suit your unique workflow.
The key to effective custom prompts is experimentation. Try different approaches, refine your prompts over time, and discover new ways to enhance your productivity with Copilot for Obsidian.
Here's a quick glimpse of a list of my own custom prompts:
What are Custom Prompts?
Custom prompts are user-defined instructions or queries that you can save and reuse within Copilot. They can include placeholders for selected text, specific notes, or even entire folders, making them highly versatile.
Creating a Custom Prompt
- Open the Command Palette in Obsidian (Cmd/Ctrl + P).
- Search for and select "Copilot: Add custom prompt".
- A modal will appear with two fields:
- Title: A unique name for your prompt.
- Prompt: The actual content of your prompt.
Writing Effective Custom Prompts
When creating your prompt, you can use several special placeholders:
{}
: Represents the selected text in your note.{[[Note Title]]}
: Represents the content of a specific note.{activeNote}
: Represents the content of the currently active note.{FolderPath}
: Represents all notes within a specific folder.{#tag1, #tag2}
: Represents all notes with any of the specified tags. Note that the tag must be in the note property to work!
Example prompt:
Come up with multiple choice questions using {activeNote}, and follow
the format of {[[Quiz Template]]} to start a quiz session.
Ask one question each time, stop and wait for the user.
After the user answers, provide the correct answer and explanation.
Then immediately ask the next question.
Repeat this process until the user says STOP.
No need to show "User Answer" literally in the session.
This prompt would start a quiz session on your active note following your existing quiz template. This is one of my own prompts that I find highly useful.
Applying a Custom Prompt
You can mainly 2 options. If you'd like to apply the custom prompt to your text selection, use this approach:
- Select the text you want to apply the prompt to.
- Open the Command Palette.
- Select "Copilot: Apply custom prompt".
- Choose your saved prompt from the list. It then triggers the prompt in the chat pane.
Or, an easier way is to use the /
command in the chat input box. It brings up a modal of your existing prompts to fill into the chat input with one click!
Ad-hoc Custom Prompts
If you want to use a custom prompt without saving it:
- Open the Command Palette.
- Search for and select "Copilot: Apply ad-hoc custom prompt".
- Enter your prompt in the modal that appears.
- Press Enter to apply the prompt.
Managing Custom Prompts
- To edit a prompt: Use the "Copilot: Edit custom prompt" command.
- To delete a prompt: Use the "Copilot: Delete custom prompt" command.
Tips for Using Custom Prompts
- Be specific in your instructions to get the best results.
- Use placeholders to make your prompts dynamic and reusable.
- Consider creating prompts for common tasks like summarization, comparison, or idea generation.
- You can turn on debug mode in Copilot settings to see how your prompt is processed.