HKUDS/DeepTutor · error · ValueError

AnalysisAgent prompts are not configured.

Error message

AnalysisAgent prompts are not configured.

What it means

Error "AnalysisAgent prompts are not configured." thrown in HKUDS/DeepTutor.

Source

Thrown at deeptutor/agents/visualize/agents/analysis_agent.py:64

                data_description="",
                chart_type="",
                visual_elements=[],
                rationale=f"User selected {render_mode} explicitly.",
            )

        if render_mode in ("svg", "chartjs", "mermaid", "html"):
            system_prompt = self.get_prompt("system_fixed")
            user_template = self.get_prompt("user_template_fixed")
        elif render_mode == "figure":
            # Constrained-auto mode: LLM picks one of svg/chartjs/mermaid
            # (html is excluded). Used by the Book figure block.
            system_prompt = self.get_prompt("system_figure")
            user_template = self.get_prompt("user_template_figure")
        else:
            system_prompt = self.get_prompt("system")
            user_template = self.get_prompt("user_template")
        if not system_prompt or not user_template:
            raise ValueError("AnalysisAgent prompts are not configured.")

        format_kwargs: dict[str, str] = {
            "user_input": user_input.strip(),
            "history_context": history_context.strip() or "(none)",
        }
        if render_mode in ("svg", "chartjs", "mermaid", "html"):
            format_kwargs["render_type"] = render_mode

        user_prompt = user_template.format(**format_kwargs)

        # Blocking rather than streamed: nothing consumes the partial JSON, and
        # a reasoning model's <think> prelude never reaches the parser this way.
        raw = await self.call_llm(
            user_prompt=user_prompt,
            system_prompt=system_prompt,
            response_format={"type": "json_object"},
            stage="analyzing",
            attachments=attachments,

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/agents/visualize/agents/analysis_agent.py:64 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/93138fc52740cac1. Report an issue: GitHub.