2 ms·
It's usually either providing data to the LLM, or doing back-and-forth with the LLM (usually a mix of both). For instance, if you want it to answer questions a
by Ozzie_osman 4y ago
It's usually either providing data to the LLM, or doing back-and-forth with the LLM (usually a mix of both).
For instance, if you want it to answer questions about your code-base, the model doesn't know your code base. You can't feed the entire code-base into a prompt. So, you'd use langchain to:
- preprocess your code-base, by chunking it and embedding it in some vector space
- when you get a question, see where it is in the vector space and find the "k nearest neighbors"
- pass those nearest neighbors, along with your question, to the LLM (because those neighbors are the contextually relevant pieces, and they'd fit in the prompt)
- delijati 4y agoi would really love to give it a try but with an offline LLM :/