fabricatio_rag.models.qa

Models defined in fabricatio-rag.

Classes

QAPair

A question-answer pair where the answer is grounded in source text.

EnrichmentResult

Container holding all question-answer pairs generated for one text chunk.

Module Contents

class fabricatio_rag.models.qa.QAPair(/, **data: Any)

Bases: fabricatio_core.models.generic.SketchedAble

A question-answer pair where the answer is grounded in source text.

question: str

The question that can be answered by the source text passage below.

answer: str

The source text passage that provides the answer to the question above.

class fabricatio_rag.models.qa.EnrichmentResult(/, **data: Any)

Bases: fabricatio_core.models.generic.SketchedAble

Container holding all question-answer pairs generated for one text chunk.

qa_pairs: List[QAPair]

Question-answer pairs generated by enriching a single text chunk.