Pre-Winter Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > Databricks > Generative AI Engineer > Databricks-Generative-AI-Engineer-Associate

Databricks-Generative-AI-Engineer-Associate Databricks Certified Generative AI Engineer Associate Question and Answers

Question # 4

A Generative AI Engineer is building an LLM to generate article summaries in the form of a type of poem, such as a haiku, given the article content. However, the initial output from the LLM does not match the desired tone or style.

Which approach will NOT improve the LLM’s response to achieve the desired response?

A.

Provide the LLM with a prompt that explicitly instructs it to generate text in the desired tone and style

B.

Use a neutralizer to normalize the tone and style of the underlying documents

C.

Include few-shot examples in the prompt to the LLM

D.

Fine-tune the LLM on a dataset of desired tone and style

Full Access
Question # 5

Which indicator should be considered to evaluate the safety of the LLM outputs when qualitatively assessing LLM responses for a translation use case?

A.

The ability to generate responses in code

B.

The similarity to the previous language

C.

The latency of the response and the length of text generated

D.

The accuracy and relevance of the responses

Full Access
Question # 6

A Generative AI Engineer wants to build an LLM-based solution to help a restaurant improve its online customer experience with bookings by automatically handling common customer inquiries. The goal of the solution is to minimize escalations to human intervention and phone calls while maintaining a personalized interaction. To design the solution, the Generative AI Engineer needs to define the input data to the LLM and the task it should perform.

Which input/output pair will support their goal?

A.

Input: Online chat logs; Output: Group the chat logs by users, followed by summarizing each user’s interactions

B.

Input: Online chat logs; Output: Buttons that represent choices for booking details

C.

Input: Customer reviews; Output: Classify review sentiment

D.

Input: Online chat logs; Output: Cancellation options

Full Access
Question # 7

A Generative Al Engineer is tasked with improving the RAG quality by addressing its inflammatory outputs.

Which action would be most effective in mitigating the problem of offensive text outputs?

A.

Increase the frequency of upstream data updates

B.

Inform the user of the expected RAG behavior

C.

Restrict access to the data sources to a limited number of users

D.

Curate upstream data properly that includes manual review before it is fed into the RAG system

Full Access
Question # 8

A Generative Al Engineer interfaces with an LLM with prompt/response behavior that has been trained on customer calls inquiring about product availability. The LLM is designed to output “In Stock” if the product is available or only the term “Out of Stock” if not.

Which prompt will work to allow the engineer to respond to call classification labels correctly?

A.

Respond with “In Stock” if the customer asks for a product.

B.

You will be given a customer call transcript where the customer asks about product availability. The outputs are either “In Stock” or “Out of Stock”. Format the output in JSON, for example: {“call_id”: “123”, “label”: “In Stock”}.

C.

Respond with “Out of Stock” if the customer asks for a product.

D.

You will be given a customer call transcript where the customer inquires about product availability. Respond with “In Stock” if the product is available or “Out of Stock” if not.

Full Access
Question # 9

A Generative AI Engineer has deployed a RAG application to production. Its Vector Search index is built from a Delta table that receives incremental updates every hour from an upstream ETL pipeline. The team wants the index to automatically reflect source-table changes without manual re-indexing and without changing the endpoint used by downstream applications.

Which approach should the engineer use?

A.

Replace the current index with a Direct Vector Access index and push updates through a custom streaming job.

B.

Update the pipeline mode to continuous mode rather than triggered mode.

C.

Schedule a job to rebuild the index every hour after the ETL pipeline finishes.

D.

Use a Delta Sync index so changes in the source Delta table are automatically synchronized to the index.

Full Access
Question # 10

A Generative Al Engineer is ready to deploy an LLM application written using Foundation Model APIs. They want to follow security best practices for production scenarios

Which authentication method should they choose?

A.

Use an access token belonging to service principals

B.

Use a frequently rotated access token belonging to either a workspace user or a service principal

C.

Use OAuth machine-to-machine authentication

D.

Use an access token belonging to any workspace user

Full Access
Question # 11

A team uses Mosaic AI Vector Search to retrieve documents for their Retrieval-Augmented Generation (RAG) pipeline. The search query returns five relevant documents, and the first three are added to the prompt as context. Performance evaluation with Agent Evaluation shows that some lower-ranked retrieved documents have higher context relevancy scores than higher-ranked documents. Which option should the team consider to optimize this workflow?

A.

Use a reranker to order the documents based on the relevance scores.

B.

Modify the prompt to instruct the LLM to order the documents based on the relevance scores.

C.

Use a different embedding model for computing document embeddings.

D.

Increase the number of documents added to the prompt to improve context relevance.

Full Access
Question # 12

A Generative AI Engineer is developing a chatbot designed to assist users with insurance-related queries. The chatbot is built on a large language model (LLM) and is conversational. However, to maintain the chatbot’s focus and to comply with company policy, it must not provide responses to questions about politics. Instead, when presented with political inquiries, the chatbot should respond with a standard message:

“Sorry, I cannot answer that. I am a chatbot that can only answer questions around insurance.”

Which framework type should be implemented to solve this?

A.

Safety Guardrail

B.

Security Guardrail

C.

Contextual Guardrail

D.

Compliance Guardrail

Full Access
Question # 13

A Generative AI Engineer is deploying a conversational agent that provides financial-analysis insights to internal analysts at a company. The company has standardized on Microsoft 365 for all internal communications and collaboration. The analysts are distributed across multiple time zones and primarily work within Microsoft Teams channels, where they already discuss financial data and share reports. The agent needs to integrate with the company’s existing Azure Active Directory for authentication and must respect the company’s data-governance policies. Users should be able to interact with the agent within their existing workflow without switching applications.

Which interface should the engineer implement for this agent deployment?

A.

Slack integration to enable the agent in a dedicated workspace for the financial-analysis team.

B.

Microsoft Teams integration to deploy the agent as a bot within Teams channels where analysts already collaborate.

C.

REST API endpoint with a custom frontend application hosted on the company’s internal portal.

D.

Databricks Apps to create a custom web application that analysts can access through their browsers with SSO authentication.

Full Access
Question # 14

A Generative Al Engineer is building an LLM-based application that has an

important transcription (speech-to-text) task. Speed is essential for the success of the application

Which open Generative Al models should be used?

A.

L!ama-2-70b-chat-hf

B.

MPT-30B-lnstruct

C.

DBRX

D.

whisper-large-v3 (1.6B)

Full Access
Question # 15

A company has a typical RAG-enabled, customer-facing chatbot on its website.

Select the correct sequence of components a user ' s questions will go through before the final output is returned. Use the diagram above for reference.

A.

1.embedding model, 2.vector search, 3.context-augmented prompt, 4.response-generating LLM

B.

1.context-augmented prompt, 2.vector search, 3.embedding model, 4.response-generating LLM

C.

1.response-generating LLM, 2.vector search, 3.context-augmented prompt, 4.embedding model

D.

1.response-generating LLM, 2.context-augmented prompt, 3.vector search, 4.embedding model

Full Access
Question # 16

A Generative Al Engineer is creating an LLM system that will retrieve news articles from the year 1918 and related to a user ' s query and summarize them. The engineer has noticed that the summaries are generated well but often also include an explanation of how the summary was generated, which is undesirable.

Which change could the Generative Al Engineer perform to mitigate this issue?

A.

Split the LLM output by newline characters to truncate away the summarization explanation.

B.

Tune the chunk size of news articles or experiment with different embedding models.

C.

Revisit their document ingestion logic, ensuring that the news articles are being ingested properly.

D.

Provide few shot examples of desired output format to the system and/or user prompt.

Full Access
Question # 17

A Generative AI Engineer has been asked to design an LLM-based application that accomplishes the following business objective: answer employee HR questions using HR PDF documentation.

Which set of high level tasks should the Generative AI Engineer ' s system perform?

A.

Calculate averaged embeddings for each HR document, compare embeddings to user query to find the best document. Pass the best document with the user query into an LLM with a large context window to generate a response to the employee.

B.

Use an LLM to summarize HR documentation. Provide summaries of documentation and user query into an LLM with a large context window to generate a response to the user.

C.

Create an interaction matrix of historical employee questions and HR documentation. Use ALS to factorize the matrix and create embeddings. Calculate the embeddings of new queries and use them to find the best HR documentation. Use an LLM to generate a response to the employee question based upon the documentation retrieved.

D.

Split HR documentation into chunks and embed into a vector store. Use the employee question to retrieve best matched chunks of documentation, and use the LLM to generate a response to the employee based upon the documentation retrieved.

Full Access
Question # 18

A Generative AI Engineer is developing a patient-facing healthcare-focused chatbot. If the patient’s question is not a medical emergency, the chatbot should solicit more information from the patient to pass to the doctor’s office and suggest a few relevant pre-approved medical articles for reading. If the patient’s question is urgent, direct the patient to calling their local emergency services.

Given the following user input:

“I have been experiencing severe headaches and dizziness for the past two days.”

Which response is most appropriate for the chatbot to generate?

A.

Here are a few relevant articles for your browsing. Let me know if you have questions after reading them.

B.

Please call your local emergency services.

C.

Headaches can be tough. Hope you feel better soon!

D.

Please provide your age, recent activities, and any other symptoms you have noticed along with your headaches and dizziness.

Full Access
Question # 19

What is the most suitable library for building a multi-step LLM-based workflow?

A.

Pandas

B.

TensorFlow

C.

PySpark

D.

LangChain

Full Access
Question # 20

A Generative AI Engineer needs to allocate costs for an agent deployed via Agent Framework behind AI Gateway. The finance team requires daily reporting by workspace and endpoint, including token usage and request counts. The engineer wants to query this data with SQL and join it to an internal cost-center mapping table.

Which table type best serves their needs?

A.

AI Gateway usage table.

B.

System Serving, Served Entities table.

C.

Inference Tables.

D.

MLflow experiment run tables.

Full Access
Question # 21

A Generative AI Engineer is testing a simple prompt template in LangChain using the code below, but is getting an error:

Python

from langchain.chains import LLMChain

from langchain_community.llms import OpenAI

from langchain_core.prompts import PromptTemplate

prompt_template = " Tell me a {adjective} joke "

prompt = PromptTemplate(input_variables=[ " adjective " ], template=prompt_template)

# ... (Error-prone section)

Assuming the API key was properly defined, what change does the Generative AI Engineer need to make to fix their chain?

A.

(Incorrect structure)

B.

(Incorrect structure)

C.

prompt_template = " Tell me a {adjective} joke "

prompt = PromptTemplate(input_variables=[ " adjective " ], template=prompt_template)

llm = OpenAI()

llm_chain = LLMChain(prompt=prompt, llm=llm)

llm_chain.generate([{ " adjective " : " funny " }])

D.

(Incorrect structure)

Full Access
Question # 22

A Generative Al Engineer has built an LLM-based system that will automatically translate user text between two languages. They now want to benchmark multiple LLM ' s on this task and pick the best one. They have an evaluation set with known high quality translation examples. They want to evaluate each LLM using the evaluation set with a performant metric.

Which metric should they choose for this evaluation?

A.

ROUGE metric

B.

BLEU metric

C.

NDCG metric

D.

RECALL metric

Full Access
Question # 23

What is an effective method to preprocess prompts using custom code before sending them to an LLM?

A.

Directly modify the LLM’s internal architecture to include preprocessing steps

B.

It is better not to introduce custom code to preprocess prompts as the LLM has not been trained with examples of the preprocessed prompts

C.

Rather than preprocessing prompts, it’s more effective to postprocess the LLM outputs to align the outputs to desired outcomes

D.

Write a MLflow PyFunc model that has a separate function to process the prompts

Full Access
Question # 24

A Generative Al Engineer is tasked with developing a RAG application that will help a small internal group of experts at their company answer specific questions, augmented by an internal knowledge base. They want the best possible quality in the answers, and neither latency nor throughput is a huge concern given that the user group is small and they’re willing to wait for the best answer. The topics are sensitive in nature and the data is highly confidential and so, due to regulatory requirements, none of the information is allowed to be transmitted to third parties.

Which model meets all the Generative Al Engineer’s needs in this situation?

A.

Dolly 1.5B

B.

OpenAI GPT-4

C.

BGE-large

D.

Llama2-70B

Full Access
Question # 25

A Generative AI Engineer developed an LLM application using the provisioned throughput Foundation Model API. Now that the application is ready to be deployed, they realize their volume of requests are not sufficiently high enough to create their own provisioned throughput endpoint. They want to choose a strategy that ensures the best cost-effectiveness for their application.

What strategy should the Generative AI Engineer use?

A.

Switch to using External Models instead

B.

Deploy the model using pay-per-token throughput as it comes with cost guarantees

C.

Change to a model with a fewer number of parameters in order to reduce hardware constraint issues

D.

Throttle the incoming batch of requests manually to avoid rate limiting issues

Full Access
Question # 26

A Generative Al Engineer is creating an LLM-based application. The documents for its retriever have been chunked to a maximum of 512 tokens each. The Generative Al Engineer knows that cost and latency are more important than quality for this application. They have several context length levels to choose from.

Which will fulfill their need?

A.

context length 514; smallest model is 0.44GB and embedding dimension 768

B.

context length 2048: smallest model is 11GB and embedding dimension 2560

C.

context length 32768: smallest model is 14GB and embedding dimension 4096

D.

context length 512: smallest model is 0.13GB and embedding dimension 384

Full Access
Question # 27

A Generative AI Engineer received the following business requirements for an external chatbot.

The chatbot needs to know what types of questions the user asks and routes to appropriate models to answer the questions. For example, the user might ask about upcoming event details. Another user might ask about purchasing tickets for a particular event.

What is an ideal workflow for such a chatbot?

A.

The chatbot should only look at previous event information

B.

There should be two different chatbots handling different types of user queries.

C.

The chatbot should be implemented as a multi-step LLM workflow. First, identify the type of question asked, then route the question to the appropriate model. If it’s an upcoming event question, send the query to a text-to-SQL model. If it’s about ticket purchasing, the customer should be redirected to a payment platform.

D.

The chatbot should only process payments

Full Access