Databricks Generative AI Engineer Associate Question 300
Select 3You are developing a Retrieval-Augmented Generation (RAG) application on Databricks that uses a Large Language Model (LLM) to generate answers to user queries by retrieving relevant documents. Your team is concerned about controlling costs associated with LLM usage. Which of the following Databricks features or practices can help you minimize these costs effectively?
- A
Implement caching for frequently retrieved embeddings in Databricks.
- B
Use Databricks Auto Loader to continuously stream new data into your vector store.
- C
Leverage Databricks Photon Engine to optimize the retrieval of relevant documents.
- D
Downsize the LLM by fine-tuning a smaller model using Databricks AutoML.
- E
Limit the token count sent to the LLM by pre-filtering retrieved documents in Databricks.
Show answer and explanation
Correct answers: A, C, E
Explanation
To control LLM costs in a RAG application on Databricks, you can utilize features like caching to eliminate redundant computations, optimize document retrieval using Databricks Photon Engine, and limit the token count sent to the LLM by pre-filtering documents. These practices ensure efficient utilization of resources and reduce unnecessary expenses.
- A. Correct.
Implementing caching for frequently retrieved embeddings reduces redundant computation and avoids unnecessary LLM calls, which helps minimize costs.
- B. Incorrect.
Using Databricks Auto Loader is beneficial for ingesting new data but does not directly contribute to controlling LLM usage costs.
- C. Correct.
Databricks Photon Engine accelerates queries on large datasets, improving retrieval efficiency and potentially reducing LLM-related expenses by ensuring only necessary data is sent to the model.
- D. Incorrect.
Downsizing the LLM by fine-tuning a smaller model may reduce costs in some scenarios, but this is not specific to Databricks features and may require significant effort and expertise.
- E. Correct.
Limiting the token count by pre-filtering retrieved documents ensures that only the most relevant information is processed by the LLM, directly reducing costs.