diniscruz.ai / writing / Knowledge Graphs

User-Driven Semantic Persona Graphs Powered by GenAI

By Dinis Cruz and ChatGPT Deep Research · · 23 min read

PDF LinkedIn post

Contents · 8 sections
  1. Introduction
  2. Challenges of Static Questionnaires
  3. GenAI-Driven Interactive Workflow
  4. Human-in-the-Loop Feedback and Refinement
  5. Architecture and Key Building Blocks
  6. Pre-Population and External Data Integration
  7. Applications and Use Cases
  8. Benefits and Conclusion

Introduction

Modern organizations increasingly rely on knowledge graphs to model complex relationships between business entities, risks, and controls. However, building these graphs traditionally requires painstaking manual effort or static questionnaires that often miss context and fail to engage users. In the cybersecurity domain, for example, an executive might be asked to fill out a 50-question survey to map their company’s risk profile – a process that is tedious and not tailored to the individual. There is a need for a more dynamic, user-friendly approach to personalized persona graph creation, where the user actively guides and verifies the knowledge captured about their context. Recent advancements in Generative AI (GenAI) and large language models (LLMs) offer a compelling solution: an interactive system that asks adaptive questions, builds a semantic graph of the user’s domain, and continuously refines that graph with user feedback. This white paper presents a GenAI-powered, user-driven workflow for creating rich persona-based knowledge graphs on demand, leveraging open-source tools (such as OSBot and MGraph-DB) in a serverless architecture. The approach transforms a traditionally static Q&A process into an engaging dialogue – one that not only populates a graph with relevant data points but also helps the user discover insights about their own domain.

Challenges of Static Questionnaires

Traditional approaches to gathering information for a knowledge graph often involve static forms or lengthy questionnaires. These suffer from several drawbacks:

The result is often a sparse or inaccurate knowledge graph that doesn’t truly capture the nuances of the user’s context. Clearly, a more flexible and engaging method is needed to elicit 50+ data points from a user in a way that feels natural and valuable to them. This is where GenAI can make a difference, by turning the interrogation into a conversation.

GenAI-Driven Interactive Workflow

Instead of a rigid questionnaire, we propose an interactive Q&A workflow orchestrated by an LLM. The process begins with an almost empty graph – perhaps just a single node representing the persona (e.g. “Business User” or a specific role in a company). From there, the system dynamically generates questions, one at a time, adapting to the user’s responses. Each answer the user provides is parsed (with AI assistance) into structured data that expands the graph with new nodes and edges. Crucially, the next questions are informed by the growing graph, allowing a personalized path of inquiry.

For example, the first question might be high-level: “What industry is your company in?” If the user answers “healthcare,” the graph gains a node for the healthcare sector. The LLM, armed with domain knowledge, can now tailor subsequent questions to healthcare-related risks or regulations. A next question might be “How many employees do you have and how large is your IT team?” If the user’s answer mentions that they use cloud services, that detail is added as a node (or attribute) in the graph (e.g. a node for “Cloud Infrastructure”). The following question can then dive deeper into cloud security concerns. In this manner, the interview dynamically branches into topics relevant to the user’s situation – much like a conversation with a human analyst, but powered by AI logic.

Under the hood, the LLM is effectively planning a dialogue to fulfill certain objectives (the “data points” needed). Rather than a predetermined list of 50 questions, we give the LLM a list of information targets and allow it to decide what to ask and in what order. This yields a personalized questionnaire that feels context-aware. If a user’s answer already contains several data points, the system recognizes those and skips redundant questions. In trials of this approach, we found that users often volunteer extra details in a single response, and the LLM can intelligently extract those and adjust the questioning accordingly. As Dinis Cruz noted in his experiments, sometimes “the user already provides a lot of answers… in one answer, so we can then just jump into it” – an adaptive flow that static forms simply cannot match.

Throughout this process, the knowledge graph is incrementally built. Think of the graph as a living map of the user’s business context: it might include nodes for the company, its industry, key assets, threats, compliance obligations, and so forth, all linked in meaningful ways. By the end of the Q&A session, the graph might be richly populated with dozens of interconnected nodes representing the landscape of that persona (for a cybersecurity executive, this could map out their organization’s security posture, concerns, and risk areas). The power of this approach is that the graph is constructed with the user rather than behind the scenes – making it far more likely to be accurate and comprehensive. And because it’s guided by GenAI, we avoid overwhelming the user; at each step, they answer a focused question in natural language, which is both more engaging and more intuitive than filling a spreadsheet.

Notably, generative AI doesn’t just ask the questions – it also helps interpret the answers. The free-form text responses from the user are run through the LLM (or associated NLP tools) to extract the key facts or entities that become part of the graph. This use of AI for entity extraction is essential for scalability. As Dinis Cruz points out when describing a related news feed project, “we use LLMs here because this is the only scalable and practical way to extract entities (i.e. Semantic Knowledge Graphs) from some text”. In our scenario, the “text” is the user’s answer, and the entities are the semantic pieces of knowledge (like “uses AWS cloud” or “concerned about ransomware”) that we add to their persona graph. Without LLMs, translating arbitrary user input into a structured graph would require brittle manual rules; with GenAI, the system can flexibly understand and categorize the user’s statements.

Human-in-the-Loop Feedback and Refinement

A cornerstone of our approach is incorporating human-in-the-loop feedback. Rather than solely relying on the user’s initial answers, the system periodically reflects back its understanding and asks the user to validate or correct it. This could be as simple as: “It sounds like you are most concerned about data breaches affecting customer information – is that correct?” followed by a Yes/No or multiple-choice confirmation. The rationale is that it’s often easier for users to verify information than to come up with it from scratch. By confirming (“Yes, that’s correct”) or clarifying (“Actually, my bigger worry is insider threats leading to data leaks”), the user helps refine the graph’s accuracy.

This feedback loop turns the graph-building into a collaborative process. The AI may infer or suggest a relationship, but the user is the ultimate arbiter of truth for their scenario. According to Dinis Cruz, such human-in-the-loop systems are vital because “graphs should evolve and get better the more they’re used… we should create feedback systems that allow constant validation and refinement”. Each interaction with the user is an opportunity to tune the knowledge graph to better reflect reality. Over time, this yields what Cruz calls “living knowledge structures that actually represent reality” – in contrast to static diagrams that were drawn once and quickly become outdated. In practice, after a series of Q&As and confirmations, the persona graph becomes a validated model of the user’s context, one that both the system and the user trust.

From a user experience (UX) perspective, this method is surprisingly engaging. Instead of passively filling forms, the user is engaged in a dialogue and even a bit of exploration. The system might visualize parts of the graph (for instance, showing a risk map or a summary of concerns) and ask “Do you agree that these are your top threats?” Seeing a visual or list generated from their own inputs can spark insight – the user might respond, “I realize now that third-party risk should be on that list too,” prompting further questions about supply chain or vendor security. This interplay ensures the user is learning and reflecting throughout the process. In fact, one design goal is for the user to gain value (new understanding of their situation) even before any final output is produced. By asking thought-provoking questions (e.g. “What would happen if your main database became corrupted?” or “How would a week-long system outage impact your customers?”), the system surfaces considerations the user may not have pondered. The process thus doubles as a mini risk assessment workshop guided by AI. Many users report this to be “an interesting experience… intellectually challenging and interesting” rather than a chore, especially as the questions are tuned to their knowledge level, role, and industry.

To support this adaptive UX, we leverage modern no-code/low-code and dynamic UI generation techniques. The idea is to present the graph and questions in a user-friendly manner, potentially with custom visualizations generated on the fly. For instance, if the user’s role is non-technical (say a Board member), the interface can use plain language and business-oriented visuals (e.g. high-level risk heatmaps) instead of technical jargon. If the user is more technical (like a CTO), the questions and visuals can be more granular. By generating the interface dynamically – something made easier by “vibe coding” frameworks – the system can tailor the experience in real-time to each persona. Ultimately, confirming details via a slick UI (clicking yes/no, dragging a slider to indicate level of concern, etc.) can be far more pleasant than typing out every answer. It also provides variety in the interaction, which keeps users engaged over the span of dozens of questions. The dynamic UI becomes another feedback mechanism: it shows the user what the AI has compiled so far (in an easily digestible form) and asks if it’s correct or needs adjustment. This aligns with Cruz’s philosophy that “graph designers should think like UX designers… the information flow needs to be human-centered and intuitive”. By treating the knowledge graph not just as data but as a user-facing product, we ensure that the end-user remains at the center of the creation process.

Architecture and Key Building Blocks

Implementing this kind of user-driven graph system is now feasible thanks to serverless computing, semantic graph databases, and GenAI integration. Our reference implementation uses an on-demand, serverless architecture – meaning it can scale to handle many concurrent sessions and incurs no cost when idle. Whenever a user begins a Q&A session, lightweight cloud functions spin up to handle the dialogue logic and graph updates, then spin down when done. This makes the solution cost-efficient and highly scalable for potentially thousands of personalized graph-building sessions.

A few key open-source components (developed by Dinis Cruz and collaborators) form the backbone of the system:

Pre-Population and External Data Integration

A particularly powerful enhancement to the workflow is pre-populating the graph using external data before or during the user session. Often, a lot of information about a company or individual is available from public or internal sources. Rather than ask the user to input facts that could be auto-fetched, the system can do a preparatory analysis. For example, if the user provides their company name and role, we could automatically pull basic company information (industry, size, recent news) from public databases or APIs. In a cybersecurity context, one could even retrieve threat intelligence or known breach data related to that industry or the specific company. The idea is to gather as much as possible upfront, so that the AI can ask more informed and specific questions, and so the user can spend time on insights rather than simple facts.

Imagine the system starts a session by saying: “Before we begin, I’ve gathered some information about your company. I found that you have approximately 500 employees, use Office 365, and were mentioned in a recent data privacy report. I’ve added these to your profile – could you confirm if this is correct?” A user seeing this is likely to be impressed (and perhaps a bit alarmed) by what’s already known – but it immediately establishes relevance. They can correct any inaccuracies (“Actually we have 600 employees, not 500”) and then we proceed with deeper questions. This approach not only saves the user time, but also sets the stage for a more meaningful dialogue: we don’t waste questions on basics, and we can dive straight into issues that matter. It also educates the user about their external footprint, which in security is often an eye-opener (“You mean our company is listed on a data privacy report publicly?”).

Technically, integrating such data might involve microservices or third-party APIs that are invoked in the flow (this can be done asynchronously while the user is answering early questions). Thanks to the modular design with OSBot flows, adding a step to call, say, a company info API or a security ratings service is straightforward. If the user consents and the value is worth it, premium data sources could be tapped (for example, a service that provides a list of a company’s exposed databases or leaked credentials). The key is to always loop the user in – we never blindly trust external data without user confirmation. The graph may be pre-populated with guesses or findings, but the user will validate them. This keeps the knowledge graph accurate and personalized. It also addresses privacy concerns, since the user remains in control of what data is accepted into their persona profile.

By leveraging external knowledge, the system effectively accelerates the conversation. In some cases, we might achieve 80% of the graph fill-out with minimal questioning, focusing the live Q&A on the remaining 20% that is truly subjective or nuanced. This combination of automated research + interactive interview is a game-changer in user-driven graph creation, enabled by the fact that GenAI can interpret both the external data and the user’s inputs in a unified way. Just a few years ago, orchestrating such a process (across multiple data sources and adaptively questioning the user) would have been deemed “ridiculously expensive to create”, as Cruz notes, due to the complexity of maintaining context and dialogue flow. But today’s AI and graph technology make it feasible, even elegant. We can dynamically generate not just questions but an entire UI and data pipeline tailored to an individual – essentially on the fly.

Applications and Use Cases

While the genesis of this approach was in the cybersecurity realm (specifically tailoring content for boardroom executives and security officers), user-driven persona graphs have broad applicability across industries. Below we outline a few key use cases, highlighting both cybersecurity examples and wider applications:

These examples only scratch the surface. In general, any domain where context matters and one size doesn’t fit all is a candidate for GenAI-driven graph personalization. The common thread is that by combining human input and AI, we create a self-improving knowledge structure that’s far more aligned to the user’s reality than a generic template. Organizations can maintain multiple such graphs for different perspectives (executive, technical, customer, etc.) and use AI to bridge between them when needed. For instance, a technical risk graph and a business risk graph can be linked via common nodes or relationships, enabling translation between tech-speak and business-speak – something GenAI is very good at. As Cruz notes, this avoids forcing a single rigid ontology on everyone; instead “each team/culture/role [can] develop their natural terminology” while AI helps “create connections between related concepts across [these] ontologies”. The result is a federation of graphs, or an “ontology of ontologies,” where personalization and standardization find a balance.

Benefits and Conclusion

The user-driven persona graph approach offers significant benefits over traditional methods of knowledge capture and personalization:

In conclusion, user-driven graph creation powered by LLMs represents a paradigm shift in how we capture and organize knowledge. We move from static, top-down taxonomy imposition to an organic, bottom-up growth of graphs that mirror the user’s mental model and real-world situation. The synergy between human expertise and AI assistance yields a system that adapts continuously, learns from each interaction, and bridges diverse viewpoints into a coherent whole. Early implementations in cybersecurity and personalized content have validated the effectiveness of this approach, turning what was once an overwhelming data collection exercise into a streamlined, even enjoyable, experience. The phrase “self-improving knowledge graph” truly comes to life here – the more the graph is used and touched by human insight, the more valuable it becomes.

As we stand at this intersection of GenAI and knowledge management, the possibilities seem boundless. We can finally escape the “perfect taxonomy” trap of traditional KM, as our AI-enhanced graphs can flex and evolve without constant re-engineering. Looking ahead, as LLMs grow more powerful and our design patterns for human-AI collaboration mature, we can expect even more seamless and intelligent knowledge ecosystems. These will not only capture information, but also context, rationale, and connections that drive better decision-making. In essence, by fusing user-driven inputs with machine-driven scalability, we are creating a future where knowledge becomes living – continuously refined by those who use it, and readily translated across domains by AI. The work by Dinis Cruz and others in pioneering serverless semantic graphs with GenAI bridges has shown that we’re “only scratching the surface of what’s possible”. The journey ahead is exciting, and it promises knowledge solutions that are more resilient, personalised, and insightful than ever before.

Sources: Dinis Cruz’s research and open-source projects (OSBot, MGraph-DB, MyFeeds.ai, The Cyber Boardroom), along with the collaborative analysis by ChatGPT Deep Research.

Released under CC BY 4.0. First published on docs.diniscruz.ai; this page as markdown.