DataView queries for newbies (like myself) with AI help (for free)
Our regular forum poster @holroy handles user questions in the Help section but for easy everyday tasks users are encouraged to take their own initiative.
Enter AI help.
@johnmavrick created a plugin called Intelligence that makes use of Open AI assistants that can be put to use in Chat-GPT conversations.
Using those assistants is not free. They’re not expensive but some people may not even have debit or credit cards…
He created 4 files that can be used for prompts or context – we will use those in the Copilot plugin with the free Google AI Studio’s Gemini Pro API that can be acquired and used for non-supported countries as well if one uses a VPN.
- Read the linked post as well with my comment about VPN and what to use, again, for free.
In Copilot settings, you add your newly acquired API from Google Gemini and might want to turn up the Token limit so you won’t be hindered.
Then in the Copilot sidebar press the “Send Note(s)” button. → ‘No active note found.’
Yes, you need to be on the note you want to upload.
These are in the order:
Dataview Assistant Prompt.md (3.7 KB)
Dataview Data Commands.md (2.8 KB)
Dataview Expressions.md (1.6 KB)
Dataview Functions.md (21.9 KB)
Save these files in your vault under a folder you will easily find them. Make these notes active by opening them and one by one press the ‘Send Note(s)’ button now (you need to feed all four to the robot). The bot (which is now working on Gemini Pro, right) will acknowledge reading the files.
Finally, pose your question to what query you want to make.
Couple of tips:
- If you specify the full vault to be queried, it might give you
FROM "vault"
, which is incorrect;FROM ""
is correct for full vault. - If your vault is too large, try to limit results for a smaller folder first to see that the robot got the requirements right in the first place.
- If the robot didn’t get it right the first time, don’t give up.
Credits go to people named and linked above for the ideas and the actual implementation.
EDIT. (Hopefully) Fixed fourth file not being able to be sent.
There is also S-Blu’s online Query Builder that many people by now know about:
https://s-blu.github.io/basic-dataview-query-builder/