InterviewTreedInterviewTreed

AI & AI Engineering

Why RAG is needed

Learn why language models need external knowledge, how RAG addresses outdated information and knowledge limitations, and when retrieval is useful.

Learning guide3 of 72 lessons

Your learning progress is saved to your InterviewTreed account.

1

Introduction to Why RAG is needed

RAG addresses situations where a language model does not have reliable access to the information required by an application. Its pretrained knowledge may be outdated, incomplete, or unrelated to private organisational data.

By retrieving relevant information from an external source at query time, RAG helps applications answer questions using a controlled and updateable knowledge collection.

2

Core concepts and architecture

Understand limitations of model knowledge, training-data cutoffs, hallucinations, private information requirements, and changing business information.

Study how retrieval provides additional evidence and how source references can make answers easier to verify.

Learn when external retrieval is appropriate and when ordinary prompting, database queries, fine-tuning, or traditional search may be more suitable.

3

Practical implementation

Create an assistant that answers questions about company policies that are not included in the language model's training data.

Update the source documents and re-index them to demonstrate how the application can use new information without retraining the underlying model.

Compare answers generated with retrieved context against answers generated without retrieval.

4

Challenges and trade-offs

RAG cannot guarantee factual correctness because retrieval may return irrelevant, outdated, incomplete, or contradictory documents.

Indexing and retrieving information introduces additional processing, storage, latency, and infrastructure costs.

Some requirements are better handled through deterministic database queries or fine-tuning rather than semantic retrieval.

5

Interview preparation

Explain why an organisation might choose RAG instead of relying only on an LLM.

Discuss knowledge freshness, private data, hallucinations, traceability, and model limitations.

Identify scenarios where RAG is useful and situations where fine-tuning, direct database access, or traditional search is more appropriate.

Key takeaways

  • Understand the purpose and main concepts of Why RAG is needed.
  • Understand how Why RAG is needed works and how its components interact.
  • Be prepared to explain practical implementation and real-world use cases.
  • Understand common challenges, limitations, and design trade-offs.
  • Practise explaining Why RAG is needed clearly in a technical interview.