Skip to content

RiccardoBarb/MindMaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠🗺️ MindMaps

A personal self-reflection tool powered by LLMs, inspired by narrative-based approaches to self-exploration in psychology.

The user starts by writing a free-form personal narrative. From there, the system identifies themes to explore and generates Socratic questions designed to prompt deeper reflection. Keywords act as cognitive scaffolding to help the user engage with questions that might otherwise feel hard to answer. At the end of a session, the system produces a summary grounded in the user's own words.


How it works

  1. Narrative — the user writes a free-form personal narrative
  2. Themes — the LLM identifies themes to explore; the user can also add their own
  3. Questions — for each theme, Socratic questions are generated to guide reflection
  4. Keywords — optional hints to help the user respond to each question
  5. Summary — at the end of the session, a narrative summary is generated from the user's answers

Stack

  • Python, Streamlit
  • Anthropic API (Claude)
  • SQLite (user data and session persistence)
  • YAML-based configuration and prompt management

Project structure

app.py                  # entry point
cfg.yml                 # model, db and session settings
prompts.yml             # all system and user prompts
src/
  workflow.py           # LLM workflow orchestration
  db.py                 # database management
  pages/
    user_info.py        # login and registration
    narrative_and_themes_navigation.py
    questions_answers.py
    conclusion.py
  utils/
    llm.py              # Anthropic API wrapper
    parsing.py          # XML response parsing
    formatting.py       # Q&A history formatting

Create a .env file in the root directory:

API_KEY=your_anthropic_api_key

Run the app:

streamlit run app.py

Configuration

All settings are managed in cfg.yml:

llm:
  model: claude-sonnet-4-20250514
  temperature: 0.1
  max_tokens: 1024

settings:
  language: italian   # language for LLM responses
  n_themes: 5
  n_questions: 3
  n_keywords: 3

Status

Work in progress. The current version is a functional demo. The longer-term idea lives in the data layer: what gets collected across sessions, how it evolves over time, and how it can be visualized to support self-understanding.


Inspiration

This project is inspired by ExploreSelf, a research project by NAVER AI Lab exploring LLM-driven Socratic dialogue for self-reflection and personal growth.

About

Self reflection and journaling tool powered by LLM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages