{"record":{"id":"93138fc52740cac1","repo":"HKUDS/DeepTutor","slug":"analysisagent-prompts-are-not-configured","errorCode":null,"errorMessage":"AnalysisAgent prompts are not configured.","messagePattern":"AnalysisAgent prompts are not configured\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/agents/visualize/agents/analysis_agent.py","lineNumber":64,"sourceCode":"                data_description=\"\",\n                chart_type=\"\",\n                visual_elements=[],\n                rationale=f\"User selected {render_mode} explicitly.\",\n            )\n\n        if render_mode in (\"svg\", \"chartjs\", \"mermaid\", \"html\"):\n            system_prompt = self.get_prompt(\"system_fixed\")\n            user_template = self.get_prompt(\"user_template_fixed\")\n        elif render_mode == \"figure\":\n            # Constrained-auto mode: LLM picks one of svg/chartjs/mermaid\n            # (html is excluded). Used by the Book figure block.\n            system_prompt = self.get_prompt(\"system_figure\")\n            user_template = self.get_prompt(\"user_template_figure\")\n        else:\n            system_prompt = self.get_prompt(\"system\")\n            user_template = self.get_prompt(\"user_template\")\n        if not system_prompt or not user_template:\n            raise ValueError(\"AnalysisAgent prompts are not configured.\")\n\n        format_kwargs: dict[str, str] = {\n            \"user_input\": user_input.strip(),\n            \"history_context\": history_context.strip() or \"(none)\",\n        }\n        if render_mode in (\"svg\", \"chartjs\", \"mermaid\", \"html\"):\n            format_kwargs[\"render_type\"] = render_mode\n\n        user_prompt = user_template.format(**format_kwargs)\n\n        # Blocking rather than streamed: nothing consumes the partial JSON, and\n        # a reasoning model's <think> prelude never reaches the parser this way.\n        raw = await self.call_llm(\n            user_prompt=user_prompt,\n            system_prompt=system_prompt,\n            response_format={\"type\": \"json_object\"},\n            stage=\"analyzing\",\n            attachments=attachments,","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/agents/visualize/agents/analysis_agent.py#L46-L82","documentation":"Error \"AnalysisAgent prompts are not configured.\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/agents/visualize/agents/analysis_agent.py:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}