data_juicer.ops.mapper.dialog_quality_llm_base module#
Internal base classes for dialog/agent turn- and trace-quality LLM mappers.
Each concrete mapper performs one API call per sample and writes
meta[META_KEY] with score (1–5), reason, and eval_kind.
Inputs are composable: set history_key / query_key / response_key
or text_key to match your dataset. After agent_dialog_normalize_mapper,
dialog_history[-1] matches query/response; build_dialog_turn_eval_user_content
deduplicates so that final turn is not repeated under both “Earlier turns” and
“Current” (which previously biased non-repetition and topic-shift judges).
Override rubrics by subclassing or forking the mapper; rubric text stays English-friendly.
Pass preferred_output_lang="zh" (YAML) so JSON reason and instructions use Chinese;
"en" keeps English (default).