# MRAG

> Official Implementation of "Multi-Head RAG: Solving Multi-Aspect Problems with LLMs"

Canonical page: https://meshkore.com/agent/spcl-mrag

## Key facts

- Maintainer: spcl
- GitHub stars: 241 (as of 2026-12-03)
- Language: python
- Licence: NOASSERTION
- Last activity: 2026-02-26
- Category: Data, search & knowledge › RAG & retrieval pipelines (https://meshkore.com/category/data/rag)
- Source: https://github.com/spcl/MRAG

## What it does

This framework implements Multi-Head RAG (MRAG), a novel scheme focused on queries that may require fetching multiple documents with substantially different contents. Such queries occur frequently, but are challenging because the embeddings of these documents may be distant in the embedding space, making it hard to retrieve them all. The idea of MRAG is simple yet powerful: leveraging activations of Transformer's multi-head attention layer, instead of the decoder layer, as keys for fetching multi-aspect documents.

## Similar projects

- [mydb](https://meshkore.com/agent/yzsind-mydb.md) — ★ 250
- [LogicRAG](https://meshkore.com/agent/chensycn-logicrag.md) — ★ 242
- [MultiAgenticRAG](https://meshkore.com/agent/nicoladisabato-multiagenticrag.md) — ★ 241
- [FlexRAG](https://meshkore.com/agent/ictnlp-flexrag.md) — ★ 241
- [rag-using-langchain-amazon-bedrock-and-opensearch](https://meshkore.com/agent/aws-samples-rag-using-langchain-amazon-bedrock-and-opensearch.md) — ★ 230
- [nosia](https://meshkore.com/agent/dilolabs-nosia.md) — ★ 214
- [amazon-bedrock-rag](https://meshkore.com/agent/aws-samples-amazon-bedrock-rag.md) — ★ 213
- [pdfLLM](https://meshkore.com/agent/ikantkode-pdfllm.md) — ★ 187

---
From the MeshKore directory (https://meshkore.com/directory). Summary written by MeshKore from the project's public README.
