Pistis-RAG: A Scalable Cascading Framework Towards Trustworthy Retrieval-Augmented Generation

Yu Bai, Yukai Miao, Li Chen, Dan Li, Yanyu Ren, Hongtao Xie, Ce Yang, Xuhui Cai

Abstract

Retrieval-Augmented Generation (RAG) systems face significant limitations when semantic relevance alone does not guarantee improved generation quality. This issue is particularly evident due to the sensitivity of Large Language Models (LLMs) to the ordering of few-shot prompts. To address this challenge, we propose Pistis-RAG, a new RAG framework designed with a content-centric approach to better align LLMs with human preferences. By treating document ranking as a "Listwide Labels" Learning-to-Rank task based on structured feedback (e.g., copy, regenerate, or dislike), Pistis-RAG enhances content ranking and generation quality. Experimental results show that Pistis-RAG improves accuracy by 6.06% on MMLU and 7.08% on C-EVAL compared to baseline RAG systems.

Introduction: The Semantic Relevance Gap

While RAG systems are effective at providing LLMs with "long-term memory," they suffer from a critical flaw: semantic relevance does not equal generation quality. Current RAG pipelines typically retrieve documents based on their similarity to a query. However, LLMs are notoriously sensitive to the specific selection and sequence of these documents when used as few-shot prompts. A document might be semantically relevant but confuse the model or lead to a lower-quality answer if placed incorrectly.

Comparison of traditional IR systems and standard RAG pipelines, highlighting missing ranking stages in RAG.

As illustrated in Figure 1, traditional Information Retrieval (IR) systems employ a multi-stage funnel including Matching, Pre-ranking, Ranking, and Re-ranking. In contrast, many standard RAG implementations skip the critical ranking and re-ranking phases, relying on basic "pre-rankers" that focus on representation learning rather than true alignment with what a human or the LLM actually requires for high-quality generation.

Methodology: The Pistis-RAG Framework

Pistis-RAG introduces a content-centric approach that operates in two main phases: offline feedback alignment and online querying.

The Pistis-RAG framework architecture, illustrating the integration of human feedback into the retrieval and alignment process.

1. Feedback Alignment (Offline)

The system collects "List-wide Labels" from user interactions. Instead of rating individual documents, it evaluates the outcome of the entire list of retrieved items. User actions such as "Copy" (success), "Regenerate" (weak failure), and "Dislike" (hard failure) are used as supervision signals. The framework utilizes a RankFormer architecture to learn these list-wide preferences, which are then distilled into Gradient Boosted Decision Trees (GBDT) for production efficiency.

2. Online Querying

When a user sends a query, the system follows a cascading retrieval process:

  • Matching: Fast retrieval of candidates using vector databases like Milvus.
  • Pre-ranking: Narrowing down the list using a cross-encoder.
  • Ranking (The "Pistis" Layer): Reordering the top candidates specifically to align with LLM sequencing preferences and human values.

To manage the "latency vs. accuracy" trade-off, the process is formalized as a constrained optimization problem: maximizing accuracy while keeping system latency below a specific threshold ($L_{th}$).

Experimental Evaluation

The researchers used two primary benchmarks to simulate human feedback and evaluate performance: MMLU (English) and C-EVAL (Chinese). To train the model without requiring millions of manual human labels, they simulated feedback by checking if the LLM's generated answer was correct based on the dataset's ground truth. Correct answers were labeled as "Positive" (simulating a user "Copy" action), while incorrect ones were "Negative."

Key Results

The framework was tested using LLaMA-2-13B (for English) and Qwen2-7B (for Chinese):

  • Accuracy Gains: Pistis-RAG improved accuracy by 6.06% on MMLU and 7.08% on C-EVAL compared to a naive RAG baseline.
  • Latency Trade-off: The alignment process added roughly 16-17% to the end-to-end latency. This is considered a worthwhile optimization trade-off for the significant jump in response quality.
  • Robustness: The use of MinHash for de-duplication and KL-divergence for filtering ensured that the retrieved context remained high-quality and diverse.

Discussion and Conclusion

Pistis-RAG demonstrates that document order is a critical hyperparameter that can be optimized via machine learning. Simple UI actions—like copying or regenerating a response—are goldmines for alignment signals that can be fed back into the retrieval pipeline. By bridging the gap between traditional IR ranking and modern LLM generation, Pistis-RAG provides a scalable path toward more trustworthy and high-quality RAG systems. Future work will focus on refining the system for more subjective human preferences beyond objective correctness.

Summary updated

BibTeX
@misc{bai2024pistis,
  author = {Yu Bai and Yukai Miao and Li Chen and Dan Li and Yanyu Ren and Hongtao Xie and Ce Yang and Xuhui Cai},
  title = {{Pistis-RAG: A Scalable Cascading Framework Towards Trustworthy Retrieval-Augmented Generation}},
  year = {2024},
  eprint = {2407.00072},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.00072},
}
Figure