A user on the Hugging Face forums proposes a Retrieval-Augmented Generation (RAG) approach where documents are stored as nodes in a knowledge graph and retrieved via a reranker. The query itself becomes a new node that connects to the most similar nodes identified by the reranker.
- Documents or text sections are stored as nodes in a knowledge graph.
- A reranker retrieves documents based on a query, offering potentially higher precision than contextual RAG.
- The query becomes a new node establishing connections with the most similar nodes.
- This method addresses the limitation of LLMs used for node extraction, which may only generate coarse-grained labels or keywords.
The user notes that rerankers might be more precise than contextual RAG, while LLM-based node extraction can produce labels that are too coarse-grained.