knowledge graph from GPT

Report Abuse

Basic Information

This repository implements a Python wrapper that builds a human-interpretable knowledge graph as an external memory module for language models with the long-term goal of agent-like capabilities. It is designed to collect information through a text interface, convert facts into compact flashcard style question and answer pairs, extract hierarchical concept representations for each fact, and store those representations as natural language based vector embeddings. The system aims to enable a language model to access relevant subsets of stored knowledge, identify gaps or inconsistencies, and propose further questions to improve its memory. Targeted uses described include database generation and parsing, question answering over a structured knowledge base, a personal spaced repetition learning assistant, and hypothesis generation for research. The README emphasizes interpretability and observability of which memories are accessed and why, and notes a user interface for interactive exploration and saving of knowledge.

Links

App Details

Features
The project extracts concept hierarchies from question answer pairs and creates natural language embeddings where embedding dimensions are labeled concepts rather than opaque axes. It computes concept connection strengths and refines these into final concept embeddings using local graph structure and statistical significance measures. Card embeddings are constructed as weighted sums of concept embeddings with prevalence-based penalties. The repository includes a similarity metric and a custom clustering pipeline that forms hierarchical clusters of cards, a question embedding and retrieval pipeline to gather relevant cards for answer generation, a basic question generation demonstration using few shot examples, and an interactive user interface for generating, refining, answering, and saving questions and answers into the graph. The README documents interpretability, observability, and future agent oriented extensions.
Use Cases
The system provides a structured external memory that addresses shortfalls of language models such as lack of long term memory and difficulty producing enforceable structured responses. By storing facts as interpretable concept embeddings and clustering related items, it makes retrieval and inspection of supporting evidence transparent which aids interpretability and debugging. It supports improved question answering by extracting question embeddings, retrieving similar cards, and re-prompting a language model with curated context. For learners it outlines a path toward spaced repetition and personalized study by tracking knowledge structure and memory probability. For researchers it proposes hypothesis generation by leveraging clusters of related questions. The framework also lays groundwork for recursive self improvement and agent like exploration driven by reinforcement learning and value estimation.

Please fill the required fields*