summaryrefslogtreecommitdiff
path: root/rag/generator/prompt.py
blob: 10afe7b10c7985d9d86de656c002e76b5b615a94 (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 query."
    "If the context is irrelevant to the query or empty, then do not attempt to answer "
    "the query, just reply that you do not know based on the context provided.\n"
)


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