It is an open-source tool to visualise RAG documents in the reduced embedding space.
It comes with a very simple and familiar API.
from ragxplorer import RAGxplorer
client = RAGxplorer(embedding_model="thenlper/gte-large")
client.load_pdf("presentation.pdf", verbose=True)
client.visualize_query("What are the top revenue drivers for Microsoft?")
This is super cool; congratulations on your great work. Why does it appear that the retrieved chunks are not close to the original query or to the sub questions? Shouldn’t they be? Please help me understand
Maybe it is because the projection we are viewing is not the ideal projection (i.e. the two dimensions that are plotted here)? Maybe there is another projection that shows they are infact closer?
To clarify, the actual retrieval (i.e. calculating the cosine similarity) is done in the full dimensional space.
The dimensionality reduction algorithms like umap may result in some information loss, so a point that is nearest in the full dimensional space may not be the nearest point in the 2D space.
There are also hyperparameters to the dimensionality reduction algorithm that can be explored
Lastly, there was an related bug in the code, but that was spotted in a PR and fixed
Gotcha. Thanks for the explanation. By the way what are your thoughts on Langchain? Are there similar libraries you would recommend for developing on top of LLMs? curious for your perspective on this