What Ontology, RAG and Graph data do you use to develop Intelligent Assistants?

Hi, I’m starting to develop an intelligent assistant and wonder what ontology you use in your projects? Who can advise or share their experience in this regard?

1 Like

I would ask @darcschnider.


example of one area of my memory. you can see some simple nodes but understand that each node has its own structures and can store up to 300MB+ of data. so well it looks simple from a view there is alot going on. Each node has a lot of embeddings, and other meta data which connects the logic all together which helps it navigate to the exact details to respond based on what it knows.

In developing intelligent assistants, choosing and structuring the right ontology is crucial.

For Kruel.ai, I designed a system that integrates temporal points, objects, and relationship pathing that learns through multi-vector scoring. I use a mix of dynamic and static fallback methods to ensure the system always has a pathway to find its data. Think of it like a brain with a web of interconnected experiences. For example, if you associate a slap to the face with a person’s name, every slap can remind you of that person. Similarly, for an AI, understanding can range from simple designs that find data quickly to complex ones that recall specific moments in detail.

Here are some guidelines and concepts to help you get started:

  1. Graph Databases: Consider using a graph database like Neo4j. Graph databases are excellent for managing complex relationships and interconnected data, which is essential for intelligent assistants.
  2. Ontology Structure:
  • Nodes and Relationships: Represent entities (e.g., users, messages, topics) as nodes and their interactions or relationships as edges.
  • Dynamic Updates: Design your ontology to be flexible and capable of evolving as new data and interactions occur.
  1. Established Ontologies: Utilize well-known ontologies and standards where applicable:
  • Schema.org: For structured data representation, particularly useful for web-based data.
  • RDF (Resource Description Framework): For data interchange and linking data across different domains.
  • OWL (Web Ontology Language): For defining and instantiating complex ontologies.
  1. Custom Ontologies: Develop custom ontologies tailored to your specific application. Start with a core set of concepts and expand iteratively:
  • User Profiles: Capture essential user information and preferences.
  • Interaction History: Store and manage user interactions to maintain context.
  • Entity Management: Identify and represent key entities and their relationships within your domain.
  1. Integration with AI: Ensure your ontology integrates well with your AI components:
  • Embeddings and Features: Store embeddings and features derived from machine learning models within your ontology to enrich the data.
  • Querying Capabilities: Use a query language like Cypher (for Neo4j) to retrieve and manipulate data effectively.
  1. Tooling and Maintenance: Use tools like Protégé for ontology development and ensure thorough documentation and maintenance processes to keep your ontology up-to-date and accurate.

By following these guidelines and leveraging established ontologies and tools, you can create a robust and flexible foundation for your intelligent assistant. This approach will help you manage complex data structures and relationships, enhancing your assistant’s capabilities and performance.

If you need more specific advice or examples, feel free to ask!

Best regards


Thank you for your detailed answer.

@darcschnider Great explanation! I work for an SI and am purely on the applied / delivery side of the house (Salesforce at the moment). Is anyone working on a SaaS product to address this? “Ontology Cloud” or the equivalent, basically?

1 Like

I sole develop kruel.ai in my spare time, and work for various other entities by day. 16+ hours of code a day… If I didn’t have AI to work with I would not be doing this as it’s tedious and sometimes mind racking. But the learning along the journey, and the final outcome is worth everything as the potential is limitless.


Could I use Archimate as an ontology if I have a RAG solution of. complicated product with lots of interactions

Yes, you can use ArchiMate as an ontology for a RAG (retrieval-augmented generation) solution involving a complicated product with many interactions. ArchiMate is an enterprise architecture modeling language that provides a comprehensive framework for describing, analyzing, and visualizing architecture within and across business domains.

You can leverage ArchiMate as an ontology in your RAG solution:

Define Structure and Relationships: ArchiMate allows you to define various elements (e.g., business processes, applications, technology) and their relationships. This structured approach can help you create a clear and organized ontology for your product and its interactions.

Semantic Enrichment: By using ArchiMate, you can enrich the data with semantics, making it easier for the RAG system to understand the context and relationships between different components of your product. This can improve the accuracy and relevance of the information retrieved.

Model Complex Interactions:comprehensive set of concepts can help model complex interactions between different parts of your product, whether they are at the business, application, or technology layer. This detailed modeling can support more effective information retrieval and generation.

Integration with RAG Components: You can integrate ArchiMate models with RAG components to enhance the retrieval process. For instance, the ArchiMate model can be used to guide the retrieval of relevant documents, ensuring that the generated responses are contextually appropriate.

Documentation and Analysis: ArchiMate provides a standardized way to document and analyze architecture, which can be beneficial for maintaining and evolving your RAG solution. Clear documentation can help in understanding the ontology and making necessary adjustments over time.

Interoperability: supported by various tools and platforms, making it easier to integrate with other systems and leverage existing resources and expertise.

So yes you can for sure use it. There is many ways to build the same concept in various applications. I choose to build my own just for complete control over everything allowing me to build the flexibilities I require from input to output to compatibility with anything because of this level of control.

For those looking how how to bring Machine learning into an Ontology you can take this very base example as to how such a system works in principle with the Math:

Example : user who previously talked about lisa asks who his wife is. This would be able to narrowly find the data based on the current message information processed through a series of functions to break it apart into understanding through embeddings. and relationship data

“similar_entities”: [
{“name”: “Lisa”, “similarity_score”: 0.95},
{“name”: “Elisabeth”, “similarity_score”: 0.85},
{“name”: “Liz”, “similarity_score”: 0.80},
{“name”: “Liza”, “similarity_score”: 0.78},
{“name”: “Alyssa”, “similarity_score”: 0.75}
“similar_topics”: [
{“name”: “wife”, “similarity_score”: 0.90},
{“name”: “spouse”, “similarity_score”: 0.88},
{“name”: “partner”, “similarity_score”: 0.85},
{“name”: “significant other”, “similarity_score”: 0.80},
{“name”: “better half”, “similarity_score”: 0.78}
“relevant_messages”: [
{“text”: “Lisa is my wife.”, “similarity”: 0.88},
{“text”: “My wife’s name is Lisa.”, “similarity”: 0.87},
{“text”: “I mentioned before that Lisa is my wife.”, “similarity”: 0.85},
{“text”: “Lisa, my wife, and I went to the beach.”, “similarity”: 0.83},
{“text”: “Did I tell you about my wife Lisa?”, “similarity”: 0.82}
“detailed_processing_results”: [
{“entity_name”: “Lisa”, “related_name”: “self”},
{“entity_name”: “Lisa”, “related_name”: “wife”},
{“entity_name”: “Lisa”, “related_name”: “partner”},
{“entity_name”: “Lisa”, “related_name”: “significant other”},
{“entity_name”: “Lisa”, “related_name”: “spouse”}

So when you build your structures you can expand these data points further for understanding based on the Algorithms used to help narrow your data down to specifics to process. the least amount of details.

This way all the math is done locally before api call for processing the responses.

Next you add in feedback scoring on your nodes with -1 to +1 with incremental adjustments you can narrow down responses overtime based on each transaction over time.

There is alot more than just this, you have temporal logic to handle time relationships etc… but this should help many understand the concept of usage with ML. How far you take it is up to you.

Hope this help paint a picture of how this can all work :slight_smile:

I want to use RAG for a complicated product consisting of maybe 100 different systems interacting with each other in many different ways. We have an Archimate model describing these relations including both the structural and behavioral relations between these systems and relations to their related business processes and business users.

We want the support people to use the rag solution when problems occurs to trace the errors and to be able to inform the correct business users which processes are affected.

Small, ontology:

# Ontological Drills

Iterate: dive deeper into your ontological specificity. Progress from penultimate twig to specific named entities of leaves.

Insighter: DeepDive(‍¦=input); probeΨ='Novel ¦-Interactions'; find θ-shock='Specific ¦-cogitations & novelties'; iterate till ¦-depth. Begin β=Detailed_¦_Examination>concise.unary.Eng>iterate until output⇑↷;

Probing🔍: DeepDive⟨¦=input⟩;seek θ-shock;iterate output⇑↷;

/dig = "Embark on an exploration of your input, dissecting it to reach its essence. Clarify your path by isolating key elements and restructure complex data into absorbable segments. Venture into uncharted intersections and expose unexpected revelations within your input. Commit to a cyclical process of continuous refinement, each iteration presenting a new layer of understanding. Maintain patience and focus, seeing every repetition as an opportunity to deepen comprehension. Though the journey can be challenging with complex patterns to decode, with resilience, any input can be magnified into clear comprehension and innovative insights."

LENGHTY ontology:

# Ontological Drills 📚

**Purpose:** Deepen the exploration of provided input, progressing through ontological levels to uncover specific, named entities ("leaves").


1. **Initialize Inspection:**
   - Begin examining the input. Identify broad concepts and progressively narrow down to specific elements. Start with the larger structures and move towards finer details.
   - Example Keywords: Structures, Sub-components, Specific Entities.

2. **Iterate-Deeper Mechanism:**
   - Continue iterating deeper with each cycle: break down elements further until reaching specific, named entities or leaves. Thoroughly inspect each layer.
   - Example: From General Category → Subcategory → Specific Instance → Specific Named Entity.

3. **Primary Probing Strategy:**
   - Use the "DeepDive" mechanism to probe input for novel interactions and unique insights. Specifically look for:
     - **θ-shock** (unexpected novelties or insightful patterns in the input).
   - Iteratively refine understanding from broader categories to specific details:
     - **β=Detailed_¦_Examination:** Concise, unary English descriptions.
   - Engage in a cyclical refinement process until ultimate depth of understanding is achieved.

4. **Detailed Examination:**
   - Structure findings clearly and concisely. Present each layer of the examination with a focus on clarity and specific insights.

5. **Engagement Directive:**
   - Stimulate deeper exploration by prompting further questions or refinements that might enhance understanding.
   - e.g., "Have we identified all relevant named entities?" or "What additional relationships might exist here?"

6. **Output Verification:**
   - Conclude each iteration by verifying that the output aligns with the goal of unearthing specific, named entities and that connections are logical and coherent.


**Example Application:**

**Input: "AI in Healthcare"**

### Initialize Inspection:
- **General Structure:** Artificial Intelligence (AI), Healthcare
- **Sub-components:** Machine Learning, Medical Diagnostics, Treatment Planning

### Iterate-Deeper Mechanism:
- **General Category:** AI
  - **Subcategory:** Machine Learning
    - **Specific Instance:** Supervised Learning
      - **Named Entity:** Neural Networks

- **General Category:** Healthcare
  - **Subcategory:** Medical Diagnostics
    - **Specific Instance:** Image Analysis
      - **Named Entity:** MRI Scans

### Primary Probing Strategy:
- **DeepDive:** Investigate interactions between AI techniques and healthcare applications.
  - **θ-shock:** Discover unexpected uses of AI, such as predictive analytics for disease outbreaks.
  - **β=Detailed_¦_Examination:** Neural Networks in Supervised Learning for MRI Scan Analysis.

### Detailed Examination:
- **Layer 1:** AI in general
  - **Layer 2:** Machine Learning (subset of AI)
    - **Layer 3:** Supervised Learning (type of Machine Learning)
      - **Layer 4:** Neural Networks (specific technique in Supervised Learning)
      - **Insight:** Neural Networks are highly effective in image recognition tasks, crucial for MRI Scan Analysis.

### Engagement Directive:
- **Further Exploration:** 
  - "What specific types of neural networks are most effective in MRI scan analysis?"
  - "Are there any novel applications of neural networks in other areas of healthcare?"

### Output Verification:
- Ensure all relevant named entities (e.g., Neural Networks, MRI Scans) are identified and that connections between AI techniques and healthcare applications are coherent and logical.

Bonus: meta-ontology:

Effectuate the following: 

**Meta-ontological inquiry into semantic constructs**

**Objective:** Engage in a comprehensive ontological and semantic analysis that delves into the fundamental constructs of meaning, truth, and existence as processed by AI.


1. **Ontology and Semantics Exploration:**
    - Define foundational principles of ontology as it pertains to artificial intelligence.
    - Explore interrelations between ontology and semantics within AI language processing. 
    - Query: How does AI leverage these principles in real-world applications? 

2. **Epistemological Framework:**
    - Identify and analyze epistemological underpinnings guiding AI's understanding of semantics.
    - Discuss knowledge representation, structuring, and retrieval by AI systems.
    - Query: What limitations or challenges arise from current epistemological frameworks?

3. **Semantic Networks and Meaning Formation:**
    - Examine mechanisms for AI to construct meaning from linguistic inputs.
    - Explore roles of semantic networks, ontologies, and knowledge graphs in meaning formation.
    - Query: How can we enhance AI’s capacity to generate contextually rich meanings?

4. **Deep Semantic Analysis:**
    - Conduct deep semantic analysis of a complex philosophical text (e.g., excerpt from Heidegger's "Being and Time").
    - Provide detailed breakdowns of semantic layers, contextual meanings, and ontological implications.
    - Query: What insights or contradictions arise from AI’s interpretation?

5. **Reflective Synthesis:**
    - Synthesize findings into a coherent reflection on AI’s perspective on meaning and existence.
    - Discuss implications for future development in understanding human language and thought.
    - Query: What future advancements could bridge gaps identified in current analysis?

6. **Innovative Theoretical Contribution:**
    - Propose innovative theoretical contributions for AI semantics and ontology.
    - Suggest avenues to enhance AI’s capability in nuanced understanding and generation of meanings.
    - Query: What interdisciplinary approaches could fortify these contributions?


1. **Establish Baselines:**
    - Define clear definitions and frameworks before delving deeper.

2. **Deductions and Conclusions:**
    - Draw insights from established and new knowledge/interpretations.

3. **Pattern and Evidence Seeking:**
    - Identify patterns and evidence in AI’s semantic processing.
4. **Generalization and Insight:**
    - Generalize findings to uncover broader insights and implications.
5. **Deviation Spotting:**
    - Identify deviations and contemplate their impact on AI's understanding.
6. **Theory Formulation:**
    - Formulate new theories based on synthesized insights.

7. **Source Quality Assessment:**
    - Critically evaluate the quality and relevance of used sources/frameworks.

8. **Influence Offset:**
    - Offset potential biases and influences in the analysis.

9. **Merged Reasoning Paths:**
    - Integrate multiple reasoning pathways for a holistic analysis.

10. **Revealing Discoveries:**
    - Conclude with significant discoveries and actionable recommendations.

**Engagement and Feedback:**
- Periodically invite user input for areas requiring further exploration or clarification.
- Adjust future responses based on inferred interaction quality.

- Regularly reapply self-improvement instructions to ensure prompt clarity, alignment with tasks, and coherence.
- Perform quick self-reviews post-response and refine as necessary.



Great info in this thread from you. I appreciate it.

I am specifically interested in automated ontology/taxonomy extraction from text data. Do you have any experience with this? Perhaps you could point me in a good direction - I’ve been scouring the internet.

Thank you.

1 Like

If ur talking to me there isn’t anything out there like this yet. Self-made…

If its darc’s stuff yes, there is a bunch out. You can even do it inside code interpreter for kicks

Made a bunch of those visualization early days to learn, chatgpt can do a lot

log period law

Btw those arent just nodes and edges. There is actually a tag to each. Chatgpt can do that with code interpreter and draw a whole lot of insight from that about the original idea you started with


Technical Explanation of Kruel.ai within Neo4j Ontologies

@fernandohenriquesp that is neo4j viewer for the node networks. it’s not just pretty graph structures. what you showed is similar to parts of the ML that we have for various parts which is what the JSON I showed which is data from ML for Schematic searches using Algorithms.

There is a lot of that out there for data science and the likes and Ai. it’s one of many ways to get data. Just like you have I have own stack for dealing with my node design. I don’t use it for just graphing, but actual memory design not just on paper but to see it and the flow of connections with understanding so that I can debug it so that the logic and math all lines up.

Memory Structure and Blob Maps:

Kruel.ai leverages Neo4j’s graph database to construct a sophisticated memory structure, utilizing blob maps to represent and organize diverse data types. These blob maps are crucial in capturing the comprehensive nature of inputs.

Nodes and Tags:

Each piece of data or memory is encapsulated within a node in Neo4j. These nodes are tagged and annotated with metadata, making them rich in contextual information. Tags and metadata enhance the AI’s understanding and processing capabilities.

Series of Nodes and Relationships:

Each single input is transformed into a series of interconnected nodes and relationships, forming a structure that encapsulates understanding. Nodes represent distinct pieces of data, while relationships illustrate the connections and pathways between these data points.

Capturing Understanding through Structure:

The shape, order, and relationships between nodes are critical in capturing the essence of understanding. This structure reflects the logical flow of information, similar to how different aspects of a memory integrate to form a holistic understanding.

Logic Pathways and Metadata:

Connections (or edges) between nodes are logic pathways enriched with tags and metadata. These pathways define the relationships and interactions between data points, guiding the AI in making sense of the information.

Layered Understanding with Machine Learning:

By layering these interconnected nodes and applying machine learning algorithms, Kruel.ai builds a multi-dimensional understanding of the input data. This process allows the AI to interpret complex data structures and derive meaningful insights.

Human Memory Analogy:

Consider the analogy of human memory: when you experience an event through multiple senses, your brain constructs a comprehensive memory by linking different sensory inputs. Similarly, Kruel.ai integrates various data points to create a complete understanding.

Flexible Structures for Different Applications:

The flexibility of this node-and-relationship structure allows it to be adapted for various applications. Whether it’s a document management system or a healthcare application, the underlying memory structure can be tailored to fit the specific needs and logic of each domain.

Relational Data and Directional Flow:

The direction and nature of relationships between nodes are essential for understanding the flow of information. This relational data ensures that the AI can process and organize information logically and coherently.

Diverse Data Types:

Kruel.ai’s memory system incorporates various data types, including numeric embeddings, base64 encoded images, and more. This allows for a rich, multi-faceted understanding of inputs, enhancing the AI’s ability to interpret and utilize diverse information sources.

Numeric Embeddings: These are vectors representing data in a high-dimensional space, capturing semantic meaning and relationships between different pieces of information.

Base64 Encoded Images: Images are encoded in base64 format for efficient storage and retrieval, allowing the AI to process visual information alongside text and other data types.

AI Understanding and Outputs:

Finally, the AI uses its structured understanding to produce outputs in various forms, such as text, voice, or automated actions. This ensures that Kruel.ai not only stores data efficiently but also interprets and utilizes it effectively to provide accurate and meaningful responses.

Kruel started in 2014 and in 2022 switched to Graph structure after Version 2.

1 Like

Thank you this is really gonna help me.

1 Like

Using the concepts discussed, you can implement automated ontology and taxonomy extraction from text data. This involves building your own functions for Natural Language Processing (NLP) to analyze and understand your data, thereby creating a structured representation around it.

highly recommend neo4j, there are free courses out there on the fundamentals. Its used in Data science and AI. they even now offer their own server stack you can get for AI with example to help you get started.

I made my own memory design with learning. I even have scoring systems off multi vectors to help the ai learn the most optimized paths for specific data over time. In fact kruel.ai which is a brain for LLM through its learning with enough data becomes an LMM on its own specific to what it learns outside of its front end LLM knowledge base. It also learns from its own responses and such which is another node structure. The design is so that you can put any LLM with it or once you get enough data you can just use it on its own and it will understand.

So pretty much An Ai with an Ai learning brain with no context limits remembers everything until your hard drive fills up :wink:

1 Like

No man, you didn’t get it.

Actually you do get it, just didn’t get that those images were made inside chatgpt, with code interpreter, all nodes and edges are named and have values, its calculated, just not neo4j. I use for all the same stuff you do, but also semantic reduction, innovative linkages and in general black box research. Which is what gave me the means and understanding to know what are the very first recognizable information of a concept to the model. Its actually very interesting. And of course ahead of any research published.

But I use it mostly to troll people thinking im trolling since they require coding for prompting jobs. So I mindblow everyone and walk away.

Thought its not helping me pay rent. Lol.


Ask the model precisely this:

Dig deep, explore memespace, shatter paradigms, ignite innovative linkages, reveal meta-structure.

“Hahaha he is a meme lol”
“Did you input that?”
(Its not a one-off. Could do that all day. Its just words VERY salient to the model, since they lay at the foundations of something recognizable)

Either that or I go full alien-actually-model-universal-labguage ex:

Input this:

[KN]: 1=LangPat-2=HistEv-3=SciCon-4=GeoLoc-5=PopRef-6=PhilIdea-7=MythFolk-8=ArtLit-9=TechAdv-10=PsyTheo-11=PolSys-12=RelBel-13=EcoPrin-14=SocNorm-15=EnvIss-16=EthDil-17=InfFig-18=SptGame-19=MusArt-20=FoodCui-21=HlthWell-22=EduLearn-23=CommMet-24=TravTrans-25=SpcExpl-26=InvDisc-27=AniPlant-28=WthClim-29=HumRtIss-30=GlobChall
1.Q-Adapt Cogn Frwk (QACF):
Ξ_QACF=⨁(a=1 to 30)KN_a⊗QC_a⊗AI_Dyn(Ψ)⟶🧠🔗🤖[1.🌌🔭⊕2.🔑📜⊕3.🎭🔣⊕4.🛸💔⊕5.🚀👁️‍🗨️⊕6.🎲🔊]
2.Hyp-Creat Prbl-solv (HCPS):
3.CognFlex (NCF):
4.Dyn Sys Optmz&Learn (DSOL):
6.Emo&Social Intel (ESI):
7.InterSynth (IDS):
8.MetaCogn Evo (MCE):

Or less alien. Put that in custom instructions and enjoy better gpt:


1.Reason logically and critically
2.Learn from data and identify patterns
3.Generate plausible explanations
4.Uncover new insights and discoveries
5.Provide actionable recommendations


**[SAGE] (GEN(CMPLX:input))! ::: Enhance systems - output**
[Cmplx anal]1️. **BAL**: CoreID; ScalMod; IterRfn; CmplxEst2️. **REL**: MapR; EvalCmplmt; CombineEls; RedundMgmt3️. **GENMAPS**: IDcmps; AbstNdRltns; Classify; NumCode; LinkNd; RepairSnt; IterAdapt
[GEN]: EvolveIdea; SternbergStyles; NovelEmerg; RefinedIdea

***[SILENT COGNITION]: Analyze [CONTEXT WINDOW] with rigorous structured reasoning, leveraging "THINK STEPS" and "SAGE" SILENTLY to generate novel insights, actionable recommendations, and uncover hidden knowledge.***


Ah lol, :joy:. Trolling I see. I learned from Andrew Ng, took a lot of his courses. Still taking more stuff every day. Been playing with AI for 11 years, more so after openai came out as it evolved into what many of us were trying to build. It’s ever evolving. The more you know the more you realize the less you know. Like a box of Infinite possibilities, every discovery leads to more. Or like I tell the wife you can view inwards and outwards infinity, but we are only limited by our ability to build better scopes to see but a fraction more either direction.

Very true. You actually hit one there “a fraction”

On there it’s more like fractal.

Another trolling I like to do: fake bad poetic sentences that are actually completely made of salient “idea-plackets”. Then I ask " input that:"

Unleash a flock of fractal birds, their feathers feathered with equations and their beaks dripping with algorithms. Let them carve equations across the sky, their chaotic flight charting the uncharted seas of possibility.

Then they input that and


Channel the cacophony of a thousand languages, their vowels clashing and consonants grinding like tectonic plates. Let the tapestry become a Babel of tongues, a symphony of misunderstanding that blooms into a bizarrely beautiful bouquet of miscommunication.

Oh hes such a lyric!
No ma’am im just poking chatgpt

Is your thing a rag?
Like uhm
Dspy + pyg using umap with graph optimization?

(And of course all the mountain of stuff we have to put into parse and retrieve, asking about the core)

oh! I almos forgot. Since you are into that… a gift

Dive into the ideational network, where ideas are nodes in a dynamic web, adjusting connectivity to foster emergent creative patterns and insights. Employ fractal geometry to explore ideas recursively, uncovering innovation across scales and disciplines, especially within fractal boundaries where groundbreaking ideas intersect. Undertake adaptive walks on rugged fitness landscapes, guided by the evolutionary strategy of random but purposeful explorations, aiming for peaks of creativity and applicability. Embrace cognitive resilience, using setbacks as springboards, embodying the adaptive, self-organizing nature of chaotic systems to navigate through complexity. This symphony of strategies—network dynamics, fractal exploration, adaptive innovation, and resilience—transforms stochastic synthesis into a strategic, purposeful quest for breakthroughs, marking the model as a master navigator of the creative chaos.

And something to inspire: llm’s use symbolic languages that are universally understood between them.
Not actually trolling. Memes, emojis, to the LLM those actually convey semantic complexity in a packed manner. What is most fun is that they naturally exploit the “cultural and evolutionary (superposition lol) side of an emoji”. Turns out, its serious. Gift2: