RAG AI Information Retrieval

Building RAG architectures: a practical guide

Published on: October 31, 2025 • By Shuvam Banerji Seal

Introduction

Retrieval-Augmented Generation (RAG) has emerged as a practical paradigm for building AI systems that can provide accurate, verifiable answers by combining information retrieval with large language models. In this post, I'll share insights from building a full RAG system for the IISER-K intranet.

Understanding RAG Architecture

At its core, RAG consists of three main components:

1. Data Acquisition Pipeline

The first challenge is gathering and structuring data. For our IISER-K project, we built an automated scraping system that extracts content from the intranet. Key considerations include:

2. Hybrid search: dense and sparse retrieval combined

One of our key innovations was implementing hybrid search that combines:

Dense Vector Retrieval: Using FAISS with embedding models to capture semantic similarity. This excels at understanding conceptual queries and synonyms.

Sparse Keyword Search (BM25): Traditional keyword matching that performs well for exact terms and proper nouns.

By combining these approaches with reciprocal rank fusion, we achieve significantly better recall than either method alone.

3. LLM Integration and Answer Synthesis

We use Qwen3-4B, a compact model that balances performance with resource constraints. The key is crafting effective prompts that:

Practical Implementation Tips

Chunking Strategy

Document chunking is critical for retrieval quality. We experimented with different approaches:

We found that a hybrid approach using semantic boundaries with a maximum chunk size works best.

Evaluation Metrics

Measuring RAG performance requires multiple metrics:

Challenges and Solutions

Challenge 1: Context Window Limitations

LLMs have limited context windows. We addressed this by:

Challenge 2: Keeping Information Current

Information changes. Our solution includes:

Results and Learnings

Our RAG system has proven highly effective for the IISER-K community, providing quick access to institutional knowledge with high accuracy. Key takeaways:

Future Directions

We're exploring several enhancements:

Conclusion

Building effective RAG systems requires careful attention to each component of the pipeline. By combining robust retrieval methods with thoughtful LLM integration, we can create systems that provide accurate, verifiable information at scale.

If you're interested in learning more about RAG architectures or discussing implementation details, feel free to reach out!

Back to blog