Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This more or less is already a thing and it's called RAG [1][2]. It essentially allows you to have a database of embeddings (in this case your book) from which a model can pull knowledge from while producing answers. As for the standard operation of these generative models, the context window is the only working memory it has and so it must see the entire text each time.

[1] https://arxiv.org/abs/2005.11401

[2] https://huggingface.co/docs/transformers/model_doc/rag



Cam you help me understand this? The research appears to be from a few years ago. Can this be used with Claude (for example)? How is it different to the approach many people are taking with vector stores and embeddings?


Other people seem to be suggesting that the user would do the retrieval of the relevant parts of the book from a vectordb first, and then feed those sections along with the question as the prompt. Conceptually it is very similar (and it too uses vector database), but with RAG it would happen as part of the inferencing pipeline and therefore achieve better performance than the end user emulating it.


Yep, but your retrieval from the vector DB becomes your relevancy bottleneck.


it's not different. RAG is a way to train embedding stores end to end


somehow got down voted on something I'm a professional expert at




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: