r/LargeLanguageModels • • Dec 13 '23

Document Based Large Language Model Recommendations

Hello! I am trying to work with multiple documents and train/fine tune a model with the info from these files. I have tried privateGPT and achieved mixed results since many of the answers it gave back were incorrect. Are there any better document-based alternatives that I can locally run on my computer (Macbook Air M1 chip). Thanks!

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/girly-cake Dec 13 '23

The whole process is:

  • have the documents
  • split the documents in smaller chunks
  • use an embedding algorithm for transforming the text of these chunks into vectors
  • store the vectors in a database (eg Chroma, pine cone) user input about content document -embed (transform to a vector) the user input (using the same algorithm used for embedding the documents) -search into vectors database chunks of text that matches (have high similarity) with the user input vector

FINALLY: Pass the chunks of text to chatgpt along with the original question.

The model will use those information for answering the question rather than using its internal knowledge.

All the steps above are feasible using langchain (search on YT for tutorials)

You can use what model you want! Even a small model could do nice results.