QuickAdd/Smart Connections Integration--How to Improve/expand

I set up this very rough combo of Smart Connections and Quick Add to generate a prompt based on the text I’m currently writing and then find notes in my vault that are related to the prompt, which are displayed in the right sidebar. It works like this:

  1. Ask AI (via QuickAdd AI Assistant) to come up with a writing prompt from the selected text using this prompt:

{{selected}}

Please generate one single writing prompt to continue writing the text selection provided above. Ensure the prompt is detailed and specific in its direct relation to the selected text.

Here is a list of Obsidian (Markdown) links related to the topic. Please include 1-2 of these links in the prompts that you generate and include a list of the links in Markdown syntax at the end of your response, with one link per line.

INCLUDE A LIST OF ALL MARKDOWN LINKS PRESENT IN THE TEXT SELECTION at the end of your response!!!

  1. Then I have a note titled “Prompts and Brainstorming” that I keep pinned in the right sidebar. I capture the output of the AI to that file using the template below to call up the Smart Connections blocks that are similar.
#  {{LINKCURRENT}} - {{DATE}}
*{{VALUE:output}}*

```smart-connections
{{VALUE:output}}

So the source code of the output note looks like this:

and the rendered version looks like this:

I wish I could set the Smart Connections query to return only the top 10 results and also to limit the results to notes contained within a specific folder. It seems like there isn’t currently a way to do it, but would love to hear folks ideas on how to expand/improve this very rough first iteration of a brainstorming/prompting tool for my dissertation :slight_smile: