Today thanks to a NetworkChuck video I discovered OpenWebUl and how easy it is to set up a local LLM chat assistant. In particular, the ability to upload documents and use them as a context for chats really caught my interest. So now my question is: let’s say l’ve uploaded 10 different documents on OpenWebUl, is there a way to ask llama3 which between all the uploaded documents contains a certain information (without having to explicitly tag all the documents)? And if not is something like this possible with different local lIm combinations?

  • shaked_coffeeOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    Ok thank you for your explanation! So basically if I would want an LLM to answer me basing itself on a large set of documents this would be the wrong approach (because of the context window problem other comments were mentioning)… but then how could I do?

    • projectmoon@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      6 months ago

      A vector search converts your query into magic numbers, and then searches the database for other magic numbers that are “similar” (closet to it in the vector space, which is basically an N-dimensional graph of points and directions). These results are then returned as snippets to the LLM and it does stuff from that point.

      The effectiveness of the vector search depends on how Open WebUI breaks up the documents into smaller sections, and how good the embeddings are.

      I’m not exactly sure what you want to achieve, but you might have success in using an LLM to summarize the documents beforehand, using a specific prompt to extract the info you want, then feed that into the vector DB. This would require some scripting, of course.

      The easiest thing to do is try it. See if Open WebUI’s vector search is able to handle it. Make sure to use a good embedding model like nomic-embed-text (can be found on ollama.com). You can change the vector search settings in the documents settings from the workspace on OpenWebUI.

      Edit: https://ollama.com/library/nomic-embed-text