Databricks Generative AI Engineer Associate Question 304
Select 4You are designing a Retrieval-Augmented Generation (RAG) application on Databricks that utilizes a large language model (LLM). To minimize operational costs, which of the following actions should you take when configuring your Databricks environment and workflow?
- A
Implement caching mechanisms to store frequently used embeddings or query results.
- B
Use smaller fine-tuned LLMs for query handling instead of defaulting to large, general-purpose models.
- C
Always use the largest LLM available to ensure high accuracy for all use cases.
- D
Leverage Databricks Auto Loader to preprocess and filter data before sending it to the LLM.
- E
Optimize the retrieval process by embedding documents in advance and storing them in a vector database.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To control LLM costs in a RAG application on Databricks, it is important to optimize both the data processing pipeline and the LLM usage. Strategies such as caching, using smaller fine-tuned models, preprocessing data, and leveraging pre-computed embeddings ensure efficient resource utilization and reduce the frequency and intensity of LLM calls. Avoiding the largest models unless necessary further helps in cost reduction.
- A. Correct.
Implementing caching mechanisms reduces redundant LLM calls for repeated or similar queries, lowering compute costs.
- B. Correct.
Using smaller fine-tuned LLMs is cost-effective and can still provide sufficient accuracy for specific tasks, avoiding the high computational expense of larger models.
- C. Incorrect.
Using the largest LLM available increases costs significantly and is unnecessary for all use cases, especially when smaller models or optimized workflows can suffice.
- D. Correct.
Databricks Auto Loader helps preprocess and filter data, ensuring only relevant inputs are sent to the LLM, which reduces unnecessary compute expenses.
- E. Correct.
Optimizing the retrieval process by pre-embedding documents and storing them in a vector database minimizes real-time computation, reducing costs associated with embedding generation.