Retrieval Augmented Generation is one of the top use cases for LLM. One of the critical challenges in RAG systems is properly referencing the sources of the retrieved documents within the LLM's responses. It is also crucial for people to trust their LLM output. People around the web are building beautiful applications on OpenAI SDK and vast majority of them are RAG-based. This cookbook can help developers achieve better results.
I would like to contribute a simple solution of keeping track of sources when LLM accesses vector store and then streaming back the right reference with the relevant chunk to front end. I would then show how the references can be rendered on a demo front end.
Retrieval Augmented Generation is one of the top use cases for LLM. One of the critical challenges in RAG systems is properly referencing the sources of the retrieved documents within the LLM's responses. It is also crucial for people to trust their LLM output. People around the web are building beautiful applications on OpenAI SDK and vast majority of them are RAG-based. This cookbook can help developers achieve better results.
I would like to contribute a simple solution of keeping track of sources when LLM accesses vector store and then streaming back the right reference with the relevant chunk to front end. I would then show how the references can be rendered on a demo front end.
https://github.com/user-attachments/assets/d8399776-e2a4-4186-aa5e-5c4a6e32ece4