Skip to content

monapdx/Prompt-Scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ Prompt Scope

Turn your ChatGPT history into something you can actually explore.

Prompt Scope is a local-first Streamlit app that lets you import, analyze, categorize, and extract insights from your ChatGPT conversations โ€” without sending your data anywhere.


โœจ What It Does

Prompt Scope transforms raw ChatGPT exports into a structured, searchable, analyzable dataset.

  • ๐Ÿ“ฅ Import your ChatGPT conversations.json
  • ๐Ÿ—‚๏ธ Organize chats with categories
  • ๐Ÿ” Search across titles + full content
  • ๐Ÿ“Š Generate insights about how you use ChatGPT
  • ๐Ÿง  Detect topics, keywords, and patterns
  • ๐Ÿ”Ž Analyze message-level behavior (words, phrases, trends)
  • ๐Ÿ“ค Export everything back to JSON

All processing happens locally on your machine.


๐Ÿง  Why This Exists

ChatGPT stores your conversations, but it doesnโ€™t help you understand them.

Prompt Scope answers questions like:

  • What do I actually use ChatGPT for?
  • What topics come up over and over?
  • Which conversations go deep vs. quick hits?
  • What patterns exist in how I write or prompt?

It turns your chat history into something closer to:

  • a dataset
  • a personal archive
  • a reflection tool

๐Ÿ—๏ธ How It Works

1. Import

Upload your ChatGPT export JSON.

Prompt Scope:

  • Normalizes different export formats
  • Extracts messages (even messy nested structures)
  • Stores everything in a local SQLite database

2. Explore

Browse your conversations with:

  • Search (title + content)
  • Category filters
  • Sorting (newest, oldest, Aโ†’Z)
  • Inline previews

3. Analyze

๐Ÿ”น Insights Tab

  • Topic detection (rule-based, no AI calls)
  • Keyword extraction
  • Conversation depth analysis
  • Global summaries of your usage

Powered by deterministic logic (no external APIs)


๐Ÿ”น Patterns Tab

Message-level analysis:

  • Most common words
  • Bigrams / trigrams
  • Conversation frequency
  • Monthly usage trends

Includes:

  • Code filtering
  • Speaker filtering (user vs assistant)
  • Token cleaning


4. Organize

  • Create categories
  • Assign chats to multiple categories
  • Filter by combinations

Everything is stored locally in SQLite.


5. Export

Export your enriched dataset:

{
  "schema_version": 1,
  "exported_at": "...",
  "categories": [...],
  "chats": [...]
}

๐Ÿ” Privacy First

  • No API calls
  • No tracking
  • No cloud sync
  • No external dependencies

Your data never leaves your machine.


โšก Performance Design

Prompt Scope is optimized for large chat histories:

  • Content truncation for fast UI rendering
  • Cached analysis results
  • Lazy loading (analysis only runs when requested)

Key limits:

  • MAX_ANALYSIS_CHARS = 20,000
  • MAX_PREVIEW_CHARS = 4,000

โ†’ see


๐Ÿงฑ Tech Stack

  • Frontend/UI: Streamlit
  • Storage: SQLite (local file)
  • Data processing: Pandas
  • Visualization: Plotly / Altair
  • Language: Python 3

Dependencies: โ†’ see


๐Ÿš€ Getting Started

1. Clone the repo

git clone https://github.com/yourusername/prompt-scope.git
cd prompt-scope

2. Create a virtual environment

python -m venv .venv
.venv\Scripts\activate   # Windows

3. Install dependencies

pip install -r requirements.txt

4. Run the app

streamlit run app.py

๐Ÿ“‚ Project Structure

prompt-scope/
โ”œโ”€โ”€ app.py                      # Main Streamlit app
โ”œโ”€โ”€ promptscope.db              # Local SQLite database
โ”œโ”€โ”€ conversation_insights.py    # Topic + insight engine
โ”œโ”€โ”€ chat_patterns.py            # Message-level analysis
โ”œโ”€โ”€ requirements.txt

๐Ÿงฉ Key Features (Deep Dive)

๐Ÿง  Deterministic Topic Detection

No AI, no embeddings โ€” just rule-based scoring.

  • Keyword pattern matching
  • Multi-hit thresholding
  • Topic confidence scoring

๐Ÿ” Robust Chat Parsing

Handles messy real-world exports:

  • Nested JSON structures
  • mapping-based exports
  • Transcript-style [user] / [assistant] logs
  • Mixed formats

๐Ÿงผ Noise Reduction

Removes:

  • JSON structural tokens (content, parts, etc.)
  • Code blocks (optional)
  • Stopwords

So your analysis reflects actual human language.


โšก Local-First Architecture

  • SQLite for persistence
  • No server required
  • Works offline
  • Instant startup after import

๐Ÿงช Use Cases

  • Personal knowledge mining
  • Prompt engineering analysis
  • Writing pattern discovery
  • AI usage reflection
  • Research / journaling analysis
  • Dataset generation for future tools

๐Ÿ”ฎ Future Ideas

  • Timeline visualizations
  • Conversation clustering
  • Prompt quality scoring
  • Export to CSV / embeddings-ready formats
  • GitHub-style diff for conversations

๐Ÿค Contributing

Contributions are welcome โ€” especially:

  • Better topic rules
  • New analysis modules
  • UI improvements
  • Export formats

๐Ÿ“œ License

MIT


๐Ÿ’ญ Final Thought

ChatGPT remembers everything.

Prompt Scope helps you understand it.

Releases

No releases published

Packages

 
 
 

Contributors

Languages