You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/chains/self_consistency/prompts/hotpotqa_prompt.py

24 lines
1.1 KiB
Python

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"""Prompt for HotPotQA."""
# From https://arxiv.org/pdf/2203.11171.pdf
from langchain.prompt import Prompt
_PROMPT_TEMPLATE = """Q: Which magazine was started first Arthurs Magazine or First for Women?
A: Arthurs Magazine started in 1844. First for Women started in 1989. So Arthurs Magazine was started first.
The answer is Arthurs Magazine.
Q: The Oberoi family is part of a hotel company that has a head office in what city?
A: The Oberoi family is part of the hotel company called The Oberoi Group. The Oberoi Group has its head
office in Delhi. The answer is Delhi.
Q: What nationality was James Henry Millers wife?
A: James Henry Millers wife is June Miller. June Miller is an American. The answer is American.
Q: The Dutch-Belgian television series that "House of Anubis" was based on first aired in what year?
A: "House of Anubis" is based on the DutchBelgian television series Het Huis Anubis. Het Huis Anubis is first
aired in September 2006. The answer is 2006.
Q: {question} Reason step-by-step.
A:"""
HOTPOTQA_PROMPT = Prompt(
input_variables=["question"],
template=_PROMPT_TEMPLATE,
)