Schemas
Schemas (테스트 데이터 구조)
테스트셋과 테스트 샘플 생성을 위한 스키마에 대한 API 문서예요. Testset, QueryLength, QueryStyle, BaseScenario, 그리고 단일·다중 홉 질문 합성기를 확인할 수 있어요.
출처: 문서
본문
Testset(samples: List[TestsetSample], run_id: str = (lambda: str(uuid4()))(), cost_cb: Optional[CostCallbackHandler] = None)
QueryLength
Bases: str, Enum
Enumeration of query lengths. Available options are: LONG, MEDIUM, SHORT
QueryStyle
Bases: str, Enum
Enumeration of query styles. Available options are: MISSPELLED, PERFECT_GRAMMAR, POOR_GRAMMAR, WEB_SEARCH_LIKE
BaseScenario
Bases: BaseModel
Base class for representing a scenario for generating test samples.
Attributes:
| Name | Type | Description |
|---|---|---|
nodes |
List[Node] |
List of nodes involved in the scenario. |
style |
QueryStyle |
The style of the query. |
length |
QueryLength |
The length of the query. |
persona |
Persona |
A persona associated with the scenario. |
SingleHopSpecificQuerySynthesizer(name: str = 'single_hop_specific_query_synthesizer', llm: Union[BaseRagasLLM, 'InstructorBaseRagasLLM'] = _default_llm_factory(), llm_context: Optional[str] = None, generate_query_reference_prompt: PydanticPrompt = QueryAnswerGenerationPrompt(), theme_persona_matching_prompt: PydanticPrompt = ThemesPersonasMatchingPrompt(), property_name: str = 'entities')
MultiHopSpecificQuerySynthesizer(name: str = 'multi_hop_specific_query_synthesizer', llm: Union[BaseRagasLLM, 'InstructorBaseRagasLLM'] = _default_llm_factory(), llm_context: Optional[str] = None, generate_query_reference_prompt: PydanticPrompt = QueryAnswerGenerationPrompt(), property_name: str = 'entities', relation_type: str = 'entities_overlap', relation_overlap_property: str = 'overlapped_items', theme_persona_matching_prompt: PydanticPrompt = ThemesPersonasMatchingPrompt())