Slide 16
Slide 16 text
16
Result
AIMessage(content='1. What is the capital of
France?\n a) Paris\n b) London\n c) Madrid\n d)
Rome\n\n\n2. What is the largest country in the
world by land area?\n a) China\n b) Brazil\n c)
Russia\n d) Canada\n\n\n3. Who was the first
president of the United States?\n a) George
Washington\n b) Thomas Jefferson\n c) Abraham
Lincoln\n d) Franklin D. Roosevelt\n\n\n4. What is
the chemical symbol for gold?\n a) Au\n b) Ag\n c)
Cu\n d) Fe\n\n\n5. What is the scientific name for
the common house cat?\n a) Felis domesticus\n b)
Canis lupus familiaris\n c) Bos taurus\n d) Equus
caballus\n\n\n6. What planet is known as the "Red
Planet"?\n a) Mars\n b) Jupiter\n c) Saturn\n d)
Uranus\n\n\n7. What is the name of the largest
ocean in the world?\n a) Pacific Ocean\n b)
Atlantic Ocean\n c) Indian Ocean\n d) Arctic
Ocean\n\n\n8. What is the chemical formula for
Code
from langchain_google_vertexai import ChatVertexAI
llm = ChatVertexAI(
project='plucky-agent-412507’,
model_name="gemini-pro",
convert_system_message_to_human=True,
temperature=0)
llm.invoke("ask me a quiz")
ChatPromptTemplate and StrOutputParser
If you are a teacher, you need to specify
1) subject (category)
2) textbook from which you ask questions (quiz_bank)
3) the number of quizzes and the format
(prompt_template)