mind_map_prompt.py


Overview

This file, mind_map_prompt.py, defines a single constant string variable MIND_MAP_EXTRACTION_PROMPT which serves as a pre-formulated prompt template for a text processing task. The prompt is designed for use with a natural language processing (NLP) model or AI system tasked with summarizing arbitrary text into a structured mind map format.

The prompt instructs the AI to:

This file is likely a utility or configuration resource used by the larger InfiniFlow system to guide AI-powered text summarization and visualization workflows.


Components

Constant: MIND_MAP_EXTRACTION_PROMPT

Description

MIND_MAP_EXTRACTION_PROMPT is a multi-line string containing detailed instructions and formatting rules for generating a mind map from a given piece of text. It is designed to be formatted with an input_text placeholder where the actual text to be processed is inserted.

Content Breakdown

Usage Example

from mind_map_prompt import MIND_MAP_EXTRACTION_PROMPT

input_text = "The solar system consists of the Sun and the objects bound to it by gravity..."
prompt = MIND_MAP_EXTRACTION_PROMPT.format(input_text=input_text)

# `prompt` can then be sent to a language model API for processing.
result = language_model.generate(prompt)
print(result)

Implementation Details


Integration and Interaction


Visual Diagram

The following Mermaid class diagram illustrates the structure and role of the mind_map_prompt.py file within the system:

classDiagram
    class mind_map_prompt.py {
        +MIND_MAP_EXTRACTION_PROMPT: str
    }
    mind_map_prompt.py ..> "AI Language Model" : provides prompt to
    "AI Language Model" --> "Mind Map Output" : generates structured Markdown mind map
    "Mind Map Output" --> "Visualization Module" : consumed by

Summary

This file is a concise but critical resource in the InfiniFlow ecosystem, providing a reusable, well-defined prompt to enable consistent extraction of mind maps from arbitrary text inputs via AI models. It encapsulates best practices and detailed instructions for hierarchical text summarization, ensuring that downstream components receive well-structured, language-consistent, Markdown-formatted mind maps ready for visualization or further processing.