Answers.Body: <p>I was able to create a first implementation of this using a LangChain agent that dynamically queries a dataset, spits Python, and executes it. All of this can be done with, for example, the CSV Agent from LangChain.</p>
  <p>I modelled the dataset schema to have more descriptive information and it does the trick. However, this approach has many gaps. The questions one is able to ask need to be crafted in a way that is coupled with the schema semantics.</p>
  <p>The next step is how to query the dataset using high-level abstractions as the questions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-05T16:26:41.433Z
Answers.LastActivityDate: 2023-05-05T16:26:41.433Z
Answers.UserDisplayName: newlog
Body: <p>I’m quite new in this field, and despite having spent some good amount of time learning the ins and outs of frameworks like LangChain, and browsing around the internet quite a bit, I still don’t know what approach to follow for the use case below.</p>
  <p>Let’s say I have a lot of information regarding a network infrastructure, assets, software, users, etc (e.g. what a CMDB would contain, or even simpler, a Windows Domain). This information is in a machine readable format (e.g. JSON, CSV, etc), and keeps getting updated daily (although eventual consistency is not a problem).</p>
  <p>My goal is to feed this information to an LLM, explain the LLM what each piece of information means, and then be able to ask arbitrary (natural language) questions about the dataset.</p>
  <p>The amount of information is big enough that I believe it can’t be sent as context to the prompt (similar to what LangChain would do).</p>
  <p>I don’t think it makes sense either to use a vector DB to store this information because it does not have semantic meaning (e.g. a list of rows in a DB), therefore the questions asked to the LLM would not find related vectors (this is a guess as I have not tried it, but I don’t think it makes sense conceptually).</p>
  <p>I read a little bit about fine tuning, but from what I’ve seen it’s about providing a lot of questions/answers to the LLM so it can learn, which I don’t think fits this use case, but maybe I am wrong. In the same manner, I don’t believe it makes sense to fine tune a LLM on a daily basis (this last sentence most likely does not make any sense).</p>
  <p>I’d appreciate if someone could point me in the right direction.</p>
  
Tags: <fine-tuning><prompt>
Title: Teaching an LLM about daily updated machine-readable information so it can respond questions
UserDisplayName: newlog
ThreadText: # Teaching an LLM about daily updated machine-readable information so it can respond questions
  
  (Asked by: username_0 on 2023-05-01)
  
  I’m quite new in this field, and despite having spent some good amount of time learning the ins and outs of frameworks like LangChain, and browsing around the internet quite a bit, I still don’t know what approach to follow for the use case below.
  
  Let’s say I have a lot of information regarding a network infrastructure, assets, software, users, etc (e.g. what a CMDB would contain, or even simpler, a Windows Domain). This information is in a machine readable format (e.g. JSON, CSV, etc), and keeps getting updated daily (although eventual consistency is not a problem).
  
  My goal is to feed this information to an LLM, explain the LLM what each piece of information means, and then be able to ask arbitrary (natural language) questions about the dataset.
  
  The amount of information is big enough that I believe it can’t be sent as context to the prompt (similar to what LangChain would do).
  
  I don’t think it makes sense either to use a vector DB to store this information because it does not have semantic meaning (e.g. a list of rows in a DB), therefore the questions asked to the LLM would not find related vectors (this is a guess as I have not tried it, but I don’t think it makes sense conceptually).
  
  I read a little bit about fine tuning, but from what I’ve seen it’s about providing a lot of questions/answers to the LLM so it can learn, which I don’t think fits this use case, but maybe I am wrong. In the same manner, I don’t believe it makes sense to fine tune a LLM on a daily basis (this last sentence most likely does not make any sense).
  
  I’d appreciate if someone could point me in the right direction.
  
  **Tags:** fine-tuning, prompt
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-05-05. Score: 1
  
  I was able to create a first implementation of this using a LangChain agent that dynamically queries a dataset, spits Python, and executes it. All of this can be done with, for example, the CSV Agent from LangChain.
  
  I modelled the dataset schema to have more descriptive information and it does the trick. However, this approach has many gaps. The questions one is able to ask need to be crafted in a way that is coupled with the schema semantics.
  
  The next step is how to query the dataset using high-level abstractions as the questions.
  
  
  ---
  
  