OntoSight: A flexible, AI-ready visualization engine for interactive knowledge graphs and hypergraphs.
Project description
OntoSight 🔍
English | 简体中文
Interactive Visualization Engine for AI-Enhanced Knowledge Graphs & Hypergraphs
OntoSight is a lightweight yet powerful Python library designed to bridge the gap between static graph visualizations and dynamic AI-driven exploration. It allows developers to create highly interactive, searchable, and "chat-ready" visualizations for complex knowledge structures with just a few lines of code.
🌟 Key Features
- Three Visualization Types:
- Graphs (
view_graph): Traditional node-edge networks for pairwise relationships - Hypergraphs (
view_hypergraph): Multi-node relationships and complex pathways - Nodes (
view_nodes): Pure entity collections without edges - perfect for archives, semantic spaces, and clusters
- Graphs (
- AI-Ready Callbacks: Flexible
on_searchandon_chathooks to integrate with any LLM (GPT-4, Claude, Llama 3) or Vector Database (Milvus, Pinecone, Chroma). - Interactive Exploration: Built-in detail panels, filtering, and real-time highlighting.
- Framework Agnostic: Works with any data source. Define your schema using Pydantic and let OntoSight handle the rest.
- Developer First: Python-native API with automatic web-server management and browser launching.
🚀 Quick Start
Installation
pip install ontosight
📸 Visualization Modes
1. Standard Knowledge Graphs (view_graph)
Traditional node-edge networks for pairwise relationships. Best for social networks, dependency graphs, and classic KGs.
| Main View | Intelligent Search | AI Chat |
|---|---|---|
from pydantic import BaseModel
from ontosight import view_graph
class Entity(BaseModel):
name: str
type: str
nodes = [Entity(name="Alice", type="Person"), Entity(name="Wonderland", type="Place")]
edges = [{"source": "Alice", "target": "Wonderland", "label": "visits"}]
view_graph(
node_list=nodes,
edge_list=edges,
node_id_extractor=lambda n: n.name,
node_ids_in_edge_extractor=lambda e: (e["source"], e["target"])
)
2. Multi-Dimensional Hypergraphs (view_hypergraph)
Visualize relationships that connect more than two entities. Perfect for collaborative networks, chemical reactions, or complex logical pathways.
| Main View | Intelligent Search | AI Chat |
|---|---|---|
from ontosight import view_hypergraph
# A hyperedge connects multiple nodes
hyperedges = [{"id": "he1", "members": ["A", "B", "C"], "label": "Collaboration"}]
view_hypergraph(
node_list=[{"id": "A"}, {"id": "B"}, {"id": "C"}],
edge_list=hyperedges,
node_id_extractor=lambda n: n["id"],
node_ids_in_edge_extractor=lambda e: e["members"]
)
3. Entity Archives & Semantic Spaces (view_nodes)
Pure entity collections without explicit edges. Use force-clustering and semantic search to explore large-scale archives or embedding spaces.
| Main View | Intelligent Search | AI Chat |
|---|---|---|
from ontosight import view_nodes
recipes = [
{"name": "Pasta", "cuisine": "Italian"},
{"name": "Sushi", "cuisine": "Japanese"}
]
view_nodes(
node_list=recipes,
node_id_extractor=lambda r: r["name"],
node_label_extractor=lambda r: r["name"]
)
🧠 AI Integration (The "Sight" in OntoSight)
OntoSight is built for the Age of AI. While it doesn't ship with a specific LLM, it provides the "plumbing" to make your graph interactive and intelligent.
Flexible Search (Vector DB Ready)
You can define a custom search callback to perform semantic search using embedding models.
def my_vector_search(query: str):
# Logic to call your Vector DB (e.g., Milvus)
# returns matching_nodes, matching_edges
pass
view_graph(..., on_search=my_vector_search)
Chat
Connect a Chat interface directly to your Graph. When a user asks a question, the LLM can provide a textual answer, and OntoSight will auto-highlight the relevant subgraph.
def my_chat_handler(question: str):
# 1. Send question to LLM (e.g., GPT-4)
# 2. Get relevant nodes/edges from your Retrieval logic
return "Alice is in Wonderland.", (relevant_nodes, relevant_edges)
view_graph(..., on_chat=my_chat_handler)
🛠 Advanced Features
- Schema-Driven Detail Panels: Automatically generates UI panels based on your Pydantic models.
- Hypergraph Modeling: Visualize relationships between multiple nodes simultaneously.
📄 License
OntoSight is released under the Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ontosight-0.1.9.tar.gz.
File metadata
- Download URL: ontosight-0.1.9.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17e56ad10099419b84ed9ada7e227e8cfed85c4e53c4c38a6954fdbfa05b204d
|
|
| MD5 |
430a536a5ecc4ff32cdaf928e59e530c
|
|
| BLAKE2b-256 |
8be1ff0d36e695976ac82e5c79a0ffed67cb37b18e0c8538ce7e856d2d8a4ba0
|
Provenance
The following attestation bundles were made for ontosight-0.1.9.tar.gz:
Publisher:
publish-pypi.yml on yifanfeng97/ontosight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ontosight-0.1.9.tar.gz -
Subject digest:
17e56ad10099419b84ed9ada7e227e8cfed85c4e53c4c38a6954fdbfa05b204d - Sigstore transparency entry: 1566184548
- Sigstore integration time:
-
Permalink:
yifanfeng97/ontosight@38202b16d2353fb668b87220dc7ff2a0fb477ebe -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/yifanfeng97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@38202b16d2353fb668b87220dc7ff2a0fb477ebe -
Trigger Event:
push
-
Statement type:
File details
Details for the file ontosight-0.1.9-py3-none-any.whl.
File metadata
- Download URL: ontosight-0.1.9-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6e5912d1a63615ca156ad7ef338e4a847803b8ea0329866c37219470f7a501b
|
|
| MD5 |
186f9e6b874fe2f3b9e0b9e636e8bdb4
|
|
| BLAKE2b-256 |
e92804b38c04398d233b1fac04ea7652c253df93f43113f5602b80a0891d863f
|
Provenance
The following attestation bundles were made for ontosight-0.1.9-py3-none-any.whl:
Publisher:
publish-pypi.yml on yifanfeng97/ontosight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ontosight-0.1.9-py3-none-any.whl -
Subject digest:
a6e5912d1a63615ca156ad7ef338e4a847803b8ea0329866c37219470f7a501b - Sigstore transparency entry: 1566184563
- Sigstore integration time:
-
Permalink:
yifanfeng97/ontosight@38202b16d2353fb668b87220dc7ff2a0fb477ebe -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/yifanfeng97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@38202b16d2353fb668b87220dc7ff2a0fb477ebe -
Trigger Event:
push
-
Statement type: