Query Your Own Notes With LangChain

Automata Learning Lab · Beginner ·🧠 Large Language Models ·3y ago

Key Takeaways

This video demonstrates how to use LangChain to query and gain insights from personal notes using natural language, integrating with Obsidian as the note-taking app. The video showcases how to load notes into LangChain, create a Vector store index, and ask questions to retrieve specific information from the notes.

Full Transcript

what's up guys in this video we're going to learn how to use Link Chang to ask questions to your own notes let's get started first thing that I'm going to do here is I'm using obsidian as my note-taking app so I'm going to be loading the obsidian loader from linkchang.document loaders then I'm gonna set up the path to the notes where I have everything stored so in this case it's this path where I have my notes that I'm showing here on the right and now I'm gonna load those notes into a link chain using the loader variable that I initialize with the obsidian loader class now I'm going to create my index and right now according to link chain the best best index you can have is Vector store index so that requires chroma DB which you should have installed in your computer you can just run in a notebook pip in stock from a DB then I'm going to load the vector store index Creator and then I'm gonna access The Dot from loaders method giving the loader variable that I initialized here with the loader and create my index perfect now that I created my index the fun part starts I mean it's amazing how easy and simple it is to to do this on your computer so this is an approach that I think is going to change the way that we take notes and that we think in terms of like how we reflect with the computer because now I can just ask a question like what are the a problems I've listed on my 12 problems note about AI research because if I come here to my notes I have a note called 12 problems that I was trying to you know I remember there was this thing about Feynman and a technique that he used to use which was to describe all the 12 main problems that you thought about that you reflected on and I thought it was cool and I started making this list so it has like problems like intelligence generalization with his attention probably credible assignment these are classic problems in artificial intelligence research that I'm interested in that I think are fascinating so I'm asking something very specific what are the problems that I have on this node so now I can say this and now I can use the query with sources method which is gonna get my question and then send it to the index that I created before and return the result so now when I run this there we go so this is the question and the answer is the a problem is listed on the 12 problems node are problem intelligence generalization problem what is attention credit it's it's perfect and it's getting exactly what I needed which was these notes so it's just amazing how it works considering that I'm asking something with natural language right I'm not doing a control F search on my notes I'm asking something to my notes as if my notes you know were in as if I was talking to someone they've read all my notes and remember all my notes and can actually tell me something about what I've written before so this is really cool so now let's let's just create a few more queries so that you guys get a sense for how amazing and Powerful this approach can be for note-taking for productivity for all sorts of stuff so in this one I'm saying summarize my thoughts on technology because I created a note here called thoughts on technology yeah this was just like some random few paragraphs that I just created with judge PT just to see what happens when we ask a question like this so let's take a look technology can be used to augment our capabilities allowing us to represent complex thoughts and pieces of information into Outsource mental capabilities to reduce the effort into Discovery it's important to approach the advancements on the balance of enthusiasms and caution ensuring that co-conspirations and societal implications are addressed so this is really cool because it's getting essentially it's coming here to this node as well as this note called path to focus which I didn't even remember that I had oh this is so amazing and it's combining them meaning it's giving me insight about what I've written that I don't even remember that I wrote and it's really cool because I actually just tested this this was the first time that I tested this this particular query and I did it based on the thoughts on technology nodes so the fact that it kind of like direct me to the to this note that I wrote that I've written a while a while ago is just amazing it's really cool so now let's do another one so this is a bit more precise so this one was more reflexive now let's do one that's more precise so I'm saying give me the main points of my note about automating data science workflows because I had this idea that you know with length chain and these automations are coming up using large language models you know one of the things that's really interesting is how you can automate data science workflows using these kinds of tools so I started writing a few ideas on this topic and I'll show you the note here on my right so this is the note it's a big node I generated with judge PT and then I you know did some magic on it so you have these components problem formulation data set understanding data preprocessing feature engineering Etc right so I'm trying to retrieve those specifically from this node uh so let's see what happens so now I'm querying and let's see the main points of the note about automation Mark flows are leveraging natural language processing and AI driven tools to streamline automate various aspects of data science workflows okay all right so it's kind of like it understood that it's the part about understanding I wish it would have said just problem formulation data set understanding but okay and then using a power language models like jgpt to assist data settings that's like data exploration uh um okay future engineering uh let's open up this thing so that we see it a little bit better section and Report generation okay so it got this part perfect model selection it got this part perfect uh uh model interpretation evaluation let's see okay so the this summary with the points wasn't as perfect as I was you know assuming just because it wasn't comprehensive but it was it was pretty good it was pretty good it got everything almost perfectly right so yeah that's it that's pretty much it this is the power of using link chain for your notes you can essentially query your notes using natural language which for me I think it allows you to have like some Next Level insight into your own thoughts because you can start writing of course you can always connect your notes physically but join these connections by having some kind of model with whom you can chat is really impressive so if you like this video don't forget to like And subscribe and see you next time cheers

Original Description

In this video, I demonstrate how to use LangChain to ask questions and gain insights from your notes using natural language. We'll be using Obsidian as our note-taking app and integrating LangChain to elevate our productivity and understanding of our own notes and thoughts. 00:00 - Introduction 00:15 - Loading Obsidian Loader & Setting Up path to the notes folder 00:41 - Creating Vector Store Index with ChromaDB 01:31 - Querying Notes with LangChain 01:40 - Example 1: Asking Specific Questions 03:30 - Example 2: Asking for Insight 05:10 - Example 3: Asking for Retrieval 06:30 - Reflecting on LangChain Capabilities 07:48 - Conclusion - Subscribe!: https://www.youtube.com/channel/UCu8WF59Scx9f3H1N_FgZUwQ - Join Medium: https://lucas-soares.medium.com/membership - Tiktok: https://www.tiktok.com/@enkrateialucca?lang=en - Twitter: https://twitter.com/LucasEnkrateia - LinkedIn: https://www.linkedin.com/in/lucas-soares-969044167/ Don't miss this game-changing technique for note-taking and personal knowledge management! If you enjoy the video, please like, subscribe, and let me know your thoughts in the comments below. See you next time! Cheers 🚀 #automation #notetaking #machinelearning #langchain #python #artificialintelligence #productivity #datascience #chatgpt #gpt4
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Automata Learning Lab · Automata Learning Lab · 49 of 60

1 A Quick Tutorial on NLP Basics
A Quick Tutorial on NLP Basics
Automata Learning Lab
2 Automating your Digital Morning Routine with Python
Automating your Digital Morning Routine with Python
Automata Learning Lab
3 Exploring Problem Solving with Python and Jupyter Notebook #1
Exploring Problem Solving with Python and Jupyter Notebook #1
Automata Learning Lab
4 Summarize Papers with Python and GPT-3
Summarize Papers with Python and GPT-3
Automata Learning Lab
5 An Experiment Tracking Tutorial with Mlflow and Keras
An Experiment Tracking Tutorial with Mlflow and Keras
Automata Learning Lab
6 Automating Google Forms Submissions with Python
Automating Google Forms Submissions with Python
Automata Learning Lab
7 Productivity Tracking With Python and the Notion API
Productivity Tracking With Python and the Notion API
Automata Learning Lab
8 When your Machine Learning Model Fails Do This ;p
When your Machine Learning Model Fails Do This ;p
Automata Learning Lab
9 Machine Learning Tip#1 Practical Deep Learning Course
Machine Learning Tip#1 Practical Deep Learning Course
Automata Learning Lab
10 Machine Learning Tips: Deep Learning Monitor
Machine Learning Tips: Deep Learning Monitor
Automata Learning Lab
11 Machine Learning Tips#5 MLOPs specialization in Coursera #machinelearning
Machine Learning Tips#5 MLOPs specialization in Coursera #machinelearning
Automata Learning Lab
12 Automatically Changing Desktop Wallpaper with Python and the Nasa Image API
Automatically Changing Desktop Wallpaper with Python and the Nasa Image API
Automata Learning Lab
13 Building an Image Classifier to Filter Out Unused Images From Your Photo Album with Machine Learning
Building an Image Classifier to Filter Out Unused Images From Your Photo Album with Machine Learning
Automata Learning Lab
14 Automating VS Code Snippets with Python
Automating VS Code Snippets with Python
Automata Learning Lab
15 How to Set Up a Machine Learning Environment with Conda and Pip-Tools
How to Set Up a Machine Learning Environment with Conda and Pip-Tools
Automata Learning Lab
16 9 Google Search Tips for Machine Learning
9 Google Search Tips for Machine Learning
Automata Learning Lab
17 Thinking Tools
Thinking Tools
Automata Learning Lab
18 Automating Car Search with Python and Data Science
Automating Car Search with Python and Data Science
Automata Learning Lab
19 Generating Images from Text with Stable Diffusion and Hugging Face
Generating Images from Text with Stable Diffusion and Hugging Face
Automata Learning Lab
20 A Practical Introduction to Data Science using the Spaceship Titanic Dataset from Kaggle
A Practical Introduction to Data Science using the Spaceship Titanic Dataset from Kaggle
Automata Learning Lab
21 Jiu Jitsu App with Python and Streamlit
Jiu Jitsu App with Python and Streamlit
Automata Learning Lab
22 2 Apps for Coding In The Ipad Pro
2 Apps for Coding In The Ipad Pro
Automata Learning Lab
23 From Tensorflow to Pytorch?
From Tensorflow to Pytorch?
Automata Learning Lab
24 Building an Audio Transcription App with OpenAI Whisper and Streamlit
Building an Audio Transcription App with OpenAI Whisper and Streamlit
Automata Learning Lab
25 Productivity Tracking with Python Short Summary
Productivity Tracking with Python Short Summary
Automata Learning Lab
26 Automating Expense Reports with Python
Automating Expense Reports with Python
Automata Learning Lab
27 ChatGPT, Angry Pandas and AI Code
ChatGPT, Angry Pandas and AI Code
Automata Learning Lab
28 7 Strategies To Learn Anything Using ChatGPT
7 Strategies To Learn Anything Using ChatGPT
Automata Learning Lab
29 Building a Thought Summarization App with Whisper and GPT3
Building a Thought Summarization App with Whisper and GPT3
Automata Learning Lab
30 Visualize a Neural Net Learning Polynomial Functions
Visualize a Neural Net Learning Polynomial Functions
Automata Learning Lab
31 Automating Notion with Python
Automating Notion with Python
Automata Learning Lab
32 Pose Tracking for Jiu Jitsu - Update #jiujitsu #machinelearning
Pose Tracking for Jiu Jitsu - Update #jiujitsu #machinelearning
Automata Learning Lab
33 Update to my Pose Tracking for Jiu Jitsu Project #machinelearning #jiujitsu #ai #deeplearning
Update to my Pose Tracking for Jiu Jitsu Project #machinelearning #jiujitsu #ai #deeplearning
Automata Learning Lab
34 ChatGPT API Released by OpenAI
ChatGPT API Released by OpenAI
Automata Learning Lab
35 ChatGPT API Response Format #machinelearning #ai #datascience
ChatGPT API Response Format #machinelearning #ai #datascience
Automata Learning Lab
36 Beyond Stable Diffusion with Composer | Automata Learning Lab Paper Series #1
Beyond Stable Diffusion with Composer | Automata Learning Lab Paper Series #1
Automata Learning Lab
37 Beyond Diffusion Models with Composer #machinelearning #ai
Beyond Diffusion Models with Composer #machinelearning #ai
Automata Learning Lab
38 Machine Learning for Jiu Jitsu
Machine Learning for Jiu Jitsu
Automata Learning Lab
39 Prompt Engineering Basics #machinelearning #gpt4 #chatgpt
Prompt Engineering Basics #machinelearning #gpt4 #chatgpt
Automata Learning Lab
40 Visual ChatGPT: Integrating Images with ChatGPT Paper Series#2
Visual ChatGPT: Integrating Images with ChatGPT Paper Series#2
Automata Learning Lab
41 Visual ChatGPT #machinelearning #ai #artificialintelligence
Visual ChatGPT #machinelearning #ai #artificialintelligence
Automata Learning Lab
42 LERF - Language Embeddings + NERF for Querying 3D Spaces #machinelearning #ai
LERF - Language Embeddings + NERF for Querying 3D Spaces #machinelearning #ai
Automata Learning Lab
43 Summarize Papers with Python and ChatGPT
Summarize Papers with Python and ChatGPT
Automata Learning Lab
44 Large Language Models can use Tools Now! #artificialintelligence #machinelearning #ai
Large Language Models can use Tools Now! #artificialintelligence #machinelearning #ai
Automata Learning Lab
45 Sparks of AGI in GPT4? #machinelearning #ai #agi #artificialintelligence
Sparks of AGI in GPT4? #machinelearning #ai #agi #artificialintelligence
Automata Learning Lab
46 Toolformer: LLMs can use Tools! #chatgpt #llms #gpt4 #gpt3 #artificialintelligence
Toolformer: LLMs can use Tools! #chatgpt #llms #gpt4 #gpt3 #artificialintelligence
Automata Learning Lab
47 Talking to Your Notes with LangChain #artificialintelligence #llms #gpt4 #chatgpt
Talking to Your Notes with LangChain #artificialintelligence #llms #gpt4 #chatgpt
Automata Learning Lab
48 How to Talk to a PDF using LangChain and ChatGPT
How to Talk to a PDF using LangChain and ChatGPT
Automata Learning Lab
Query Your Own Notes With LangChain
Query Your Own Notes With LangChain
Automata Learning Lab
50 HuggingGPT #machinelearning #artificialintelligence #huggingface #gpt4 #chatgpt
HuggingGPT #machinelearning #artificialintelligence #huggingface #gpt4 #chatgpt
Automata Learning Lab
51 Do as I Can Not as I Say Paper #artificialintelligence #llms #reinforcementlearning
Do as I Can Not as I Say Paper #artificialintelligence #llms #reinforcementlearning
Automata Learning Lab
52 Automating Anki Flashcards with OpenAI and GPT-4
Automating Anki Flashcards with OpenAI and GPT-4
Automata Learning Lab
53 Building A PDF Summarization App with  Gradio and LangChain
Building A PDF Summarization App with Gradio and LangChain
Automata Learning Lab
54 Auto-GPT #artificialintelligence #gpt4 #llms #autogpt
Auto-GPT #artificialintelligence #gpt4 #llms #autogpt
Automata Learning Lab
55 DocGPT - Chat with Github #artificialintelligence #gpt4 #chatgpt
DocGPT - Chat with Github #artificialintelligence #gpt4 #chatgpt
Automata Learning Lab
56 LLMs for Research and Planning #artificialintelligence #gpt4 #llms
LLMs for Research and Planning #artificialintelligence #gpt4 #llms
Automata Learning Lab
57 How I Use ChatGPT for Interactive Language Learning
How I Use ChatGPT for Interactive Language Learning
Automata Learning Lab
58 Building an Audio Transcription App with Gradio and Whisper
Building an Audio Transcription App with Gradio and Whisper
Automata Learning Lab
59 Summarizing and Querying Multiple Papers with LangChain
Summarizing and Querying Multiple Papers with LangChain
Automata Learning Lab
60 Mojo - The New AI Programming Language?
Mojo - The New AI Programming Language?
Automata Learning Lab

This video teaches how to use LangChain to query personal notes using natural language, enabling next-level insight into one's thoughts and productivity. By integrating LangChain with Obsidian, users can ask questions and retrieve specific information from their notes.

Key Takeaways
  1. Load notes into LangChain using the Obsidian loader
  2. Create a Vector store index using Chroma DB
  3. Ask questions to retrieve specific information from the notes
  4. Use the query with sources method to get the question and send it to the index
  5. Run the query to retrieve the result
💡 Using LangChain to query personal notes enables users to have next-level insight into their thoughts and productivity by allowing them to ask questions and retrieve specific information from their notes using natural language.

Related Reads

📰
Building Production-Grade LLM Evaluation Pipelines: From Vibes to Metrics
Learn to build production-grade LLM evaluation pipelines by replacing subjective 'vibes' with quantitative metrics
Dev.to · Imus
📰
Building Production-Grade LLM Evaluation Pipelines: From Vibes to Metrics
Learn to build production-grade LLM evaluation pipelines to catch hallucinations before deployment, replacing manual 'vibe checks' with automated metrics
Dev.to AI
📰
AI is more likely than humans to form biases when hiring
AI hiring tools can form biases, even if trained on unbiased data, highlighting the need for careful evaluation and mitigation of these biases
MIT Technology Review
📰
AI & LLM Terminology Glossary: From Tokens to Orchestration
Learn key AI and LLM terminology to improve your understanding of the field and enhance your workflow
Dev.to · mihir mohapatra

Chapters (9)

Introduction
0:15 Loading Obsidian Loader & Setting Up path to the notes folder
0:41 Creating Vector Store Index with ChromaDB
1:31 Querying Notes with LangChain
1:40 Example 1: Asking Specific Questions
3:30 Example 2: Asking for Insight
5:10 Example 3: Asking for Retrieval
6:30 Reflecting on LangChain Capabilities
7:48 Conclusion
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →