Skip to main content

Exam Theory: RAG and Optimization

This exam theory focuses on assessing advanced topics within Retrieval-Augmented Generation (RAG) and its optimization techniques, drawing specifically from Advanced Indexing, Hybrid Search, Query Transformation, Post-Retrieval Processing, and GraphRAG Implementations.

No.Training UnitLectureTraining contentQuestionLevelMarkAnswerAnswer Option AAnswer Option BAnswer Option CAnswer Option DExplanation
1Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat is a major disadvantage of fixed-size chunking when applied to large amounts of documents?Easy1AIt causes a loss of semantics by breaking ideas arbitrarily.It is too computationally expensive.It prevents vector search from indexing numbers.It requires advanced linguistic models to parse.Mechanical chunking accidentally breaks the flow of the text, making the LLM unable to understand the context when an idea is arbitrarily split.
2Unit 1: RAG and OptimizationLec 1Advanced IndexingWhy does Brute-force Flat Indexing become a serious problem as a system scales?Easy1BIt consumes too much disk space.It causes high latency when sequentially scanning millions of vectors.It is incompatible with neural network architectures.It only supports English text.Sequentially scanning through millions of vectors in a Flat Index is too slow to meet real-time requirements.
3Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat is the core idea driving Semantic Chunking?Medium1CTo chunk text strictly by paragraph breaks.To split texts after exactly 1000 characters.To detect shifts to a new topic and perform a break precisely at the intersection of two topics.To summarize the text before splitting it.Semantic Chunking detects when sentences or content shift to a new topic (when vector direction abruptly changes) to perform a break.
4Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat metric is typically calculated between consecutive sentences during Semantic Chunking?Medium1ACosine similarityWord count ratioToken frequencyCharacter limitsIn Semantic Chunking, the similarity (for example cosine similarity) is calculated between the current sentence and the next one.
5Unit 1: RAG and OptimizationLec 1Advanced IndexingIn Semantic Chunking, when does the algorithm decide to split the text?Medium1DWhen similarity is above 90%.After a fixed number of punctuation marks.When the sentence length exceeds the threshold.When similarity drops significantly below a threshold.If similarity drops significantly below the threshold, it means the topic has changed, breaking the chunk there.
6Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat is a notable advantage of Semantic Chunking over Recursive Chunking?Medium1BIt runs extremely fast.It preserves ideas fully and perfectly follows the flow of text.It does not consume any computational resources.It is specifically designed for codebases.Semantic Chunking preserves ideas fully, strictly follows the text flow, and increases accuracy when searching.
7Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat is a major disadvantage of Semantic Chunking?Easy1CIt cuts through important ideas frequently.It returns very noisy contexts.It consumes computational resources due to running a model to compare each sentence.It only works for legal or contract documents.Because it must run an ML model to compare the similarity of each consecutive sentence, it consumes computational resources.
8Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat does HNSW stand for in the context of Vector Databases?Easy1AHierarchical Navigable Small WorldHigh Neural State WeightsHeuristic Node Searching WindowHierarchical Numeric Sequence WordHNSW stands for Hierarchical Navigable Small World, an effective algorithm balancing retrieval speed and accuracy.
9Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat kind of data structure does HNSW organize data into?Medium1CA flat SQL tableA chronological file systemA multi-layered graph structureA raw byte streamHNSW organizes data in the form of a multi-layered graph structure utilizing short and long shortcut links.
10Unit 1: RAG and OptimizationLec 1Advanced IndexingIn HNSW, what is the role of Layer 0?Medium1DIt contains the shortest summary of the dataset.It stores the sparse shortcut links.It is empty and serves as a placeholder.It contains all data points and the most detailed links between them.Layer 0 contains all data points, and the most detailed links. It contains the most complete information to find the exact target.
11Unit 1: RAG and OptimizationLec 1Advanced IndexingWhat does parameter M (Max Links per Node) dictate in HNSW?Hard1AThe maximum number of links a node can create with neighbor nodes.The memory limit in megabytes.The number of documents returned.The margin of error allowed.M specifies the maximum number of links a node can create with other neighbor nodes. The larger M is, the denser the network.
12Unit 1: RAG and OptimizationLec 1Advanced IndexingHow should ef_search be configured for a real-time Chatbot application?Hard1BIt should be set to 0.It should be kept at a low level (e.g., 50-100) to optimize latency.It should be set to maximum allowed bounds.It should equal the total number of documents.Keeping ef_search at a low level optimizes the system response time for a chatbot where small error margins are acceptable in favor of speed.
13Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat is an inherent weakness of standard Vector Search?Easy1CIt lacks speed when processing basic synonyms.It struggles with multilingual queries.It reveals weaknesses when encountering queries requiring absolute accuracy in wording.It ignores document meaning entirely.Vector Search reveals weaknesses when processing queries requiring absolute accuracy (e.g., proper names, error codes).
14Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat exactly constitutes a Hybrid Search mechanism?Easy1ACombining the power of semantic vector search with traditional keyword search.Merging structured and unstructured relational databases.Running two identical LLMs simultaneously.Compiling queries in both Python and Java.Hybrid search combines semantic search (Vector) and traditional keyword search (BM25).
15Unit 1: RAG and OptimizationLec 2Hybrid SearchWhich keyword frequency-based statistical algorithm is standard for Hybrid Search?Easy1DBERTHNSWHyDEBM25BM25 is the gold standard for traditional keyword retrieval algorithms in Hybrid Search.
16Unit 1: RAG and OptimizationLec 2Hybrid SearchHow does BM25 solve the keyword spamming problem found in TF-IDF?Medium1BBy manually blacklisting frequent spammers.By applying a saturation mechanism where scoring asymptotes after several keyword occurrences.By analyzing the semantic meaning of repetitive words.By deleting any document that repeats a word.BM25 applies a saturation mechanism so that appearing a 101st time hardly adds more score than the 10th time.
17Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat does Inverse Document Frequency (IDF) do in the BM25 formula?Medium1AIt penalizes common words and massively rewards rare words.It ranks shorter documents higher than longer ones.It limits the number of query words sent to the server.It inverses the vectors created by the model.IDF penalizes common words heavily while attributing more importance and score weight to rare words.
18Unit 1: RAG and OptimizationLec 2Hybrid SearchWhy is Length Normalization an important feature of BM25?Medium1CIt forces all documents to be exactly 1000 characters.It compresses long queries to save bandwidth.A single keyword in a short paragraph gets rated higher than the same keyword diluted in a long novel.It converts all characters to lowercase.BM25 scales the score based on document length to prevent long documents from unfairly dominating over concise information.
19Unit 1: RAG and OptimizationLec 2Hybrid SearchIn a typical Hybrid Search pipeline, how are the two algorithms executed?Medium1DVector search completes first, then BM25 is run on the results.BM25 runs entirely locally before running Vector remotely.Only one is executed depending on a query classifier.They are executed in parallel simultaneously.The system sends the query simultaneously to both search engines (Parallel Execution).
20Unit 1: RAG and OptimizationLec 2Hybrid SearchWhy can't we simply add the BM25 score and the Vector Search score together?Hard1BVector search scores are negative integers.The scoring scales are fundamentally different (Vector uses [0, 1] cosine similarity; BM25 is arbitrary positive numbers).They are processed on different neural network architectures.BM25 produces alphabetical grading ranges.The scoring scales of the two algorithms are completely different and numerically incompatible directly.
21Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat algorithm solves the score compatibility issue in Hybrid Search?Medium1CGraphRAG ConvolutionMaximal Marginal RelevanceReciprocal Rank Fusion (RRF)TF-IDF SmoothingReciprocal Rank Fusion (RRF) merges these two lists effectively.
22Unit 1: RAG and OptimizationLec 2Hybrid SearchUpon what theoretical basis does Reciprocal Rank Fusion (RRF) operate?Hard1AInstead of scores, it assumes that if a document appears at a high rank in both lists, it is certainly important.It averages the raw text chunks of both documents.It only accounts for the longest document.It uses an LLM to assign arbitrary ranks.RRF cares about rank rather than score; a high consensus of rank across disparate algorithms signifies an important document.
23Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat is the purpose of the smoothing constant k within the RRF formula?Hard1DIt identifies the number of total documents in the database.It sets the maximum allowed token count.It determines the strictness of exact keyword matching.It helps reduce score disparity between very high ranks, ensuring fairness.The constant kk (usually 60) reduces massive score disparities between adjacent high ranks (like Top 1 vs Top 2), ensuring a smoother gradient of rank scoring.
24Unit 1: RAG and OptimizationLec 2Hybrid SearchWhat does Hybrid Search primarily sacrifice to gain balanced Context and Keyword accuracy?Easy1BSecurity and PrivacySystem resources, as it is complex to deploy and consumes resources running 2 parallel streams.API documentation clarityMulti-lingual supportHybrid Search is more complex to deploy and consumes more resources due to running parallel streams simultaneously.
25Unit 1: RAG and OptimizationLec 3Query TransformationWhy do raw user questions often yield poor Vector Search results natively?Easy1CLLMs cannot read unformatted text.Vector databases reject single words.Questions are short/interrogative, lacking context compared to long descriptive documents.Search algorithms intentionally delay short queries.Vector Search faces semantic asymmetry; questions are short and interrogative while documents are long and descriptive.
26Unit 1: RAG and OptimizationLec 3Query TransformationWhat is the core idea of Query Transformation?Easy1AUsing an LLM to rewrite, expand, or break down the user's question into better versions before searching.Encrypting user queries before transmission.Replacing semantic searches with strict SQL SELECT queries.Running the user's prompt through a grammar checker.It uses an LLM to intelligently edit, expand, or rewrite poor raw queries before sending them to the lookup department.
27Unit 1: RAG and OptimizationLec 3Query TransformationWhat does HyDE stand for in Query Transformation?Medium1BHeavy Yield Database ExecutionHypothetical Document EmbeddingsHybrid Y-axis Dense EncapsulationHex-layered Data EncryptionHyDE stands for Hypothetical Document Embeddings.
28Unit 1: RAG and OptimizationLec 3Query TransformationWhat happens during the "Generate" phase of a HyDE strategy?Medium1DIt generates Python scripts.It generates a dense vector representing the question.It generates an index mapping inside the SQL table.The system asks the LLM to write a hypothetical answer paragraph for the user's question.The LLM is forced to draft a fake, hypothetical answer for the question so it matches the expected document vocabulary.
29Unit 1: RAG and OptimizationLec 3Query TransformationDoes the hypothetical "fake answer" drafted in HyDE need to be factually correct?Hard1BYes, exact factual accuracy guarantees precise matches.No, but the writing style and technical vocabulary should resemble the actual document.Yes, the model refuses to output hallucinated responses.No, it just generates a sequence of random numbers.The information in the paragraph might be factually incorrect, but its style and technical vocabulary mimic real documents to enable better semantic matching.
30Unit 1: RAG and OptimizationLec 3Query TransformationWhy is the vector generated from the "fake answer" in HyDE more useful than the user's question vector?Medium1AThe fake answer vector is semantically closer to the real document vector than the short interrogative question vector.It consumes 0 RAM.It maps perfectly to sparse BM25 arrays.The user's query vector is permanently deleted.The drafted answer contains similar sentence structures/buzzwords to real documents, closing the asymmetric semantic gap.
31Unit 1: RAG and OptimizationLec 3Query TransformationWhen is the Query Decomposition strategy particularly useful?Medium1CWhen querying single words.When parsing simple FAQ menus.When a question requires comparing or aggregating information from multiple independent scattered sources.When reading codebases in completely unknown programming languages.It handles complex multi-intent questions comparing or gathering data from multiple sources where a single text snippet fails to contain the whole answer.
32Unit 1: RAG and OptimizationLec 3Query TransformationWhat happens during the first phase (Breakdown) of Query Decomposition?Medium1AThe LLM analyzes the original question and splits it into a sequence of separate independent sub-questions.The system shreds the database documents into chunks.The LLM provides the final answer immediately without searching.The database is partitioned across multiple distinct servers.The system identifies multi-intent questions and logically breaks them into single-intent targeted sub-questions.
33Unit 1: RAG and OptimizationLec 3Query TransformationHow does Query Decomposition run searches for multiple sub-questions?Medium1BIt merges all sub-questions back into one query.It performs standard document searches individually for each separate sub-question.It relies exclusively on cached external queries.It skips queries containing conjunctions.It executes distinct targeted retrieval queries for every identified independent sub-question.
34Unit 1: RAG and OptimizationLec 3Query TransformationWhich phase of Query Decomposition requires the LLM to process text found from all separate sub-searches?Easy1CBreakdownEncapsulationSynthesisVerificationIn Synthesis, text segments found from all previous distinct steps are aggregated and fed into the LLM to form a complete final answer.
35Unit 1: RAG and OptimizationLec 3Query TransformationIn summary, what role does Query Transformation act as?Easy1DAn internet firewall proxy.A database administrator deleting old records.A compiler translating queries to binary.An intelligent editor reorienting questions to ensure the system correctly understands true intent.It performs intelligent preprocessing (via drafting or splitting) so concise or poor user queries execute properly against the technical index.
36Unit 1: RAG and OptimizationLec 4Post-RetrievalWhy is the Top-K list returned directly from standard retrievers often suboptimal for an LLM?Medium1AStandard embedding models trade deep semantic accuracy for retrieval speed, and may return contextually incorrect "noisy" keyword matches.The returned list is usually empty.The standard top-K size is too large for modern hardware.The returned documents are always translated to a random language.Embedding models heavily prioritize index speed over complex relationship comprehension, often returning documents with matching keywords but wrong contextual intents.
37Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat represents the main goal of Re-ranking in a RAG pipeline?Easy1CTo randomly shuffle the document list.To format the output HTML for the frontend.To act as a final filter processing a small pool of candidates to pick the absolutely best ones.To permanently alter the dataset ordering.Re-ranking takes a small pool (like 50) and spends extra computational time reading them carefully to pick the top 5 highest-quality documents.
38Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat architectural method do standard Embedding Models use during the Retrieval step?Medium1BGraph-EncoderBi-EncoderCross-EncoderRecursive-EncoderRetrieval embeddings process questions and documents separately via Bi-Encoders.
39Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat is the major pros and cons of the Bi-Encoder architecture?Hard1AFast speed (via pre-computation), but loses detailed nuanced interaction information between question and document words.Extreme accuracy, but consumes too much API quota.Perfectly handles complex negations, but fails at simple keywords.It guarantees data privacy, but prevents external web searches.Because the vectors are calculated independently ahead of time, it runs fast but misses deeper interrelated context (like negations vs subjects).
40Unit 1: RAG and OptimizationLec 4Post-RetrievalHow does a Cross-Encoder fundamentally differ from a Bi-Encoder?Hard1DIt translates everything into Spanish.It maps vectors onto a graph database exclusively.It bypasses the attention mechanism entirely.The question and document are concatenated into a single text sequence, processed simultaneously via a full Self-Attention mechanism.Instead of separated outputs, Cross-Encoders read both strings concurrently to understand complex logic, negation, and interactions between all words simultaneously.
41Unit 1: RAG and OptimizationLec 4Post-RetrievalIf Cross-Encoders are incredibly accurate, why don't we use them to search the entire database?Medium1CThey cannot run on GPUs.They only output integers.They are very slow and resource-consuming to run across millions of documents.They are blocked by vector database protocols.Processing millions of documents concurrently through strict Self-Attention is too computationally slow.
42Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat describes the Funnel Strategy in Post-Retrieval?Medium1BRunning Bi-Encoder and Cross-Encoder on separate clusters entirely.Using Bi-Encoder to fast-retrieve a Top 50, then using Cross-Encoder to slowly re-score those 50 into a Top 5.Splitting documents into smaller funnels based on character limits.Re-ranking the vector database before queries arrive.The funnel strategy accepts speed from Bi-Encoders (for finding 50 items) and precision from Cross-Encoders (for filtering to 5).
43Unit 1: RAG and OptimizationLec 4Post-RetrievalIn scenarios dealing with biological negation (e.g., "What does Python NOT eat"), why does a Cross-Encoder succeed where a Bi-Encoder fails?Hard1AThe Cross-Encoder recognizes the negation structure and biological context perfectly since it reads the query and document concurrently.The Cross-Encoder has a specialized biology database pre-installed.The Bi-Encoder deletes the word "NOT".The Cross-Encoder ignores keywords entirely.Bi-Encoders mistakenly link the keywords "Python" and "eat", while Cross-Encoders accurately recognize the negation modifier mapping to the biological logic.
44Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat does MMR stand for in the context of Post-Retrieval processing?Medium1DMinimum Marginal RatingMulti-Model RetrievalMemory Mapping ResolutionMaximal Marginal RelevanceMMR stands for Maximal Marginal Relevance, an algorithm used to diversify query results.
45Unit 1: RAG and OptimizationLec 4Post-RetrievalWhat twofold problem does MMR aim to solve when selecting final documents?Medium1BSize vs CompressionRelevance to the query vs Diversity to prevent identical redundant documents.API Latency vs Local StorageToken allowance vs Security constraintsWhen similarity returns 5 identical paragraphs of text, MMR resolves the redundancy by ensuring selected documents are relevant but distinctly diverse.
46Unit 1: RAG and OptimizationLec 4Post-RetrievalIn the MMR algorithm, what occurs after picking the most similar document (Step 1)?Hard1CThe system clears the cache.The system returns immediately.It finds the next document similar to the query but least similar to previously selected documents.It picks the document that is completely irrelevant to the query.Step 2 balances relevance by filtering for the next document containing the query's answer but differing heavily from the document already selected.
47Unit 1: RAG and OptimizationLec 4Post-RetrievalIn the MMR optimization formula, what does lowering lambda (λ\lambda) do?Hard1APriorities diversity by increasing the penalty for selecting text similar to existing selected documents.Causes the system to crash.Forces exact keyword matching.Elevates relevance entirely over diversity.Decreasing lambda gives more mathematical priority to the diversity penalty section of the MMR formula, forcing varied information.
48Unit 1: RAG and OptimizationLec 4Post-RetrievalIf a user asks a broad question ("Features of VF8 Car") and wants comprehensive overall coverage, which Re-ranker is optimal?Medium1CFlat IndexingRecursive ChunkingMaximal Marginal Relevance (MMR)Simple Bi-Encoder similarityMMR guarantees diverse, non-redundant documents giving the LLM text detailing multiple broad vehicle features, not just repeated text about its engine.
49Unit 1: RAG and OptimizationLec 5GraphRAGWhat does GraphRAG combine to create a comprehensive knowledge representation system?Easy1BCloud storage and Edge devicesStructured graph databases with vector-based retrievalDense and Sparse chunking limitsHybrid APIs and NoSQL mappingsGraphRAG merges structured graph DBs (like Neo4j) and vector retrieval.
50Unit 1: RAG and OptimizationLec 5GraphRAGWhat popular graph database is used for storing GraphRAG entities in the implementation example?Easy1ANeo4jPostgreSQLElasticSearchMongoDBNeo4j is utilized to construct and store the nodes and relationship graphs.
51Unit 1: RAG and OptimizationLec 5GraphRAGWhat is the purpose of Pydantic models in the implementation pipeline?Medium1DTo render the Neo4j visualization frontend.To manage API timeout failures.To download PDF files correctly.To enforce validation schemas for structured entity/relationship output from the LLM.Pydantic classes like PolicyClauseExtraction compel the LLM to output consistent, strictly validated object types representing entities.
52Unit 1: RAG and OptimizationLec 5GraphRAGAccording to the implementation extraction rules, what constitutes a "commitment"?Medium1CSimple definitions and jargon.Any sentence ending in a period.A clear promise, obligation, or prohibition found in the text.A numeric calculation executed by the CPU.The LLM is instructed to identify clear promises, obligations, or prohibitions as Commitments.
53Unit 1: RAG and OptimizationLec 5GraphRAGHow are measurable numeric limits inside obligations handled during extraction?Hard1DThey are discarded mathematically.They are summed together.They are sent to a calculator API.They are explicitly extracted as Constraint unit parameters.If a commitment contains numeric limits, the agent extracts them strictly as linked Constraints.
54Unit 1: RAG and OptimizationLec 5GraphRAGWhat does the .with_structured_output(PolicyClauseExtraction) method achieve in LangChain?Medium1AForces the LLM to reply via JSON adhering precisely to the Pydantic schema class.Translates the output into Neo4j graph visualizations natively.Prevents the model from reading files.Outputs Python code running in a sandbox.It guarantees the unstructured text processed by the ChatGPT API is accurately deserialized back into structured PolicyClauseExtraction objects.
55Unit 1: RAG and OptimizationLec 5GraphRAGIn the designed graph schema, what do PolicyClause nodes specifically track?Easy1CThe user identities processing the data.The hardware metrics.The overarching policy topics/units from chunked texts.The exact numeric values from commitments.PolicyClause nodes store the actual chunked policy texts/topics serving as central nodes linking other entities.
56Unit 1: RAG and OptimizationLec 5GraphRAGIn Cypher (Neo4j), which operation ensures duplicate nodes are not created during ingestion?Medium1BINSERT IGNOREMERGEUPSERTADD DISTINCTUsing the MERGE query checks existence before inserting, preventing duplicated nodes.
57Unit 1: RAG and OptimizationLec 5GraphRAGHow are Stakeholder nodes structurally linked in the Neo4j graph?Hard1AVia the AFFECTS relationship incoming from the PolicyClause node.Via a standalone IS_A class instance mapping.Via CONTAINS relationships stemming from Regulation nodes.They are completely unlinked.Stakeholder nodes reflect affected parties, mapped using [:AFFECTS] from the PolicyClause.
58Unit 1: RAG and OptimizationLec 5GraphRAGWhat represents a distinct advantage of GraphRAG over standard vector similarity search?Medium1BIt consumes zero system memory.Relationships explicitly define how entities connect, solving queries needing context-aware traversal mapping.It requires no chunking.It automatically resolves grammatical mistakes.Graph traversal natively exposes how discrete entities explicitly connect, answering intricate logical queries that vector distances alone cannot deduce.
59Unit 1: RAG and OptimizationLec 5GraphRAGWhich LangChain module converts natural language into Cypher queries for the LLM?Medium1AGraphCypherQAChainVectorDBQAChainPydanticOutputParserDocumentConverterGraphCypherQAChain converts English questions into Cypher code capable of traversing the graph structure.
60Unit 1: RAG and OptimizationLec 5GraphRAGWhat is noted as a core limitation or consideration when implementing GraphRAG?Medium1DIt deletes all prior indexes upon restart.It requires user authentication before every search.The LLM must be hosted locally.It relies heavily on specific types of structured data linking to form an effective knowledge base.GraphRAG's power originates strictly from highly structured data mappings; mapping unstructured erratic data yields poor relationships.