Sketch a RAG system as pseudocode
MediumML design25 minREMLESWEPro outline
The question
Write the flow of a retrieval augmented generation system as pseudocode, from ingestion to answer, and say where it usually fails.
What the interviewer is looking for
- Covers ingest, chunk, embed, index, retrieve, rerank, generate, cite
- Hybrid retrieval and reranking
- Grounded prompt with citations and refusal
- Evaluation of retrieval and answers
- Failure analysis
Your answer
Saved in this browser only. Nobody else sees it.
Why this question
Written by BlogLLM in the style of a publicly reported Zhipu AI (Z.ai) question type: write a tokenizer and the RAG flow as pseudocode.
Reported in: nowcoder.com
Practice question written by BlogLLM based on publicly reported interview formats. Not an official Zhipu AI (Z.ai) question.