Thoughts on applications of AI or "smarts" in SilverBullet

The idea of Tempated prompts is awesome. It is such a simple idea, but clearly useful in a lot of context. I’ve been stealing it for my personal projects. One addition I think would help is to template out a chat instead of just one message.

I have found that sometimes sending a chat(messages field in OpenAI API) instead of just a single message yields better output. For example instead of sending

- system: You are Summarizer AI, summarize stuff.
- user: [context]\nSummmarize this to 5 bullet points

if we can template out the following

- system: You are Summarize AI, ask me for context
- user: I'll provide you context and instructions to stigmatization
- assistant: What is the context
- user: [context]
- assistant: What additional instructions do you want to provide
- user: Summarize it to 5 bullet points.

I know the UX might be a bit more complex than the current one but just thought I would bring it up for consideration.

Yap looks pretty neat! I don’t use emacs much anymore, but I might play around with it.

I really like your template chat idea. It makes sense that a multi-turn conversation could perform better than a single message. I’ll probably make it something you can enable/disable per template. It shouldn’t be too difficult since we already have the chat mode anyway.

1 Like

Agreed, commands (and functions?) probably make more sense than syscalls. I’m not sure how best to add the description. I guess just adding a description field would be the simplest route.

Something else I’ve been thinking about is how far should the ai plug go? E.g. I have a personal chatbot I’ve been playing around with for some home automation stuff. In theory, there’s no reason I couldn’t convert the tools I wrote in python to space-script functions. I even thought of adding a custom api endpoint so I could have external (personal) apps ask about things in my notes.

I made a first pass at adding this functionality, you can see an example at the bottom of Templated Prompts — SilverBullet AI Plug but it basically looks like below and if you set chat: true it will process the template similar to how the ‘chat on page’ command works.

---
tags:
- template
- aiPrompt

description: "Generate a summary of the current page."
aiprompt:
  description: "Generate a summary of the current page."
  system: You are an AI Note Summary bot.  Help the user create useful and accurate summaries.
  slashCommand: aisummarychat
  chat: true
  enrichMessages: false
---

**user**:  I’ll provide the note contents, and instructions.
**assistant**: What are the note contents?
**user**: title: {{@page.name}}
Everything below is the content of the note: 
{{readPage(@page.ref)}}
**assistant**: What are the instructions?
**user**: Generate a short and concise summary of the note.
2 Likes