Spring AI MCQs with answers Page - 5

Here, you will find a collection of MCQ questions on Spring AI. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Arogya • 3.19K Points
Extraordinary

Q. Which class helps create prompts dynamically in Spring AI?

  • (A) PromptTemplate
  • (B) BeanFactory
  • (C) RestControllerAdvice
  • (D) TransactionTemplate

A

Arogya • 3.19K Points
Extraordinary

Q. Which storage is recommended for long conversation history?

  • (A) In-memory list only
  • (B) Persistent database or vector store
  • (C) HTTP cookies
  • (D) Browser cache

A

Arogya • 3.19K Points
Extraordinary

Q. What does grounding mean in AI applications?

  • (A) Deploying servers
  • (B) Basing responses on real data sources
  • (C) Compressing responses
  • (D) Encrypting tokens

A

Arogya • 3.19K Points
Extraordinary

Q. Which component converts documents into embeddings in Spring AI?

  • (A) EmbeddingModel
  • (B) ServletContainer
  • (C) JdbcDriver
  • (D) MessageConverter

A

Arogya • 3.19K Points
Extraordinary

Q. What is streaming response in Spring AI?

  • (A) Sending the full response at once
  • (B) Sending AI output token by token
  • (C) Downloading files
  • (D) Database replication

A

Arogya • 3.19K Points
Extraordinary

Q. Which protocol is commonly used to stream AI responses in web apps?

  • (A) Server-Sent Events (SSE)
  • (B) FTP
  • (C) SMTP
  • (D) SNMP

A

Arogya • 3.19K Points
Extraordinary

Q. What does prompt injection refer to?

  • (A) Database SQL injection
  • (B) Malicious instructions inserted into prompts
  • (C) Network attack
  • (D) Hardware failure

A

Arogya • 3.19K Points
Extraordinary

Q. Which practice improves AI security in Spring AI apps?

  • (A) Input validation and filtering
  • (B) Disabling logging
  • (C) Removing authentication
  • (D) Increasing heap memory

A

Arogya • 3.19K Points
Extraordinary

Q. What is a token limit in LLMs?

  • (A) Database row limit
  • (B) Maximum text the model can process
  • (C) CPU usage cap
  • (D) Memory allocation

A

Arogya • 3.19K Points
Extraordinary

Q. Which use case best fits Spring AI?

  • (A) Operating system development
  • (B) Customer support chatbot
  • (C) Device drivers
  • (D) Compiler design