Supercharge Your Chatbots with Real-Time Data: C# and Kernel Memory RAG Tutorial

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 18

  • @victorfarias1682
    @victorfarias1682 4 місяці тому

    Omg thanks for this video

  • @ChingCui-x9h
    @ChingCui-x9h 8 днів тому

    Thanks for the video. I have downloaded the code and modified to import pdf documents with ollama. But there is an odd issue, if I only import one pdf document and I get the correct answers for the question. If I import both documents, it seems the answer is not correct anymore noticing the second PDF document interferes with the first doc. Any ideas what went wrong?

    • @MaximumCode
      @MaximumCode  8 днів тому

      what kind of data does your pdf have? Check the values when you are doing the semantic search. I will make a test and get back to you with multiple docs.

    • @MaximumCode
      @MaximumCode  8 днів тому

      I recently added an additional document and a question, receiving the expected response. I have the following for ollama. My embedding is "mxbai-embed-large:335m" and the LLM used is "mistral:7b-instruct-v0.3-fp16". I have the "AlbertEinstein.txt" and the pdf for "Semantic Kernel" github.com/microsoft/kernel-memory/blob/main/examples/205-dotnet-extract-text-from-docs/file1.pdf. I converted the pdf into text and imported the document. Hope this helps.

  • @Kevmoens
    @Kevmoens 12 днів тому

    What are the limitations for documents being imported? (Size of each file, number of files)

    • @MaximumCode
      @MaximumCode  11 днів тому +1

      @Kevmoens This really depends on what your data store is and your file type that you want to index. For example there are a few bugs in the Kernel Memory and you can find more results here: github.com/microsoft/kernel-memory/issues?q=file%20size. That said I personally have not had any issues when I was testing the product. That said I also didn't have huge gig files either. I hope this helps. If you do run into issues you can always post a bug to the github repo and folks will get back to you.

  • @pradeepbanajawad149
    @pradeepbanajawad149 2 місяці тому

    Good video with Rag.
    only question when we use multiple documents, it'll couldn't handle

    • @MaximumCode
      @MaximumCode  2 місяці тому

      how many documents did you have?

    • @pradeepbanajawad149
      @pradeepbanajawad149 2 місяці тому

      @@MaximumCode - I have presented this to our team, they really like it and they asked me for multiple pdf (we have so many pdf regarding to our project and documentation). The question is how can do with several document.
      please help me on this or please make an video for multiple documents and chat with that.

    • @MaximumCode
      @MaximumCode  2 місяці тому

      @@pradeepbanajawad149 I have had no issues with multiple documents. How big are your documents? Can they be catofrized into different subjects? Can you share some of your pdf files and I can test them? Along with the queries that are not working? One more thing what LLM are you using?

  • @林君翰-o2k
    @林君翰-o2k 2 місяці тому

    when I execute the function kernelMemory.AskAsync, there is an error occurs "input span arguments must not be empty". How do I solve this problem?

    • @MaximumCode
      @MaximumCode  2 місяці тому

      You are most likely sending it an empty query. Also are you running the code from this video? If so what steps are you taking to get the failure?

    • @林君翰-o2k
      @林君翰-o2k 2 місяці тому

      @@MaximumCode when the system send me a message "Document imported successfully. what would you like to retrieve?", I send question like ""what's Albert Einstein's formula?" then the error messages occured.

    • @MaximumCode
      @MaximumCode  2 місяці тому

      @@林君翰-o2k I just downloaded the code and went through the steps you outlined, and I am not able to reproduce the error you are getting. What LLM are you using in Ollama?

    • @林君翰-o2k
      @林君翰-o2k 2 місяці тому

      @@MaximumCode I choose Document option to import the file "AlbertEinstein.txt", but it shows a message "not found". I check VectorDirectory folder that a new json file generated so I neglected the previous error message. Next, I restart the program, I choose Chat with Knowledge Base option and then it still shows a message "not found". So I think the program can't read the json file in VectorDirectory folder so that the error occured.

    • @MaximumCode
      @MaximumCode  2 місяці тому

      @@林君翰-o2k Build the solution then check the bin directory of the ChatWithAKnowledgeBase. You should have the AlbertEinstein.txt there. If not that is your issue. You can also get the full path with the "c:\\AlbertEinstein.txt" and that should work as well. If you have spaces in your folder path then put double quotes around the path. Next try to import the file. After you import check the bin directory of the VectorDirectory to see if the file got imported. Hope this works for you.