🔍

GENERATIVE-AI-ENGINEER-ASSOCIATE — questions

Page 3 of 5 · 91 total questions.

Topic 1 · Question 42

A team wants to serve a code generation model as an assistant for their software developers. It should support multiple programming languages. Quality is the primary objective. Which of the Databricks Foundation Model APIs, or models available in the Marketplace, would be the best fit?

  • ALlama2-70b
  • BBGE-large
  • CMPT-7b
  • DCodeLlama-34B (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: CodeLlama-34B

Topic 1 · Question 43

A Generative AI Engineer is building a RAG application that will rely on context retrieved from source documents that are currently in PDF format. These PDFs can contain both text and images. They want to develop a solution using the least amount of lines of code. Which Python package should be used to extract the text from the source documents?

  • Aflask
  • Bbeautifulsoup
  • Cunstructured (correct answer)
  • Dnumpy
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: unstructured

Topic 1 · Question 44

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?

  • AThe chatbot should only look at previous event information
  • BThere should be two different chatbots handling different types of user queries.
  • CThe 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. (correct answer)
  • DThe chatbot should only process payments
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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 tex...

Topic 1 · Question 45

A Generative Al Engineer is tasked with developing an application that is based on an open source large language model (LLM). They need a foundation LLM with a large context window. Which model fits this need?

  • ADistilBERT
  • BMPT-30B
  • CLlama2-70B
  • DDBRX (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: DBRX

Topic 1 · Question 46

A Generative AI 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 AI models should be used?

  • ADBRX
  • BMPT-30B-Instruct
  • CLlama-2-70b-chat-hf
  • Dwhisper-large-v3 (1.6B) (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: whisper-large-v3 (1.6B)

Topic 1 · Question 47

A Generative AI Engineer has a provisioned throughput model serving endpoint as part of a RAG application and would like to monitor the serving endpoint’s incoming requests and outgoing responses. Which Databricks feature should they use?

  • AAutoML
  • BVector Search
  • CInference Tables (correct answer)
  • DFeature Serving
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Inference Tables

Topic 1 · Question 48

A Generative AI Engineer is deciding between using LSH (Locality Sensitive Hashing) and HNSW (Hierarchical Navigable Small World) for indexing their vector database. Their top priority is semantic accuracy. Which approach should the Generative AI Engineer use to evaluate these two techniques?

  • ACompare the cosine similarities of the embeddings of returned results against those of a representative sample of test inputs (correct answer)
  • BCompare the Bilingual Evaluation Understudy (BLEU) scores of returned results for a representative sample of test inputs
  • CCompare the Recall-Oriented-Understudy for Gisting Evaluation (ROUGE) scores of returned results for a representative sample of test inputs
  • DCompare the Levenshtein distances of returned results against a representative sample of test inputs
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Compare the cosine similarities of the embeddings of returned results against those of a representative sample of test inputs

Explanation

An embedding maps content into a numeric vector so semantically similar items can be retrieved by distance.

Topic 1 · Question 49

When developing an LLM application, it’s crucial to ensure that the data used for training the model complies with licensing requirements to avoid legal risks. Which action is most appropriate to avoid legal risks?

  • AOnly use data explicitly labeled with an open license and ensure the license terms are followed. (correct answer)
  • BAny LLM outputs are reasonable to use because they do not reveal the original sources of data directly.
  • CReach out to the data curators directly to gain written consent for using their data.
  • DUse any publicly available data as public data does not have legal restrictions.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Only use data explicitly labeled with an open license and ensure the license terms are followed.

Topic 1 · Question 50

A Generative AI Engineer interfaces with an LLM with instruction-following capabilities trained on customer calls inquiring about product availability. The LLM should output “Success” if the product is available or “Fail” if not. Which prompt allows the engineer to receive call classification labels correctly?

  • AYou are a helpful assistant that reads customer call transcripts. Walk through the transcript and think step-by-step if the customer’s inquiries are addressed successfully. Answer “Success” if yes; otherwise, answer “Fail”.
  • BYou will be given a customer call transcript where the customer asks about product availability. Classify the call as “Success” if the product is available and “Fail” if the product is unavailable. (correct answer)
  • CYou will be given a customer call transcript where the customer asks about product availability. The outputs are either “Success” or “Fail”. Format the output in JSON, for example: {"call_id": "123", "label": "Succes"}.
  • DYou will be given a customer call transcript. Answer “Success” if the customer call has been resolved successfully. Answer “Fail” if the call is redirected or if the question is not resolved.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: You will be given a customer call transcript where the customer asks about product availability. Classify the call as “Success” if the product is available and “Fail” if the product is unavailable.

Topic 1 · Question 51 · Select all that apply

Which TWO chain components are required for building a basic LLM-enabled chat application that includes conversational capabilities, knowledge retrieval, and contextual memory? (Choose two.)

  • AVector Stores (correct answer)
  • BConversation Buffer Memory (correct answer)
  • CExternal tools
  • DChat loaders
  • EReact Components
Reveal answer & explanation
Correct answer: A, B

The correct answer is A, B. Option A: Vector Stores Option B: Conversation Buffer Memory

Topic 1 · Question 52

A Generative AI Engineer has written scalable PySpark code to ingest unstructured PDF documents and chunk them in preparation for storing in a Databricks Vector Search index. Currently, the two columns of their dataframe include the original filename as a string and an array of text chunks from that document. What set of steps should the Generative AI Engineer perform to store the chunks in a ready-to-ingest manner for Databricks Vector Search?

  • AUse PySpark’s autoloader to apply a UDF across all chunks, formatting them in a JSON structure for Vector Search ingestion.
  • BFlatten the dataframe to one chunk per row, create a unique identifier for each row, and enable change feed on the output Delta table. (correct answer)
  • CUtilize the original filename as the unique identifier and save the dataframe as is.
  • DCreate a unique identifier for each document, flatten the dataframe to one chunk per row and save to an output Delta table.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Flatten the dataframe to one chunk per row, create a unique identifier for each row, and enable change feed on the output Delta table. This option scales automatically to match demand.

Topic 1 · Question 53

A Generative AI Engineer is asked to build an LLM application that would excel at code generation. They need to select a model that has been specifically trained to generate code. Which model would likely produce the best results out of the box?

  • ACodeLlama-34b-Instruct-hf (correct answer)
  • BMixtral-8x7B-v0.1
  • CLlama-2-70b-hf
  • Dmpt-7b-8k-instruct
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: CodeLlama-34b-Instruct-hf

Topic 1 · Question 54

A Generative AI Engineer needs to design an LLM pipeline to conduct multi-stage reasoning that leverages external tools. To be effective at this, the LLM will need to plan and adapt actions while performing complex reasoning tasks. Which approach will do this?

  • ATrain the LLM to generate a single, comprehensive response without interacting with any external tools, relying solely on its pre-trained knowledge.
  • BUse a Chain-of-Thought (CoT) prompting technique to guide the LLM through a series of reasoning steps, then manually input the results from external tools for the final answer.
  • CImplement a framework like ReAct, which allows the LLM to generate reasoning traces and perform task-specific actions that leverage external tools if necessary. (correct answer)
  • DEncourage the LLM to make multiple API calls in sequence without planning or structuring the calls, allowing the LLM to decide when and how to use external tools spontaneously.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Implement a framework like ReAct, which allows the LLM to generate reasoning traces and perform task-specific actions that leverage external tools if necessary.

Explanation

Retrieval-augmented generation grounds model responses in retrieved enterprise data to improve relevance and reduce unsupported claims.

Topic 1 · Question 55

A Generative AI Engineer at an automotive company would like to build a question-answering chatbot for customers to inquire about their vehicles. They have a database containing various documents of different vehicle makes, their hardware parts, and common maintenance information. Which of the following components will NOT be useful in building such a chatbot?

  • AInvite users to submit long, rather than concise, questions (correct answer)
  • BResponse-generating LLM
  • CEmbedding model
  • DVector database
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Invite users to submit long, rather than concise, questions

Topic 1 · Question 56

A Generative AI Engineer is building an LLM to generate article headlines given the article content. However, the initial output from the LLM does not match the desired tone or style. Which approach would be most effective for adjusting the LLM’s response to achieve the desired response?

  • AExclude any article headlines that do not match the desired output
  • BFine-tune the LLM on a dataset of desired tone and style
  • CProvide the LLM with a prompt that explicitly instructs it to generate text in the desired tone and style (correct answer)
  • DAll of the above
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Provide the LLM with a prompt that explicitly instructs it to generate text in the desired tone and style

Topic 1 · Question 57

A Generative AI Engineer is creating a customer support bot that should respond differently to an end user based on the sentiment in their initial message. For example, if the end user’s message was angry, the bot should try to de-escalate their negative sentiments as it solves the customer query. They want to make sure their approach follows best practices. Which approach will do this?

  • AUse an encoder-only LLM model to both detect sentiment and generate replies based upon the detected sentiment.
  • BImplement a RAG architecture for how to respond to users depending on detected sentiment.
  • CUse linear regression model to classify sentiment and feed the result to a system prompt for the LLM to respond.
  • DCreate a chain which first uses an LLM to classify sentiment, then changes system prompt for the customer interaction LLM based upon the initial customer query sentiment. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a chain which first uses an LLM to classify sentiment, then changes system prompt for the customer interaction LLM based upon the initial customer query sentiment.

Topic 1 · Question 58

A Generative AI 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?

  • AUse OAuth machine-to-machine authentication
  • BUse an access token belonging to service principals (correct answer)
  • CUse an access token belonging to any workspace user
  • DUse a frequently rotated access token belonging to either a workspace user or a service principal
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use an access token belonging to service principals This option keeps traffic private / properly secured as required.

Topic 1 · Question 59 · Select all that apply

A Generative AI Engineer is developing a RAG system for their company to perform internal document Q&A for structured HR policies, but the answers returned are frequently incomplete and unstructured. It seems that the retriever is not returning all relevant context. The Generative AI Engineer has experimented with different embedding and response generating LLMs but that did not improve results. Which TWO options could be used to improve the response quality? (Choose two.)

  • AAdd the section header as a prefix to chunks (correct answer)
  • BSplit the document by sentence
  • CUse a larger embedding model
  • DIncrease the document chunk size (correct answer)
  • EFine tune the response generation model
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Add the section header as a prefix to chunks Option D: Increase the document chunk size

Topic 1 · Question 60

A Generative AI Engineer is building a production-ready LLM system which replies directly to customers. The solution makes use of the Foundation Model API via provisioned throughput. They are concerned that the LLM could potentially respond in a toxic or otherwise unsafe way. They also wish to perform this with the least amount of effort. Which approach will do this?

  • AAsk users to report unsafe responses
  • BHost Llama Guard on Foundation Model API and use it to detect unsafe responses. (correct answer)
  • CAdd some LLM calls to their chain to detect unsafe content before returning text
  • DAdd a regex expression on inputs and outputs to detect unsafe responses.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Host Llama Guard on Foundation Model API and use it to detect unsafe responses. This option is the most fully managed / serverless choice, so it meets the requirement for the least operational overhead.

Topic 1 · Question 61

A Generative AI Engineer would like an LLM to parse and extract the following information: date, sender email, and order ID. The output should be formatted into JSON. Here’s an email sample: They need a prompt that will extract and output the required information in JSON with the highest level of output accuracy. Which prompt will do that?

Exhibit 1 for question 61
  • AYou will receive customer emails and need to extract date, sender email, and order ID. Return the extracted information in a human-readable format.
  • BYou will receive customer emails and need to extract date, sender email, and order ID. Return the extracted information in JSON format.
  • CYou will receive customer emails and need to extract date, sender email, and order ID. Return the extracted information in JSON format. Here’s an example: {"date":"April 16, 2024", "sender_email":"[email protected]", "order_id":"RE987D"} (correct answer)
  • DYou will receive customer emails and need to extract date, sender email, and order IYou should return the date, sender email, and order ID information in JSON format.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: You will receive customer emails and need to extract date, sender email, and order ID. Return the extracted information in JSON format. Here’s an example: {"date":"April 16, 2024", "sender_email":"[email protected]",...

Showing questions 4160 of 91 · Page 3 of 5