Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-1127-25 Topic 2 Question 5 Discussion

Actual exam question for Oracle's 1Z0-1127-25 exam
Question #: 5
Topic #: 2
[All 1Z0-1127-25 Questions]

Given the following code:

PromptTemplate(input_variables=["human_input", "city"], template=template)

Which statement is true about PromptTemplate in relation to input_variables?

Show Suggested Answer Hide Answer
Suggested Answer: C

Comprehensive and Detailed In-Depth Explanation=

In LangChain, PromptTemplate supports any number of input_variables (zero, one, or more), allowing flexible prompt design---Option C is correct. The example shows two, but it's not a requirement. Option A (minimum two) is false---no such limit exists. Option B (single variable) is too restrictive. Option D (no variables) contradicts its purpose---variables are optional but supported. This adaptability aids prompt engineering.

: OCI 2025 Generative AI documentation likely covers PromptTemplate under LangChain prompt design.


Contribute your Thoughts:

Vincent
29 days ago
I think the answer is C because PromptTemplate can support any number of variables, including none.
upvoted 0 times
...
Lashaunda
1 months ago
I'm not sure, but I think PromptTemplate can work with any number of variables.
upvoted 0 times
...
Vannessa
1 months ago
I disagree, I believe the answer is A.
upvoted 0 times
...
Shenika
1 months ago
I'll go with Option C. Seems like the most flexible and logical choice for a template-based system. Plus, who doesn't love a little flexibility? *winks*
upvoted 0 times
Catalina
11 days ago
User 3: Agreed, it's always good to have options when it comes to input variables.
upvoted 0 times
...
Ilda
12 days ago
User 3: Yeah, it makes the template system much more versatile. Good choice!
upvoted 0 times
...
Annamaria
12 days ago
User 2: Yeah, having that flexibility is definitely a plus. Makes the template more versatile.
upvoted 0 times
...
Lucy
15 days ago
User 2: Agreed, having the option to support any number of variables is definitely a plus.
upvoted 0 times
...
Arletta
25 days ago
User 1: I think Option C is the best choice too. It allows for any number of variables.
upvoted 0 times
...
Shantay
1 months ago
User 1: I think Option C is the best choice too. Flexibility is key.
upvoted 0 times
...
...
Tien
1 months ago
Option D is clearly wrong. If PromptTemplate can't use any variables, what's the point of having it? *chuckles*
upvoted 0 times
...
Estrella
2 months ago
I think the answer is C.
upvoted 0 times
...
Shawna
2 months ago
I'm going with Option A. Doesn't a template need at least two variables to be useful?
upvoted 0 times
...
Pearline
2 months ago
Option C makes the most sense to me. PromptTemplate should be able to handle any number of variables, including zero.
upvoted 0 times
...

Save Cancel