Code QuizIntermediate

Assembling a RAG Prompt

Spot the join mistake that merges retrieved chunks together.

Codejavascript
function buildPrompt(chunks, question) {
  const context = chunks.join("");
  return `Answer using ONLY the context below.\n\nContext:\n${context}\n\nQuestion: ${question}`;
}

What is the bug in this RAG prompt assembly?