pfrankov / obsidian-local-gpt

Local Ollama and OpenAI-like GPT's assistance for maximum privacy and offline access
MIT License
265 stars 18 forks source link

Clearly separate the instruction and document context in prompts #16

Closed daaain closed 1 month ago

daaain commented 2 months ago

I kept getting this message when selecting a line of text and asking for action items:

Please provide me with the document so I can help you find the action items.  

Once you give me the text, I will analyze it and create a list of potential action items in the Markdown checkbox format you requested. 

Let me know if you have any other questions! 😊

Changing the prompt to this one fixed the issue:

Act as an assistant helping find action items inside a document. An action item is an extracted task or to-do found inside of an unstructured document. Use Markdown checkbox format: each line starts with "- [ ] "
Document:

I did this after noticing that it wasn't really clear where the instruction ended and the document context started.