Q: 6
Given the following code:
PromptTemplate(input_variables=["human_input", "city"], template=template)
Which statement is true about PromptTemplate in relation to input_variables?
Options
Discussion
C , since PromptTemplate doesn't need two variables. The example's just a sample, but you can use zero or one as well.
Pretty confident it's C. PromptTemplate doesn't care how many variables you give-could be zero, one, or several, as long as the template matches. I've always just listed whatever placeholders I needed. Corrections welcome if Oracle changed something!
I'm sticking with A for now. The example uses two variables, so I figured that's the requirement. Not 100% on this though.
Yeah, I'd still go with A here.
Anyone else think A makes sense? I assumed PromptTemplate needs at least two variables based on the input list in the example. Maybe I'm mixing up with other frameworks but the single or zero variable cases don't feel right to me.
Practice test matched this as C, but I'd skim the Oracle docs before final review.
Not B, C. Saw similar on practice exam, double check official docs to be sure.
Be respectful. No spam.