|
|
|
|
|
by mark_l_watson
1163 days ago
|
|
You would partition the manuscript into a sequence of chunks. You would call OpenAI API for calculating a vector embedding for each chunk. When you want to query against your manuscript, you call the OpenAI API for calculating a vector embedding for your query, locally find the chunks "near" your query, concatenate these chunks, then pass this context text with your query to GPT-3.5turbo or GPT-4.0. I have written up small examples for doing this in Swift [1] and Common Lisp [2]. [1] https://github.com/mark-watson/Docs_QA_Swift [2] https://github.com/mark-watson/docs-qa |
|
I think in all the chaos of the other cool stuff you can do with these models that people are just glossing over that these Llms close the loop on search based on word or sentence embedding techniques like word2vec, GloVe, ELMo, and BERT. The fact that you can actually generate quality embeddings for arbitrary text that represents their meaning semantically as a whole is cool as shit.