The main concern of MiniRAG is cost, privacy and storage. MiniRAG is based on 3 observations:

  1. SLMs are weak at semantic understanding but strong at pattern matching
  2. Clear structural information can make up for limited semantic abilities
  3. Breaking down complex RAG tasks into simple steps maintains performance without needing advanced reasoning.

Like LightRAG, MiniRAG is also divided into 3 different parts: preprocess, retrieval.

During preprocess stage,

  1. MiniRAG split documents into chunks
  2. extract named entities from chunks
  3. create chunk nodes and entity nodes
  4. we create entity-chunk edges and entity-entity edges (for semantic or co-occurrence relationships)
  5. build a heterogeneous graph where both entity node and chunk node participate in retrieval.

During retrieval stage, 2 substages are identified.

  1. Query semantic mapping
    • extract relevant entities from query
    • predict answer type, such as event, concept, person, etc.
    • convert query into simpler matching targets that SLMs can handle.
  2. Topology-enhanced graph retrieval
    • key relationship identification
    • query-guided path discovery
    • retrieval of query-relevant text chunks
      • candidate filtering
      • similarity computation
      • ranking & selection
    • integration for augmented generation

This framework works, because MiniRAG makes the retrieval tasks easier for SLMs by replacing “understand everything semantically” with “match entities, relations, paths and chunks in a structured graph”.

RAG