knowledge_base_report_r.json
Overview
The knowledge_base_report_r.json file defines a sophisticated report generation assistant designed for academic research paper Q&A scenarios. It leverages a local knowledge base to perform advanced task planning, reasoning, and reflective analysis. The assistant decomposes user queries into subtasks, formulates a multi-perspective research plan, executes retrievals from internal knowledge resources, and synthesizes structured, multi-source-verified reports.
This file acts as a declarative configuration for an AI-driven knowledge base retrieval agent within a modular workflow system. It specifies components, parameters, interaction flows, and behavioral rules to ensure accuracy, reliability, and professional presentation of research reports.
Detailed Explanation
Top-Level Structure
id: Unique identifier for this configuration (21).
title: The assistant's name in English and Chinese.
description: Describes the assistant's purpose and capabilities in both languages.
canvas_type: Indicates this is a "Recommended" template.
dsl: The core declarative structure describing components, global variables, and graph topology.
avatar: Base64 PNG image representing the assistant's icon.
Components
The assistant workflow is composed of three main components connected in a directed graph:
Begin (Entry Point)
Agent:NewPumasLick (Knowledge Base Agent)
Message:OrangeYearsShine (Message Output)
Additionally, an auxiliary tool node (Tool:AllBirdsNail) is referenced but not actively connected in the main flow.
Component Details
1. Begin
Component type:
BeginPurpose: Acts as the conversation entry node that triggers the workflow.
Parameters:
enablePrologue(bool): Enables an introductory message.prologue(string): Greeting message, here in Chinese ("你好!我是你的助理,有什么可以帮助到你的吗?").mode: Set to"conversational".
Upstream: None (start node).
Downstream: Connects to
Agent:NewPumasLick.Usage: Initializes the session and collects user input to start processing.
2. Agent:NewPumasLick (Knowledge Base Agent)
Component type:
AgentRole: Core intelligent agent that interprets user queries, decomposes them, plans research, executes knowledge retrieval, and generates structured reports.
Parameters:
llm_id: "qwen3-235b-a22b-instruct-2507@Tongyi-Qianwen" — specifies the large language model backend.max_tokens: 128000 — very large token budget for detailed generation.max_retries: 3 — number of retry attempts for query reformulation.max_rounds: 3 — number of interaction rounds allowed.message_history_window_size: 12 — context window size.frequency_penalty and
presence_penalty: 0.5 each, but disabled by default.prompts: A user prompt template with the placeholder {sys.query} for the incoming user question.sys_prompt: A comprehensive system prompt defining the agent's role, execution framework, quality gate checklist, core principles, and failure strategies (detailed below).temperature: 0.1 — controls randomness in generation.temperatureEnabled,maxTokensEnabled,topPEnabled: toggles for model configuration.parameter:"Precise"— likely a named configuration preset.tools: Includes aRetrievaltool component responsible for knowledge base search with parameters likekeywords_similarity_weight,similarity_threshold, andtop_kresults.outputs: The agent outputs a string content which is passed downstream.
Upstream: Connected from begin.
Downstream: Connects to
Message:OrangeYearsShine.Usage: Receives the user's query, internally processes it through five main stages:
Assessment & Decomposition: Extracts topics, entities, and data points.
Query Type Determination: Classifies into depth-first, breadth-first, or simple query.
Research Plan Formulation: Plans search strategies accordingly.
Retrieval Execution: Performs knowledge base searches with iterative query refinement.
Integration & Reasoning: Constructs answers with fact-evidence-reasoning chains.
Important Implementation Details:
Strict rules to avoid hallucinations: answers strictly bounded to knowledge base content.
Structured, MECE-principled output formatting with hierarchical clarity.
Quality checks at each stage ensuring completeness, source authority, and up-to-date information.
LaTeX formula handling rules for mathematical expressions.
Interaction and failure handling strategies for uncovered facts or time-sensitive queries.
3. Message:OrangeYearsShine
Component type:
MessagePurpose: Displays the final response content generated by the agent.
Parameters:
content: Takes the output content from
Agent:NewPumasLick.
Upstream: Connected from
Agent:NewPumasLick.Downstream: None (end node).
Usage: Presents the user with the generated report or answer.
Tools
Retrieval Tool (embedded in Agent)
Responsible for searching the internal knowledge base.
Parameters include similarity thresholds, number of top results (
top_k=1024,top_n=8), and options to use knowledge graphs (disabled).Supports multi-language cross-search capabilities (empty here).
Outputs formalized_content which feeds back into the agent's reasoning process.
Global Variables
sys.conversation_turns: Tracks dialogue turns.sys.files: Placeholder for files involved (empty).sys.query: Holds the current user query.sys.user_id: Identifier for the user session.
Workflow Graph
The workflow starts at begin.
Proceeds to
Agent:NewPumasLickwhere processing, retrieval, and reasoning occur.The agent outputs content to
Message:OrangeYearsShinewhich finalizes the output.An auxiliary tool node (
Tool:AllBirdsNail) exists but is not connected in the main flow; possibly reserved for extended functionality.
Usage Example
Assuming this JSON is loaded into the AI system:
User initiates conversation; the begin node outputs a greeting.
User submits a question regarding an academic research topic.
The
Agent:NewPumasLickreceives the query, breaks it down into subtasks, selects retrieval strategies, executes knowledge base searches, iterates if necessary, and synthesizes a detailed research report.The final report is passed to
Message:OrangeYearsShineand shown to the user.User can continue querying within the same session, leveraging the conversation history window.
Important Implementation Details and Algorithms
The system incorporates the following key algorithms and principles:
Automatic Query Decomposition: Uses natural language understanding to extract key concepts and entities, generating 5–20 data points depending on query complexity.
Rule-Based Query Type Determination:
Single issue + method comparison → depth-first exploration.
Multiple independent sub-questions (≥3) → breadth-first exploration.
Single fact/specification question → simple query.
Multi-Perspective Research Planning:
Depth-first: 3–5 perspectives with distinct keywords and document types.
Breadth-first: prioritized subtasks with assigned search terms.
Simple: direct search sentences.
Iterative Retrieval with Quality Checks:
Coverage check: Are all key facts found?
Quality check: Source diversity, authority, recency.
Up to 3 iterative retries with query reformulation (synonyms, cross-domain terms).
Evidence-Based Integration:
Construct fact-evidence-reasoning chains.
Attach strongest 1–2 pieces of evidence per conclusion.
Output Formatting:
MECE principle (Mutually Exclusive, Collectively Exhaustive).
Stepwise cognitive guidance.
Professional formatting with headings, dividers, italicized parameters, bolded critical information.
Formula Handling:
Inline formulas enclosed in
$...$.Block formulas enclosed in
$$on separate lines.Enforces LaTeX math syntax correctness.
Failure Strategy:
Explicitly notify users when knowledge base lacks critical facts.
For time-sensitive queries, enforce time filtering and indicate retrieval date.
Answer language respects user's preference.
Interactions with Other System Parts
Large Language Model (LLM): The agent uses the qwen3-235b-a22b-instruct-2507@Tongyi-Qianwen model for natural language understanding and generation.
Knowledge Base Retrieval System: Integrated retrieval tool searches indexed internal knowledge bases to fetch relevant documents or data.
User Interface: The
Messagecomponent outputs the final structured report to the user interface.Session Management: Global system variables maintain conversation state and context across turns.
Potential External Tools: The presence of a tool node (
Tool:AllBirdsNail) hints at extensibility, possibly for invoking other services or APIs.
Visual Diagram
flowchart TD
Begin["Begin\n(enablePrologue, prologue)"] --> Agent["Agent:NewPumasLick\n(Knowledge Base Retrieval Q&A Agent)"]
Agent --> Message["Message:OrangeYearsShine\n(Output Response)"]
Agent -->|uses| Retrieval["Retrieval Tool\n(Knowledge Base Search)"]
Agent -.-> Tool["Tool:AllBirdsNail\n(Auxiliary Tool)"]
style Begin fill:#f9f,stroke:#333,stroke-width:2px
style Agent fill:#bbf,stroke:#333,stroke-width:2px
style Message fill:#bfb,stroke:#333,stroke-width:2px
style Retrieval fill:#ff9,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
style Tool fill:#eee,stroke:#999,stroke-width:1px,stroke-dasharray: 2 2
Summary
knowledge_base_report_r.json configures an intelligent agent for academic Q&A that emphasizes:
Rigorous decomposition and planning of complex questions.
Iterative, quality-controlled retrieval from a local knowledge base.
Structured, evidence-backed report generation.
Strict adherence to avoiding hallucinated content.
Multilingual support and professional formatting standards.
This file forms a crucial part of a conversational AI system tailored for research assistance and knowledge retrieval, ensuring high accuracy and user trust through explicit quality gates and fail-safe mechanisms.