๐งชTDD Challengeยทbeginnerยทโฑ๏ธ 25โ40mยทโญ 125 XP
M-029Build Your First Document Q&A System
Description
Nebula Corp has a collection of product FAQ documents but no way to search them intelligently. Users type questions and get nothing useful back. Build a basic RAG pipeline: embed the documents, find the most relevant ones for a user query using cosine similarity, and construct a prompt that includes the retrieved context so the LLM can generate a grounded answer.
Test Cases (3)
Retrieves relevant documents
Should retrieve docs about refund policy
Input:answerQuestion('How do I get a refund?')
Expected:CONTAINS:Refund
Generates grounded answer
Answer should be grounded in retrieved context
Input:answerQuestion('What are the API limits?')
Expected:CONTAINS:Rate Limits
Handles no results
Should handle queries with no relevant documents
Input:answerQuestion('Unrelated topic')
Expected:CONTAINS:answer
Related Lessons
Click Run / Check to validate your solution