

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Question: 1 A Generative Al Engineer has created a RAG application to look up answers to questions about a series of fantasy novels that are being asked on the author’s web forum. The fantasy novel texts are chunked and embedded into a vector store with metadata (page number, chapter number, book title), retrieved with the user’s query, and provided to an LLM for response generation. The Generative AI Engineer used their intuition to pick the chunking strategy and associated configurations but now wants to more methodically choose the best values. Which TWO strategies should the Generative AI Engineer take to optimize their chunking strategy and parameters? (Choose two.) A. Change embedding models and compare performance. B. Add a classifier for user queries that predicts which book will best contain the answer. Use this to filter retrieval. C. Choose an appropriate evaluation metric (such as recall or NDCG) and experiment with changes in the chunking strategy, such as splitting chunks by paragraphs or chapters. Choose the strategy that gives the best performance metric. D. Pass known questions and best answers to an LLM and instruct the LLM to provide the best token count. Use a summary statistic (mean, median, etc.) of the best token counts to choose chunk size. E. Create an LLM-as-a-judge metric to evaluate how well previous questions are answered by the most appropriate chunk. Optimize the chunking parameters based upon the values of the metric. Answer: C, E Explanation: To optimize a chunking strategy for a Retrieval-Augmented Generation (RAG) application, the Generative
AI Engineer needs a structured approach to evaluating the chunking strategy, ensuring that the chosen configuration retrieves the most relevant information and leads to accurate and coherent LLM responses. Here's why C and E are the correct strategies: Strategy C: Evaluation Metrics (Recall, NDCG) Define an evaluation metric: Common evaluation metrics such as recall, precision, or NDCG (Normalized Discounted Cumulative Gain) measure how well the retrieved chunks match the user's query and the expected response. Recall measures the proportion of relevant information retrieved. NDCG is often used when you want to account for both the relevance of retrieved chunks and the ranking or order in which they are retrieved. Experiment with chunking strategies: Adjusting chunking strategies based on text structure (e.g., splitting by paragraph, chapter, or a fixed number of tokens) allows the engineer to experiment with various ways of slicing the text. Some chunks may better align with the user's query than others. Evaluate performance: By using recall or NDCG, the engineer can methodically test various chunking strategies to identify which one yields the highest performance. This ensures that the chunking method provides the most relevant information when embedding and retrieving data from the vector store. Strategy E: LLM-as-a-Judge Metric Use the LLM as an evaluator: After retrieving chunks, the LLM can be used to evaluate the quality of answers based on the chunks provided. This could be framed as a "judge" function, where the LLM compares how well a given chunk answers previous user queries. Optimize based on the LLM's judgment: By having the LLM assess previous answers and rate their relevance and accuracy, the engineer can collect feedback on how well different chunking configurations perform in real-world scenarios. This metric could be a qualitative judgment on how closely the retrieved information matches the user's intent. Tune chunking parameters: Based on the LLM's judgment, the engineer can adjust the chunk size or structure to better align with the LLM's responses, optimizing retrieval for future queries. By combining these two approaches, the engineer ensures that the chunking strategy is systematically evaluated using both quantitative (recall/NDCG) and qualitative (LLM judgment) methods. This balanced optimization process results in improved retrieval relevance and, consequently, better response generation by the LLM. Question: 2 A Generative AI Engineer is designing a RAG application for answering user questions on technical regulations as they learn a new sport. What are the steps needed to build this RAG application and deploy it? A. Ingest^ documents^ from^ a source^ – >^ Index^ the^ documents^ and saves^ to^ Vector Search – > User submits queries against an LLM – > LLM retrieves relevant documents – > Evaluate model – > LLM generates a response – > Deploy it using Model Serving
A. Number of customer inquiries processed per unit of time B. Energy usage per query C. Final perplexity scores for the training of the model D. HuggingFace Leaderboard values for the base LLM Answer: A Explanation: When deploying an LLM application for customer service inquiries, the primary focus is on measuring the operational efficiency and quality of the responses. Here's why A is the correct metric: Number of customer inquiries processed per unit of time: This metric tracks the throughput of the customer service system, reflecting how many customer inquiries the LLM application can handle in a given time period (e.g., per minute or hour). High throughput is crucial in customer service applications where quick response times are essential to user satisfaction and business efficiency. Real-time performance monitoring: Monitoring the number of queries processed is an important part of ensuring that the model is performing well under load, especially during peak traffic times. It also helps ensure the system scales properly to meet demand. Why other options are not ideal: B. Energy usage per query: While energy efficiency is a consideration, it is not the primary concern for a customer-facing application where user experience (i.e., fast and accurate responses) is critical. C. Final perplexity scores for the training of the model: Perplexity is a metric for model training, but it doesn't reflect the real-time operational performance of an LLM in production. D. HuggingFace Leaderboard values for the base LLM: The HuggingFace Leaderboard is more relevant during model selection and benchmarking. However, it is not a direct measure of the model's performance in a specific customer service application in production. Focusing on throughput (inquiries processed per unit time) ensures that the LLM application is meeting business needs for fast and efficient customer service responses. Question: 4 A Generative AI Engineer is building a Generative AI system that suggests the best matched employee team member to newly scoped projects. The team member is selected from a very large team. The match should be based upon project date availability and how well their employee profile matches the project scope. Both the employee profile and project scope are unstructured text. How should the Generative Al Engineer architect their system?
A. Create a tool for finding available team members given project dates. Embed all project scopes into a vector store, perform a retrieval using team member profiles to find the best team member. B. Create^ a^ tool for^ finding team^ member^ availability^ given project^ dates,^ and^ another tool that uses an LLM to extract keywords from project scopes. Iterate through available team members’ profiles and perform keyword matching to find the best available team member. C. Create a tool to find available team members given project dates. Create a second tool that can calculate a similarity score for a combination of team member profile and the project scope. Iterate through the team members and rank by best score to select a team member. D. Create a tool for finding available team members given project dates. Embed team profiles into a vector store and use the project scope and filtering to perform retrieval to find the available best matched team members. Answer: D Explanation: Problem Context: The problem involves matching team members to new projects based on two main factors: Availability: Ensure the team members are available during the project dates. Profile-Project Match: Use the employee profiles (unstructured text) to find the best match for a project’s scope (also unstructured text). The two main inputs are the employee profiles and project scopes, both of which are unstructured. This means traditional rule-based systems (e.g., simple keyword matching) would be inefficient, especially when working with large datasets. Explanation of Options: Let's break down the provided options to understand why D is the most optimal answer. Option A suggests embedding project scopes into a vector store and then performing retrieval using team member profiles. While embedding project scopes into a vector store is a valid technique, it skips an important detail: the focus should primarily be on embedding employee profiles because we're matching the profiles to a new project, not the other way around. Option B involves using a large language model (LLM) to extract keywords from the project scope and perform keyword matching on employee profiles. While LLMs can help with keyword extraction, this approach is too simplistic and doesn’t leverage advanced retrieval techniques like vector embeddings, which can handle the nuanced and rich semantics of unstructured data. This approach may miss out on subtle but important similarities. Option C suggests calculating a similarity score between each team member's profile and project scope. While this is a good idea, it doesn’t specify how to handle the unstructured nature of data efficiently.
D. AutoML Answer: C Explanation: Problem Context: The engineer is developing an LLM-powered live sports commentary platform that needs to provide real-time updates and analyses based on the latest game scores. The critical requirement here is the capability to access and integrate real-time data efficiently with the platform for immediate analysis and reporting. Explanation of Options: Option A: DatabricksIQ: While DatabricksIQ offers integration and data processing capabilities, it is more aligned with data analytics rather than real-time feature serving, which is crucial for immediate updates necessary in a live sports commentary context. Option B: Foundation Model APIs: These APIs facilitate interactions with pre-trained models and could be part of the solution, but on their own, they do not provide mechanisms to access real-time game scores. Option C: Feature Serving: This is the correct answer as feature serving specifically refers to the realtime provision of data (features) to models for prediction. This would be essential for an LLM that generates analyses based on live game data, ensuring that the commentary is current and based on the latest events in the sport. Option D: AutoML: This tool automates the process of applying machine learning models to real-world problems, but it does not directly provide real-time data access, which is a critical requirement for the platform. Thus, Option C (Feature Serving) is the most suitable tool for the platform as it directly supports the realtime data needs of an LLM-powered sports commentary system, ensuring that the analyses and Question 6 A Generative AI Engineer is building a RAG system to answer legal compliance questions from company policy documents. The engineer notices that some documents are extremely long, and splitting them into fixed-size chunks sometimes breaks context. Which approach would best improve retrieval quality for the LLM? A. Split all documents into fixed-size token chunks of 512 tokens regardless of sentence or paragraph boundaries. B. Use semantic-aware chunking where sentences or paragraphs are kept intact and chunks are limited by token count. C. Remove metadata like section numbers and headings to reduce chunk size. D. Concatenate multiple small chunks into larger chunks arbitrarily to improve retrieval. Answer: B Explanation: Semantic-aware chunking preserves context, ensuring that retrieved chunks contain
complete ideas. Fixed-size chunks may break sentences or paragraphs, reducing relevance. Keeping paragraphs intact while limiting token counts balances context retention and vector storage efficiency. Question 7 A Generative AI Engineer wants to measure how well their RAG application retrieves relevant chunks for user queries. They plan to use a quantitative metric. Which metric is most appropriate? A. Perplexity B. Recall@k C. Model loss D. Token usage Answer: B Explanation: Recall@k measures how many relevant chunks appear in the top-k retrieved results. It directly evaluates retrieval effectiveness, which is critical for RAG applications. Perplexity and loss are training metrics and do not assess retrieval quality. Question 8 An engineer is embedding customer support chat logs into a vector store. They want to ensure that queries about new products retrieve relevant past support tickets. Which strategy would most improve retrieval for unseen queries? A. Use a general-purpose embedding model trained on web text. B. Fine-tune the embedding model on company-specific chat logs. C. Increase chunk size to include multiple tickets in one embedding. D. Randomly shuffle tickets before embedding. Answer: B Explanation: Fine-tuning embeddings on domain-specific data improves semantic understanding and retrieval relevance for queries about new products. General-purpose embeddings may not capture domain-specific terminology. Question 9 A Generative AI Engineer wants the LLM to summarize multiple retrieved documents for a user query. Some retrieved chunks are redundant or slightly overlapping. What is the best strategy? A. Pass all chunks directly to the LLM without preprocessing. B. Deduplicate overlapping chunks before sending them to the LLM. C. Concatenate all chunks regardless of length. D. Only use the first chunk retrieved. Answer: B Explanation: Deduplicating overlapping chunks reduces redundancy and improves the quality of the
Question 13 A Generative AI Engineer is integrating a knowledge base of product manuals into a RAG system. They want to ensure the LLM only retrieves relevant sections for a query. What strategy should they implement? A. Filter retrieved chunks based on product category metadata before passing to the LLM. B. Pass all product manuals to the LLM regardless of query. C. Randomly select chunks to reduce retrieval latency. D. Only embed the first page of each manual. Answer: A Explanation: Metadata filtering improves relevance by ensuring that only chunks belonging to the correct product category are considered for retrieval. Question 14 A Generative AI Engineer is building a customer support assistant and wants to monitor its performance in production. Which metric is most relevant? A. Number of queries processed per unit time B. Model training loss C. Energy usage per query D. Base model leaderboard rank Answer: A Explanation: Throughput (queries processed per unit time) measures operational efficiency and ensures the system meets user demand. Question 15 A company wants to match freelancers to projects using unstructured profiles and project descriptions. Which architecture is most suitable? A. Embed freelancer profiles in a vector store and retrieve best matches using project description embeddings, then filter by availability. B. Use keyword matching between project description and freelancer profile. C. Randomly assign freelancers. D. Only consider freelancer availability without semantic matching. Answer: A Explanation: Vector embeddings capture semantic meaning, enabling efficient similarity-based retrieval. Filtering by availability ensures practical assignment. Question 16
An engineer wants an LLM to summarize social media posts in real-time. Which approach ensures minimal latency? A. Precompute embeddings and use feature serving to provide real-time data to the LLM. B. Fetch raw posts directly and pass to LLM without embeddings. C. Re-embed all posts at query time. D. Only summarize posts once a day. Answer: A Explanation: Precomputing embeddings and using feature serving allows the LLM to quickly access relevant vectors for real-time summarization. Question 17 A RAG system retrieves multiple chunks with partially conflicting information. What is the best strategy for the LLM? A. Use a summarization prompt asking the LLM to reconcile conflicting information. B. Pick the first chunk only. C. Concatenate all chunks and output without reconciliation. D. Remove all chunks and respond with “unknown.” Answer: A Explanation: LLM summarization with reasoning prompts helps reconcile conflicting information and produces coherent responses. Question 18 An engineer wants to reduce memory usage in a vector store without losing retrieval quality. Which approach is most appropriate? A. Reduce embedding dimensionality using PCA or quantization. B. Increase chunk size to include more tokens per embedding. C. Remove metadata from embeddings. D. Store only a subset of documents randomly. Answer: A Explanation: Dimensionality reduction or vector quantization reduces storage while maintaining similarity relationships for retrieval. Question 19 A Generative AI Engineer wants to ensure that the RAG system does not retrieve outdated information. What approach is most suitable? A. Include timestamps in chunk metadata and filter by recency during retrieval. B. Randomly shuffle chunks before retrieval. C. Only index documents once and never update. D. Remove all metadata and rely on LLM reasoning.
Question 28 A RAG system ingests documents in multiple languages. Users ask questions in English only. Which approach is most suitable for retrieval? A. Use a multilingual embedding model to encode all documents and queries. B. Translate queries to all languages and retrieve separately. C. Only index English documents. D. Ignore language differences and rely on LLM reasoning. Answer: A Explanation: Multilingual embeddings allow cross-lingual retrieval, enabling queries in English to match relevant content in other languages. Question 29 A Generative AI Engineer wants to reduce the number of API calls to the LLM during RAG response generation. Which technique is most effective? A. Combine multiple retrieved chunks into a single prompt before sending to the LLM. B. Query the LLM separately for each chunk. C. Reduce the number of tokens in embeddings. D. Skip retrieval entirely. Answer: A Explanation: Batching multiple chunks into a single prompt reduces API calls while providing the LLM with all relevant context for a coherent answer. Question 30 An engineer wants to ensure that the RAG system handles long queries effectively. What is the best approach? A. Truncate queries to 50 tokens. B. Embed the entire query and split it into semantic sub-queries for retrieval. C. Ignore query length. D. Only use keywords from the query. Answer: B Explanation: Breaking long queries into semantic sub-queries allows more precise retrieval without losing context, improving LLM response quality. Question 31 A company wants to build a RAG system that answers customer questions from product documentation and knowledge articles. Which approach ensures the system stays up-to-date with new content? A. Implement incremental indexing: add new documents and update embeddings regularly. B. Only index content once.
C. Randomly shuffle old documents. D. Replace all embeddings weekly without tracking new content. Answer: A Explanation: Incremental indexing ensures new content is included promptly, keeping the RAG system relevant and accurate. Question 32 An engineer wants to evaluate user satisfaction for a customer support RAG system. Which metric is most suitable? A. User feedback score (e.g., thumbs up/down or rating). B. Number of embeddings. C. Retrieval latency only. D. Training loss of the base LLM. Answer: A Explanation: Direct user feedback measures real-world effectiveness and satisfaction, complementing quantitative retrieval metrics. Question 33 A RAG application retrieves multiple documents that contain numeric data (e.g., statistics). What is the best approach for ensuring accurate numeric answers? A. Include retrieved numeric data as context and instruct the LLM to calculate or reference only provided numbers. B. Allow LLM to hallucinate numbers. C. Exclude numeric data from chunks. D. Only return textual summaries without numbers. Answer: A Explanation: Grounding the LLM on provided numeric data ensures accurate answers instead of fabricated values. Question 34 An engineer notices retrieval for some queries returns outdated results even though new documents exist. Which design change will prevent this? A. Add timestamp metadata to chunks and filter by recency during retrieval. B. Only index old documents. C. Remove metadata entirely. D. Randomly select chunks. Answer: A Explanation: Filtering by timestamps ensures the system retrieves the most recent information.
A. Include all chunks and instruct the LLM to summarize key points and reconcile contradictions. B. Only send the first chunk. C. Ask the LLM to generate answers without context. D. Randomly remove chunks to reduce tokens. Answer: A Explanation: Explicit summarization prompts improve coherence and accuracy, especially when chunks may overlap or conflict. Question 39 A RAG system retrieves chunks from multiple document sources. Some documents contain outdated procedures. How should the engineer prevent outdated information from being used? A. Include validity or effective dates in metadata and filter accordingly. B. Ignore dates entirely. C. Only retrieve from PDFs. D. Shuffle chunks randomly. Answer: A Explanation: Filtering by effective dates ensures only relevant and current information is used for responses. Question 40 A Generative AI Engineer wants to measure end-to-end system efficiency of their RAG application. Which metric is most appropriate? A. Query latency (time from user query to LLM response) B. Model training loss C. Number of embeddings D. Token count per chunk Answer: A Explanation: Query latency reflects the operational efficiency of the system and user experience. Question 41 An engineer wants to evaluate retrieval strategies for a RAG system without relying on the LLM. Which method is suitable? A. Use quantitative metrics like recall, precision, or NDCG on a labeled dataset of queries and expected chunks. B. Ask the LLM to rate its own retrieval. C. Measure only chunk size. D. Randomly select queries. Answer: A
Explanation: Quantitative metrics provide objective evaluation of retrieval effectiveness without LLM bias. Question 42 A RAG system retrieves hundreds of chunks per query, but the LLM has a token limit. Which approach resolves this problem? A. Rank chunks by relevance and include only top-k in the prompt. B. Concatenate all chunks regardless of size. C. Randomly select chunks. D. Split the query into multiple prompts. Answer: A Explanation: Selecting top-k relevant chunks ensures the LLM receives the most useful context without exceeding token limits. Question 43 An engineer wants to ensure that a customer support RAG system is scalable to millions of queries per day. Which solution is most appropriate? A. Use distributed vector stores and parallel retrieval. B. Embed fewer documents to reduce retrieval load. C. Use keyword search instead of embeddings. D. Only process queries sequentially. Answer: A Explanation: Distributed vector stores and parallel retrieval allow scaling to large query volumes efficiently. Question 44 A RAG system retrieves documents from multiple sources with slightly different formats. What is the best preprocessing strategy? A. Normalize text and extract structured metadata to standardize chunks. B. Use raw text as-is without preprocessing. C. Remove metadata entirely. D. Only process one source type. Answer: A Explanation: Normalization and structured metadata improve retrieval quality and allow the LLM to reason effectively across sources. Question 45 A Generative AI Engineer wants to reduce inference costs for a RAG application.
C. Compare token counts of retrieved chunks only. D. Measure LLM response time only. Answer: A Explanation: A labeled benchmark with quantitative metrics provides an objective way to select the best configuration. Question 49 A Generative AI Engineer wants to build a RAG system that handles user queries in multiple domains (e.g., legal, medical, technical). Which approach is most suitable? A. Maintain domain-specific vector stores with embeddings tuned for each domain. B. Combine all domains in one vector store without distinction. C. Only index the largest domain. D. Ignore domain differences and rely on LLM reasoning. Answer: A Explanation: Domain-specific embeddings improve semantic retrieval and relevance, ensuring high- quality answers for specialized queries. Question 50 A RAG system retrieves hundreds of chunks per query. The LLM can process only a limited number of tokens. Which approach best handles this limitation? A. Rank chunks by relevance score and include only top-k in the prompt. B. Concatenate all chunks regardless of length. C. Randomly select chunks. D. Split queries into multiple prompts without chunk ranking. Answer: A Explanation: Selecting top-k relevant chunks ensures the LLM receives the most informative context without exceeding token limits. Question 51 A Generative AI Engineer wants to improve retrieval efficiency in a large RAG system. Which technique is most appropriate? A. Use approximate nearest neighbor (ANN) search in the vector store. B. Store raw text instead of embeddings. C. Randomly remove vectors. D. Increase chunk size arbitrarily. Answer: A
Explanation: ANN search (e.g., FAISS, Milvus) enables efficient similarity search on large vector datasets, improving retrieval speed. Question 52 A RAG system retrieves similar documents but sometimes includes contradictory statements. How should the LLM handle this? A. Prompt the LLM to identify contradictions and provide a reconciled summary. B. Pick the first chunk only. C. Remove all chunks and respond “unknown.” D. Randomly choose statements to include. Answer: A Explanation: LLM prompts that ask for contradiction resolution improve response coherence and reliability. Question 53 A RAG system is deployed for real-time news summarization. Which component ensures live updates are reflected in responses? A. Feature serving with real-time data ingestion. B. Precompute embeddings once per day. C. Only retrieve cached summaries. D. Use static reference documents only. Answer: A Explanation: Feature serving ensures the LLM accesses the most recent embeddings and features, enabling up-to-date responses. Question 54 An engineer wants to monitor user engagement with a customer support RAG system. Which metric is most relevant? A. Number of successful resolutions per unit time and user satisfaction ratings. B. Embedding dimensionality. C. Token length of queries. D. Model training loss. Answer: A Explanation: User engagement and satisfaction reflect real-world effectiveness and are key operational metrics. Question 55 A Generative AI Engineer wants to prevent the RAG system from retrieving outdated policy documents.