summaryrefslogtreecommitdiff
path: root/rag/generator/prompt.py
blob: fa007dba7a786f7262d21df234e1293b845bb39a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from dataclasses import dataclass
from typing import List

from rag.retriever.vector import Document

ANSWER_INSTRUCTION = (
    "Given the context information and not prior knowledge, answer the question."
    "If the context is irrelevant to the question, answer that you do not know "
    "the answer to the question given the context and stop.\n"
)


@dataclass
class Prompt:
    query: str
    documents: List[Document]