Skip to content

Prompts

SpecificQuery

SpecificQuery(
    name: Optional[str] = None,
    language: str = "english",
    original_hash: Optional[str] = None,
)

Bases: PydanticPrompt[SpecificQuestionInput, StringIO]

Source code in src/ragas/prompt/base.py
def __init__(
    self,
    name: t.Optional[str] = None,
    language: str = "english",
    original_hash: t.Optional[str] = None,
):
    if name is None:
        self.name = camel_to_snake(self.__class__.__name__)

    _check_if_language_is_supported(language)
    self.language = language
    self.original_hash = original_hash

instruction class-attribute instance-attribute

instruction = "Given the title of a text and a text chunk, along with a keyphrase from the chunk, generate a specific question related to the keyphrase.\n\n"
  1. Read the title and the text chunk.