## Video - [[Dataview AI video mock note]] ## Weekly Progress ```button name Add New Weekly Progress type command action QuickAdd: Insert Project Weekly Progress Addon ``` ^button-weeklyProgress ### [[2023-W52]] #### W52 Plan P-#### W52 Reflection R-## Reflection **Satisfied?** - Yeah, was nice to get back into editing - Packaging and intro could have been better but I'm glad I was able to make something that was original and actually worked :) **Improvements and solutions learned for the future**: - Focus on packaging at the start and morph content you want to share around it ## Progress - [ ] Upload to descript Video editing - [ ] Watched through it once ## Details ### Packaging ### Title - Dataview Queries made easy using AI - Use AI To Build Your Second Brain in Obsidian MD - Use AI To Build Your Obsidian MD Second Brain (Dataview Example) **What emotion are you trying to convey?** ### Thumbnail - ### Description ### Tags ## Outline ### Intro **Hook** - %% WIth AI, you can now easily use complicated Obsidian plugins in your vault without being a coding prodigy so %% - With AI, you can now spend less time reading documentation and tutorials for complicated plugins and instead spend more time building your second brain - %% Obsidian community plugins like Dataview can give you tools to create the most elaborate workflows, but customizability inevitably comes with learning curves and complexity %% **Brief outline of topics covered:** - One of these plugins is Dataview, a powerful plugin that treats your notes as a database you can search from. But unfortunately, this powerful functionality comes at the cost of a high learning curve. For each search query you want to make, you have to know the different clauses, variables, expressions, and functions you can use to create these queries, and on top of all the other plugins you have to learn, it's a lot to digest at once, especially if you're a beginner - So, in this video I'll show you can instead chat with ChatGPT and AI assistants to create these working queries for your Obsidian vault ### Content - So to get AI to do what we want it to, we need to give it instructions - After experimenting, I've created my own prompt to specifically help us with creating dataview queries - This prompt tells it what - we expect it to do, - explains what a dataview query is, - gives it common components of a dataview query, - and shows examples of questions and expected answers - You can find this prompt on my published website - %% In the prompt there's different parts %% - %% We tell it the actions we want it to do %% - %% We inform it on what a dataview query is %% - %% And we give it some commonly used variables %% - Now, we can just copy this and paste into a new ChatGPT conversation - Then after, we can explain the type of query we want to create - So as an example, in my vault I store the notes from videos i watched, which are created using this input template - If we go into an existing one like [[The Myth of Productivity]], each book note has the input/videos tag, and also has different metadata to classify the video like the status, related links, and source - Let's say we wanted to make a query to show all our video notes, _which_ will show these qualities - We can see an example query in [[My Videos Temp]] - We can go back to ChatGPT and casually ask something like - Please create a query that shows all my notes with the tag `#input/videos`, and for each note show the Status, Links, and Source fields - If we try this in our notes, it works! But I want to make some adjustments: - I don't know how the order they're being sorted, so I want to order it by when they were created, starting with the most recent - I also see that some of my template files are showing, and I want to hide those - So, we can go back to ChatGPT and ask it to make the following revisions: - Can you please update the query by also sorting it by created date in descending order and by not including the files in the "Hidden" folder? - Now we can try it and see that it works! - Of course, you can also feel free to customize the prompt to add extra information, and to try this for other things like templater plugin - This is good for basic queries, but if you want to add more example commands or information that won't fit in the context window, then we can use AI assistants - AI assistants are a recently added OpenAI feature that lets you create agents that follow your instructions and are based off your notes - So for some other additional functionality I have added three new files: - Dataview Data commands, which gives further detail and examples on how to use different clauses - Dataview Expressions, which shows the different arithmetic or logic expressions allowed - And lastly Dataview functions which shows the method to manipulate data - So, now we can create an openAI account and go to platform and assistants to create this, but since these notes are already in obsidian i'm going to shamelessly use my newly made plugin that lets you create assistants from your notes - Community plugins -> intelligence - Get API key - Paste in settings - So now we can run command to open intelligence and see the new pane - To create an assistant, we will need instructions, which is the prompt we used earlier and files - Copy prompt - For files, I already have this note with the links to the related notes so I am going to open it and run command "Intelligence Create From Active Note" - Create this new assistant, and then submit - So now we can ask it a more complex question that uses the different notes - Want to limit it to 10, which will need to get from data commands note - Want to have one of the shown fields the addition of outgoing and ingoing links, which will get from expressions note for addition and functions note to know how to get the length of the list of links - So we can ask it the following: - Please create a query that shows all my notes with the tag `#input/videos`, and for each note show the Status, Links, Source and "Total Links" field, which you can calculate by adding the total of the file's incoming and outgoing links. - Copy it and paste it ### Conclusion - Thanks for watching until the end! - If you have questions or want to help by coming up with better prompts or more use cases for other plugins, you can join my discord server 👍 \*\*What are some relevant references or links? - If you're interested in learning how else you can use AI in Obsidian, you can check out my AI in Obsidian playlist - If you want to learn more about - Alternatively, if you want to see how you can effectively use these dataview queries in your vault to enhance your note taking organization, you can check out this video here Anyways, if you enjoyed this video, please like and subscribe for more content like this. This has been john mavrick, stay mindful