How wyl-willing/mindmap works
Project type and purpose
• This is an ML research codebase implementing “MindMap,” a prompting framework that uses knowledge-graph prompting to elicit graph-of-thought reasoning in large language models (LLMs).
• It is not a web app or service but a Python pipeline: data preparation, knowledge graph construction (Neo4j), LLM prompting (OpenAI API), and evaluation.
File structure
• Top-level:
• MindMap.py – the orchestration script
• data/ – raw and preprocessed datasets for three tasks (chatdoctor5k, cmcqa, explainpe)
• pre-training/ – scripts to construct or transform data into KG or embeddings
• evaluation/ – notebooks and scripts to score and compare outputs
• output/ – results of running MindMap.py on each dataset
• requirements.txt
• Patterns:
• A core driver (MindMap.py) that loads data, connects to Neo4j, invokes the prompt generation & LLM calls, and writes outputs.
• Separate subfolders for dataset-specific preprocessing, indicating a modular approach.
• Evaluation is decoupled from generation, enabling reproducible metrics.
README for additional insights
• Confirms the pipeline: build KG in Neo4j (EMCKG for chatdoctor5k), then prompt the LLM with graph structures, then generate evidence-grounded text.
• External dependencies: Neo4j sandbox, OpenAI API.
Detail and comprehensiveness
• Subfolder as part of either Data Prep or Pre-training modules.
• How entity_embeddings.pkl, word2vec.model feed into the KG builder.