Sounds like you need DataviewJS! You could try something like this:
```dataviewjs
let docs = dv.pages('"FolderName"');
let length = docs.length;
let numberToReturn = 5;
var randos = getRandos(docs, length, numberToReturn);
dv.list(randos);
function getRandos(list, max, itemNum) {
var items = [];
for (var i=0;i<itemNum;i++) {
items.push(list[Math.floor(Math.random() * max)].file.link);
}
return items;
}
You’ll have to replace “FolderName” with the path to your folder of choice.
This code generates five random numbers using Math.random, and it should give you new notes every time you open the document. I tested in my own vault and it seems to work (although duplicates are possible)
(Also you’ll have to turn DataviewJS on in your settings)