Welcome to theProlog in the LLM EraHoliday Season Special! Starring …pyswip…SWI-Prolog… the Semantic Web …data mesh… and … special guest star, ChatGPT!
Notes:
- This blog is best consumed by first reading at least Part 1 of the series (preferably the first 3 parts):Prolog in the LLM Era – Part 1. This blog is really Part 9 of the series.
- As with the Thanksgiving Special (Part 8 of the series), this blog is kind of chatty because I want to remind my architect friends to recognize and value the expertise held by all billions of human knowledge workers. It’s a counter-flow approach: instead of the single direction of AI feeding decisions down to people, it’s about knowledge workers (far out-numbering analysts and managers) contributing their unique insights and perspectives back into AI. We need to be cognizant of remaining in control. If the masses of us have nothing to contribute in terms of our voices, we’ve lost most of our agency.The direction of focusing on “better and better” ways of utilizing AI is a slippery slope to pure individual complacency—which is a dangerous thing.
- This blog series,Prolog in the LLM Era, is designed to convey key considerations and potential applications for Prolog within AI and knowledge-driven environments. Prolog, as a factored subset of broader code logic, can be scaled out more easily than more complex systems. However, this series does not aim to provide a blueprint for building a fully optimized Prolog server. Developing a Prolog server with the sophistication of platforms like SQL Server, Oracle, or SSAS is beyond the scope of this series.
In this blog, we’re looking at formatting strategy maps of the performance management domain into Prolog. This is so the strategy maps can integrate seamlessly with other rules encoded in more conventional Prolog, as I’ve described in the Prolog in the LLM Era series.
I chose this topic for the Holiday Season Special because strategy maps are the gateway to systems thinking. They are about relationships between what we and/or our enterprises desire, fear, and how we believe the world works. That is, beyond just a list of instructions or a decision tree. Our sapience, our superpower over other critters of Earth, is founded on our capabilities with matters of why and how—strategies.
So settle into your comfy chair, fireplace with the stockings hanging off them, and the aroma of cookies for this long tale of Christmas cheer that is sure to become a classic.
Strategy Maps
Strategy Maps are a somewhat high-level graph view (nodes/edges) of what is important to the business and how those important things affect each other. Think of it as a drill-down of a pithy mission statement to a TL;DR of the “theory” of how we will accomplish the goal of the mission statement, but not an in-the-weeds blueprint.
For example, a coffee shop might have a simple mission statement: “To bring people together over great coffee.” The strategy map then details how the various parts of the business relate to fulfilling this mission. For instance, it could outline how sourcing high-quality beans impacts customer satisfaction, how employee training ensures consistent service, or how maintaining an inviting atmosphere encourages customer loyalty. The strategy map connects these elements, showing how each contributes to the broader goal of fulfilling the mission statement.
They do not provide detailed plans or designs for processes aimed at achieving the mission statement’s goals. They are a web of how beliefs, desires, fears, and intents relate. Fears are states we avoid. Beliefs could indeed be correct and valid, but they are dependent upon conditions, which are always changing. In people, the web of these attributes forms a person’s theory of mind.
On the lower-right corner of Figure 1 is an example of a strategy map embedded into a dashboard (1). In that rather static and simplistic state, it’s not living up to its full potential as our enterprise’s theory of mind.
Each node of the strategy map is an element of the strategy. For example, increasing referrals is a strategic aspect intended to grow the practice. There are many ways to increase referrals, but those ways are tactics we can apply, for example, ensuring our patients are delighted with the care they received.
Notice the “balanced scorecard” on the left side of Figure 1—the “tree” of objectives and key performance indicators (KPI) (2). The linear list/tree format is easier to read and deal with that the web-like structure of the strategy map. But the processes of our lives are more than checklists of KPIs we’re responsible for meeting. Life is complex such that in reality, we face obstacles that are novel to us which require solutions based on how our list of KPIs relate to each other.
Note that by “KPI”, I really mean “metric”, some of which will not be “key”. Sometimes they are hard to distinguish. For example, blood pressure is a key metric, but it is still just a metric.
I’ve written about strategy maps in several blogs and touch upon them in my book, Enterprise Intelligence:
- Bridging Predictive Analytics and Performance Management
- Revisiting Strategy Maps: Bridging Graph Technology, Machine Learning and AI
- KPI Status Relationship Map Revisited with LLMs
- The Effect Correlation Score for KPIs
- KPI Cause and Effect Visio Graph
Strategy maps have existed in the performance management world for almost as long as the balanced scorecard. But they haven’t been of much interest because:
- Webs are harder to deal with than lists or trees. Graphs require more thought to develop and maintain. Even the Semantic Web technologies (RDF, OWL, SPARQL–Knowledge Graphs) have only recently picked up significant and widespread steam in large part to the rise of LLMs over the past two years.
- At least in my experience, the customers I dealt with before 2010 barely knew of “graph structures”. There were no readily available “graph controls” in Visual Studio, for example. Today, graph controls are easily obtainable, for example, in Python’s matplotlib. Even today, most customers I deal with have difficulty breaking out of the common linear visualizations such as bar charts and line graphs.
- LLMs today can provide invaluable assistance in authoring strategy maps. They lessen the need for SMEs of tangential topics, encoders of the strategy map (ex. can format instructions to RDF/OWL). As it is with knowledge graphs, strategy maps were very difficult to author without assistance from today’s level of AI.
- Experienced human workers have an innate sense of how the parts of their job relate to each other. But this when things move quickly, that innate sense of how things currently work hard for we humans to keep up with. Additionally, the human workers might know the relationships but our new friends, AI, may not know what is going on our little heads.
So with LLMs, couldn’t we just fine-tune an LLM with documentation of how things work at our enterprise and skip the whole strategy map thing? Yes, but:
- Have you seen the quality of typical internal documentation? In fact, in some cases, you may never have even seen documentation. They aren’t exactly thoroughly edited, complete, or even updated.
- Natural language is built to be flexible in a complex, constantly-changing world. We can communicate with speakers at various levels or dialects about fuzzy things that happen in a complex world. The strategy map is not ambiguous. It’s encoded in a more purposeful, specific way. In this way, the now well-known symbiotic relationship between knowledge graphs and LLMs makes sense—the duality of a deterministic model and a flexible model that’s good with ambiguity, respectively.
Lastly, keep in mind that strategy maps are not process workflows. A process workflow is predominantly about how and what, whereas a strategy map is predominantly about why and a secondarily about how.
Theory of Mind
The truth about how something affects something else is rarely universal. It’s constrained by context—what and who are involved, the time, the place, the current desired outcomes, etc. Occupying small parcels of time, place, and context are people. Every individual sentient being brings their own unique experiences and interpretations to the table. Even when two or more people reach the same conclusion, their paths to that conclusion—shaped by their personal histories, environments, and mental frameworks—are likely different. This diversity of reasoning is what makes human collaboration both challenging and powerful.
In psychology, theory of mind refers to our ability to intuitively understand how others think and feel, allowing us to predict their actions and interact in ways that lead to better outcomes. But this concept isn’t limited to individuals. Enterprises, organizations, groups, and even nations also have a kind of “theory of mind” shaped by their collective appetite, mission, and culture. These organizational traits act as lenses through which decisions are made and actions are prioritized, influencing how enterprises navigate the world.
One of the central ideas in Enterprise Intelligence is recognizing the often dismissed current and real-world knowledge of frontline workers—those closest to the ever-shifting dynamics of the real world—to contribute to better processes and decisions. They’re the ones interacting directly with customers, systems, and the environment, often spotting the subtle changes and frictions that managers or centralized decision-makers may miss.
Here’s the cycle: A frontline worker is promoted to management, carrying their firsthand experience into their new role. Over time, however, the world changes—customer appetites and expectations shift, technologies evolve, competitors adapt, new products and/or paradigms emerge. At first, organizations may succeed in molding (coercing) customers or circumstances to fit their existing processes. But as the gap between reality and established processes widen, countless workarounds emerge, inefficiencies grow, and systems begin to degrade.
The solution lies in distributed intelligence: empowering frontline workers to contribute their current, diverse, and real-world insights and ideas before problems escalate. When workers feel encouraged to share observations and propose changes, organizations can adapt more quickly and effectively. This isn’t just about fixing issues—it’s about building an adaptive culture where real-world dynamics inform strategy, keeping processes relevant and sustainable.
The notion of frontline knowledge workers creating strategy maps probably seems strange and unrealistic. They are often just given marching orders and somehow accomplish them. But for managers, the notion of a strategy map might be more intuitive. They are in change of a mini-enterprise within an enterprise made up of people, equipment, a budget, and other resources. They generally must present to their bosses not just what they’re going to do in the coming fiscal year, but also how that works.
By viewing every level of the enterprise as a node in a broader network of intelligence, organizations can harness the diversity of thought and experience to create new options rather than relying solely on top-down adjustments. It’s not about abandoning structure but about creating feedback loops that ensure the organization’s “theory of mind” evolves with the world it inhabits. This adaptive intelligence is what separates thriving enterprises from those that stagnate under the weight of outdated processes and assumptions.
Strategy Maps as Theory of Mind
Strategy Maps are a component of the Performance Management domain. It could be one of the visualizations embedded in a dashboard. They are a kind of knowledge graph, of the typical node and edge format. But specifically for mapping intended effects of changes in performance of one metric to another. For the most part, knowledge graphs as they are authored today are more about who, what, and where. Strategy maps are primarily about why, which is generally tougher to map out than how, who, what, and where.
However, for this blog, we’re looking at formatting the strategy maps in Prolog. This is so the strategy maps can integrate seamlessly with other rules encoded in more conventional Prolog, as has been described in the Prolog in the LLM Era series.
They were generally overlooked. But with the surge of interest in AI and knowledge graphs, they can take their intended place as the mapping of the desires (goals/hopes), beliefs, fears (risks), and intents of an enterprise.
My opinion is that they were considered just another pretty picture an enterprise composes but no one really pays attention to in the tussle of keeping operations flowing—just like mission statements.
They are usually built by human subject-matter experts (SME). The problem with subject-matter experts is that they are experts at subjects. Subjects interreact with each other in ways and for reasons a SME of one domain would not know of another domain.
I do need to clarify that although I say strategy maps (and knowledge graphs) are built by human SMEs, they are really built by a cross-functional team that includes software engineers (or at least those skilled with Prolog and/or semantic web tools such as Protege), stakeholders, and some sort of database-driven help from BI data sources, machine learning models, and increasingly, AI.
The important point about the participation of AI is that like BI and ML, AI is in a support role. The strategy map must still be human-driven or at least fully human-vetted., human approved. Strategy maps (and knowledge graphs) should represent the human say in an era when AI is rapidly increasing.
Goals
Goals represent the high-level states we aim to achieve—they provide direction and define success. For businesses, common goals often include broad aspirations like profitability, growth, or perhaps something along the lines of contributing positively as a “good corporate citizen.”
Beneath these overarching goals are secondary goals that are more specific and actionable, though still strategic in nature. For instance, a business might have secondary goals like:
- Cost-cutting: Reducing operational expenses to enhance profitability.
- Improving customer satisfaction: Increasing retention and loyalty.
- Enhancing brand reputation: Building trust and recognition in the market.
- Achieving sustainability targets: Reducing carbon footprint or transitioning to eco-friendly practices.
Objectives, on the other hand, are tactical steps or milestones that serve these goals. They are measurable and often short to medium-term in focus. For example:
- Objective for Cost-Cutting: Automating back-office processes to reduce labor costs by 20%.
- Objective for Improving Customer Satisfaction: Implementing a new CRM system to better respond to customer inquiries within 24 hours.
- Objective for Sustainability: Transitioning 50% of the energy usage in facilities to renewable sources within two years.
Just as avoiding chronic diseases is an objective towards the goal of living a high-quality life, these business objectives are actionable paths that drive progress toward higher-level aspirations. By clearly delineating goals and objectives, businesses can align strategic direction with practical implementation.
Beliefs
The problem with deductive reasoning—and Prolog exemplifies deductive reasoning—is that when we are stated fact and rule is anything more than a belief.
With the proper respect to SMEs, who are human, their ideas of how things work are beliefs. The beliefs take the form of how changes to one metric affect another metric. Some may indeed be true, but some could be outdated or incorrectly generalized—meaning what they’ve witnessed working last year may not work today.
Today, with data warehousing, data science, and machine learning being rather mainstream, we can actually test the beliefs—correlations between the metrics. Perhaps not all of them, but as many as we can. I discuss this in my blog, The Effect Correlation Score.
Intents
Intents are the plan. They are often indistinguishable from beliefs. For example, we believe that supporting training by the employees leads to fewer mistakes. Intents are the steps for getting there.
We generally wouldn’t have an intent for something we didn’t believe is possible. Our intent is to reach a goal. But here, I refer to intent as something more low-level, more short term, like an objective. My overarching goal might be to provide for my family, but the intent for my actions is to land a customer.
Intent is more like an objective, a means to an end.
Beliefs versus Intent
In the context of a strategy map, beliefs can be seen as the relationships between elements, while intents represent the actionable nodes. Beliefs are the assumptions about how one element influences another, forming the “arrows” or connections that guide the strategic logic of the map. For instance, the belief that “Customer Satisfaction” leads to “Return Visits” and “Referrals,” which ultimately drive “New Patients,” reflects the organization’s understanding of how improvements in one area are expected to cascade into broader success. These relationships are grounded in assumptions that may not always be directly tested but serve as the rationale for strategic decision-making.
On the other hand, intents are represented by the nodes or “boxes” in the strategy map, capturing the specific efforts or focus areas that the organization commits to. For example, “Quality and Appropriate Training” and “Business Intelligence System” are actionable intents that align with the broader strategy. They are the operational steps aimed at achieving the desired outcomes, such as “Employee Satisfaction” or “Understanding Customers.” While beliefs provide the theoretical framework that links different components, intents embody the tangible actions taken to realize the strategy.
This distinction is essential to understanding how strategy maps function. Beliefs articulate why certain actions are expected to lead to specific outcomes, while intents define what actions will be taken. By visualizing these elements, strategy maps bridge the gap between high-level strategic thinking and the practical steps required to achieve organizational goals.
Fears
A fear is something with a negative impact we want to avoid. We measure the risk of something happening under certain circumstances. They are known risks, unlike imaginable side-effects or unintended consequences we were either too pressed to adequately explore at decision time, maybe knew but underestimated.
One way we avoid acknowledging certain risks is through transference of cost—shifting the burden of potential consequences to another entity or area, rather than addressing the risk directly. For example, a business might outsource customer service to reduce overhead costs, believing this will streamline operations. However, this decision might transfer the cost to customer satisfaction, as the outsourced team may lack the same level of commitment or familiarity with the business’s values. While the immediate financial risk appears mitigated, the hidden cost in diminished customer loyalty could manifest over time, compounding the original issue.
As we encounter more risks, they need to be integrated into the strategy map to reflect a ‘fool me once…’ mindset, ensuring that lessons are carried forward to reduce the likelihood of repeat mistakes. Even when risks are not specifically known, understanding the categories they fall into helps us anticipate and plan for them. For example, using a business intelligence system to push customers to their maximum tolerable price may inadvertently alienate some customers—an initiative that could backfire, as often happens with customer-facing programs.
I tend to take a “zero-sum game” approach towards building strategy maps. Many people have told me that’s a loser’s way of thinking. But the notion of zero-sum is embedded in the physics that currently dominates our world—conservation of mass and energy. I assume there is always a cost to something, but we just can’t see it until later–unless we’re lucky.
To add to that mess, unintended consequences are probably not direct results of an action, but something down a chain of cause and effect. To illustrate, consider a dental practice deciding to adopt a cost-cutting measure by switching to less expensive dental materials. At first, this action seems like a win: operational expenses decrease, and profit margins improve. However, unintended consequences might arise further down the chain of cause and effect. For example:
- Patient Experience: The cheaper materials may lead to slightly less durable treatments, resulting in more follow-up visits for repairs or replacements. Initially, this could be viewed positively as increased revenue from additional appointments.
- Reputation Damage: Over time, patients may associate the practice with lower-quality care, resulting in fewer referrals or return visits.
- Regulatory Risks: If the materials fail at higher-than-expected rates, the practice could face scrutiny from professional boards or legal challenges.
The cost-cutting decision, while seemingly beneficial in the short term, triggers a cascade of effects that might erode long-term profitability and trust. This chain reaction underscores why strategy maps must account for the indirect and long-term consequences of actions, not just the immediate impacts.
Sometimes, though, the costs are hidden because we subconsciously (or even semi-consciously) don’t want to see them—they’re obscured by fear, wishful thinking, or confirmation bias. Other times, they’re swept under the rug, transferred elsewhere in ways we fail to recognize. But these hidden costs don’t disappear. They linger, often surfacing much later, sometimes decades down the line, with consequences that are far more complex and entrenched than we could have imagined.
Another challenge is that we may fail to imagine a risk simply because we’ve never experienced a similar situation. Human understanding is shaped by our individual and collective experiences, and when something falls outside those bounds, it can be hard to foresee. This is where an LLM, with its vast corpus of embedded knowledge and patterns drawn from diverse domains, can prove invaluable. An LLM can recognize potential risks or patterns that might not be obvious to us, drawing on the breadth of its “experience” to suggest possibilities we would otherwise overlook. Incorporating such insights into strategy maps allows us to account for a wider range of scenarios, bridging the gap between what we know and what we’ve yet to imagine.
And yet, even with this extended foresight, genuine unknown unknowns can still emerge—risks so unprecedented that neither human intuition nor machine intelligence predicts them. For instance, a business intelligence system might inadvertently introduce bias into customer segmentation, leading to a regulatory investigation or reputational damage—an outcome entirely unforeseen at the time of implementation. These are the kinds of risks that can unexpectedly bite us, often arising when we are most confident in our plans. By integrating mechanisms to anticipate and adapt to such surprises, strategy maps become not just tools for planning, but dynamic frameworks for resilience in the face of uncertainty.
Strategy Map as Prolog
We usually think of Prolog as a tool for recognition or decision-making within a given context. For example, Prolog excels at identifying an object or event based on a set of facts and rules or making a decision by evaluating conditions. However, when applied to strategy maps, Prolog takes on a different role—not just recognizing or deciding, but mapping relationships between goals, beliefs, fears, and intents. Here, Prolog becomes a framework for understanding and exploring the interconnected dynamics of an enterprise’s strategy, where the focus shifts from isolated recognition to modeling causality and interdependencies.
Figure 2 shows a strategy map of a medical practice. It’s very high level, but it does show how the initiatives of the current business strategy relate to each other. It’s in the form of a knowledge graph and looks pretty intuitive.
Take note of the dashed arrow between business_intelligence_systems and understand_customers. We’ll explore that particular relationship later under “Relationship Conditions”.
It’s very easy for almost anyone to understand. It’s even easy for ChatGPT to decipher and understand. I pasted Figure 2 into ChatGPT and asked it to summarize the figure. The result is shown in Figure 3.
If we can understand it and so can an LLM, why convert it into Prolog? Here are a few reasons:
- LLMs can make mistakes. We call it hallucinations, even though we humans often misunderstand something and explain it as if it’s correct.
- Transparency and Explainability: Prolog rules are explicit, deterministic, and human-readable, making it easy to trace how a conclusion was reached. In contrast, the reasoning process of an LLM is a “black box” that lacks transparency. Prolog enables enterprises to document and audit their strategy maps in a clear and systematic way.
- Testing and Validation: Prolog allows for systematic testing and validation of relationships and hypotheses encoded in the strategy map. With Prolog, we can simulate different scenarios, adjust variables, and evaluate the outcomes. This level of rigorous validation is challenging to achieve with an LLM’s probabilistic outputs.
- Integration with Other Logic: Prolog integrates seamlessly with broader logical frameworks, allowing it to work in conjunction with other rules and systems. For example, Prolog rules for a strategy map can interact with operational decision-making rules, enabling a unified logic layer across the organization.
- Dynamic Updates and Modularity: Strategy maps encoded in Prolog are modular and can be updated incrementally as conditions change. Adding or modifying rules is straightforward, ensuring the strategy map evolves alongside the organization’s needs. In contrast, updating an LLM’s internal knowledge often requires retraining on a new dataset, which can be time-intensive and opaque.
In fact, the following Prolog (Code 1 through Code 5) was created by ChatGPT solely from the Strategy Map of Figure 3.
% Define the main perspectives
perspective(financial).
perspective(customers).
perspective(operations).
perspective(employees).
Code 1 – High level enterprise perspectives.
Code 2 represents the relationships between the KPIs in the strategy map. These relationships are encoded using the influences
predicate, which specifies how one KPI affects another, along with the nature of that influence. For example, a KPI like “lower costs” might increase profitability, or “employee satisfaction” might improve the quality of work.
In this representation, each relationship can be thought of as a hypothesis about cause and effect within the organization. These hypotheses are encoded as rules that can be tested and traced within Prolog, providing a clear, auditable view of how strategic initiatives are expected to interact.
By structuring the relationships in Prolog, we gain the ability to:
- Trace the chain of influence between KPIs, uncovering how changes to one metric propagate through the system.
- Identify areas of the strategy map where assumptions may need validation or refinement.
- Simulate potential outcomes by modifying initial conditions and observing the effects.
The relationships in Code 2 are simplified for clarity but can be extended with additional context or conditions to reflect more complex interactions. For instance, we might include weights or probabilities to represent the strength or likelihood of each influence. This flexibility makes Prolog a powerful tool for encoding and exploring strategy maps.
% Define key performance indicators (KPIs)
kpi(lower_costs, financial).
kpi(profitability, financial).
kpi(increased_revenue, financial).
kpi(growth, financial).
kpi(customer_satisfaction, customers).
kpi(return_visits, customers).
kpi(referrals, customers).
kpi(new_patients, customers).
kpi(business_intelligence_system, operations).
kpi(understand_customers, operations).
kpi(quality_of_work, operations).
kpi(service_offerings, operations).
kpi(performance_based_compensation, employees).
kpi(employee_satisfaction, employees).
kpi(quality_and_appropriate_training, employees).
Code 2 – The nodes, each representing a KPI. These could be thought of as intents.
Code 2 provides the backbone of the strategy map in Prolog, establishing the interconnections that drive enterprise performance. By converting these relationships into a formal representation, we can ensure that the strategy map is not only intuitive but also computationally actionable.
Code 3 are facts stating the relationships between the KPIs. For now, we’ll use a generic “influences” predicate. Alternatively, it could be some other verb like affects or increases/decreases.
% Define relationships (Influences between KPIs)
influences(lower_costs, profitability, increases).
influences(profitability, increased_revenue, increases).
influences(increased_revenue, growth, increases).
influences(business_intelligence_system, understand_customers, enables).
influences(understand_customers, quality_of_work, improves).
influences(quality_of_work, customer_satisfaction, increases).
influences(customer_satisfaction, return_visits, increases).
influences(customer_satisfaction, referrals, encourages).
influences(return_visits, profitability, increases).
influences(referrals, new_patients, increases).
influences(new_patients, growth, increases).
influences(employee_satisfaction, quality_of_work, improves).
influences(performance_based_compensation, employee_satisfaction, enhances).
influences(quality_and_appropriate_training, employee_satisfaction, enhances).
influences(service_offerings, new_patients, attracts).
influences(business_intelligence_system, optimizations, enables).
influences(discover_optimizations, customer_satisfaction, enhances).
influences(quality_and_appropriate_training, quality_of_work, improves).
Code 3 – How we believe the KPIs react to each other.
The rules in Code influence_path
is a recursive rule that allows Prolog to trace paths of influence, helpful for diagnosing the impact of one KPI on another throughout the strategy map.
The rules in Code 4 demonstrate how Prolog can encode relationships between key performance indicators (KPIs) and deduce higher-level metrics like growth and profitability. These rules reflect simplified logic that captures causal dependencies:
- Growth: The rule specifies that growth depends on two factors: increased revenue (driven by profitability) and the acquisition of new patients. This models the intuitive idea that both financial health and market expansion contribute to growth.
- Profitability: The rule defines profitability as a function of lower costs and increased revenue. These are straightforward drivers of profitability in most enterprises.
% Rules for determining growth and profitability
% Growth occurs if profitability and new patient acquisition are strong
growth(X) :- influences(profitability, increased_revenue, increases),
influences(new_patients, growth, increases),
X = true.
% Profitability increases when costs are reduced and revenue is high
profitable(X) :- influences(lower_costs, profitability, increases),
influences(profitability, increased_revenue, increases),
X = true.
Code 4 – Definitions of Growth and Profitability.
These rules are examples of “deductive reasoning” in Prolog, where relationships between KPIs are represented explicitly. While simple, these relationships are often hypotheses or assumptions that can be tested against real-world data. For instance, a correlation algorithm could validate whether lowering costs reliably increases profitability or whether new patient acquisition truly drives growth. By using Prolog to encode and explore these relationships, we can ensure that strategy maps are not just intuitive but analytically robust.
I describe this in more detail in my blog, The Effect Correlation Score.
Prolog Agents and Strategy Maps
Back in Part 2 of Prolog in the LLM Era, I wrote about Prolog as agents, each an expert at some topic. For Prolog agents to operate effectively, they must not only process rules and facts but also possess a framework that mirrors their theory of mind—an understanding of how actions, goals, beliefs, and external factors interrelate. A strategy map serves as this framework. It allows the agent to evaluate its goals, assess the conditions for achieving them, and anticipate potential risks or side effects.
This strategy map isn’t merely a static set of rules but a dynamic model that enables the agent to reason about why and how certain actions or conditions influence its objectives. For example, an agent tasked with optimizing customer satisfaction could use a strategy map to understand the interplay between factors like service quality, response time, and customer loyalty. By embedding a strategy map into a Prolog agent, we provide it with the structure needed to make decisions that are aligned with its goals and adaptable to changing contexts.
Consulting an LLM to Predict Effects Based on the Strategy Map
With a structure that deterministically describes a strategy, we could use AI in a RAG (Retrieval Augmented Generation) process to consult it on how our actions might affect the strategy.
For simplicity, I simply posed the question to ChatGPT (Figure 4), which also has the strategy map Prolog loaded.
ChatGPT actually responded with much more than what Figure 4 conveys. But this little section illustrates the gist of its answer. The answer is helpful in the way that it reflects tons of experience across a wide range of experts.
However—and this is an important point—the chance for today’s LLMs to produce a compelling strategy, an original idea of its own, is highly unlikely. Such invention is still the realm of we crazy and curious humans.
Using an LLM with a Strategy Map
When combined with a strategy map, Prolog-based in this case, an LLM becomes a powerful tool for filtering and contextualizing information from vast data sources. By providing the LLM with the strategy map, we can guide it to focus on solutions that align with specific goals, beliefs, intents, and fears, effectively “weeding out” unrelated or low-priority suggestions.
To illustrate this, let’s examine the dental practice strategy map and a sample real-world article on dentistry I randomly picked: 4 Technologies Transforming the Field of Dentistry. The article explores four key technologies transforming dentistry by improving efficiency, enhancing patient care, and reducing costs:
- 3D printing streamlines the creation of custom prosthetics like crowns and dentures, reducing reliance on external labs and speeding up production.
- Teledentistry offers remote consultations and follow-ups, increasing access to care and patient convenience while reducing in-office visits.
- AI diagnostics leverage machine learning to quickly and accurately detect issues such as cavities and gum disease, providing actionable insights for practitioners.
- Digital workflow tools simplify administrative processes like scheduling and billing, fostering better collaboration and operational efficiency within dental teams. Together, these innovations are reshaping how dental care is delivered and managed.
LLM Integration with the Strategy Map
When given the Prolog-encoded strategy map, the LLM can reason about the relationships between KPIs and evaluate the relevance of solutions from external sources. For example:
- Input to the LLM:
- Strategy map relationships (encoded in Prolog).
- Link to the article on dental technologies.
- Prompt Example:
Based on the provided strategy map and the linked article, identify which technologies could improve profitability and customer satisfaction, and explain how they align with the strategy.
Analyzing Potentially Useful Solutions
The strategy map for the dental practice connects KPIs like profitability, customer satisfaction, and employee satisfaction through relationships such as improves, enables, and encourages. These relationships highlight how the practice operates and where improvements might have the greatest impact. By querying the strategy map, we can identify which solutions from the article might help achieve the practice’s goals:
- 3D Printing in Dentistry
- Relevance to the Strategy Map:
- 3D printing could improve profitability by reducing costs associated with traditional molds and lab work.
- It could also enhance customer satisfaction by offering faster turnaround times for custom prosthetics.
- Prolog Query:
influences(customer_satisfaction, return_visits, increases). influences(lower_costs, profitability, increases).
- Based on these links, the LLM could recommend adopting 3D printing for its direct impact on cost and customer experience.
- Relevance to the Strategy Map:
- Teledentistry Platforms
- Relevance to the Strategy Map:
- Teledentistry could increase patient convenience, leading to higher customer satisfaction.
- It may also reduce operational costs, indirectly contributing to profitability.
- Prolog Query:
influences(customer_satisfaction, referrals, encourages). influences(customer_satisfaction, return_visits, increases).
- The strategy map highlights how improving customer satisfaction indirectly supports growth and revenue.
- Relevance to the Strategy Map:
- AI Diagnostics
- Relevance to the Strategy Map:
- AI could help practitioners identify issues earlier, improving quality of work and customer satisfaction.
- It could also enhance employee satisfaction by reducing the burden of repetitive tasks and supporting better decision-making.
- Prolog Query:
influences(quality_of_work, customer_satisfaction, increases). influences(employee_satisfaction, quality_of_work, improves).
- These relationships suggest AI diagnostics could play a pivotal role in improving both customer and employee experiences.
- Relevance to the Strategy Map:
- Digital Workflow Tools
- Relevance to the Strategy Map:
- Streamlining workflows could boost employee satisfaction by minimizing administrative burdens.
- Improved workflows could enhance quality of work, leading to higher customer satisfaction.
- Prolog Query:
influences(employee_satisfaction, quality_of_work, improves). influences(quality_of_work, customer_satisfaction, increases).
- These connections show the potential impact of digital tools on both staff and patients.
- Relevance to the Strategy Map:
By combining a Prolog-based strategy map with an LLM, we have a robust framework for discovering potentially valuable solutions to those most relevant to the organization’s goals. The strategy map ensures that recommendations are grounded in the specific needs and dynamics of the dental practice, while the LLM brings its expansive knowledge to identify actionable innovations from diverse sources.
Adding this layer of reasoning not only enhances decision-making but also demonstrates the synergy between rule-based logic (Prolog) and LLMs.
Authoring a Strategy Map with AI Assistance
As mentioned, AI, particularly LLMs, can play a significant role assisting in inferring relationships and enhancing strategy maps. By analyzing vast datasets and existing knowledge, AI can suggest relationships, validate assumptions, and identify gaps in current maps. However, the process is far from straightforward and must involve careful human oversight.
- Inferring Relationships: An AI can generate strategy maps for enterprises or individuals based on existing data and documents. These maps reflect AI’s “best guess” about how elements are connected. However, like any scientific experiment, each inferred relationship is a hypothesis that must be tested. Unsupported assertions can lead to inaccurate or misleading maps.
- Determining Thresholds: Machine learning models can identify thresholds for actions, such as the minimum discount required to retain a customer or the optimal investment to achieve growth. For example, what is the smallest coupon value that makes a customer feel incentivized, or what is the smallest bet to make Harry fold in poker?
- Leveraging LLMs for Similarity: In domains like master data management, determining the similarity between entities is crucial. LLMs excel at identifying similarities and patterns, making them invaluable for tasks like deduplication or linking related elements in strategy maps.
While LLMs are powerful, they are certainly not infallible—“hallucinations” is probably the most well-known. Human validation is essential to ensure that the maps reflect the nuanced understanding of the organization. AI’s role should be seen as a collaborator, augmenting human intelligence rather than replacing it. By combining AI’s analytical capabilities with human insight, we can create strategy maps that are both comprehensive and actionable, enabling organizations to navigate complexity effectively.
Relationship Conditions
Here is the very cool part. Our theory of mind must at least consider the conditional nature of relationships. Why are relationships conditional by nature? Because we find ourselves in different contexts, which means different rules. For example, my favorite drink at a lunch with colleagues is a Diet Coke but at dinner with colleagues it’s some sort of dark beer, if it’s a casual place—it’s some sort of red wine if it’s a nicer place. This is the lower-level, 10K foot view I mentioned earlier.
So we’re drilling down from the predominantly why nature of strategy maps to the tactical how, when, and where aspects.
Think about the relationship between building a BI system and an understanding our customers—specifically the Prolog rule:
influences(business_intelligence_system, understand_customers, enables).
Now, what if the BI system enables us to understand the customers better is more complicated than that. It’s only true if we have a way to get surveys, tie customers to their bills (a restaurant might not be able to), and other things. This influences rule is actually a complicated than asserting that “the development of a BI system will help us better understand our customers”. That assertion is really bogged down in a mess of “it depends”.
How would the rule look if we were to reflect the “it depends” nature of relationships? It certainly would be messier—no longer a 30,000 foot view where we see the “broad strokes” and get the gist of the layout of the land. But a lower level, say a 10,000 foot view, where we now see more detail. In the weeds, we see the details of the mechanics of how things work.
Higher, medium, and in-the-weeds views provide different information. Therefore, the logic at each level should be factored out into their own components that can be developed and maintained independently. The strategy maps, the 30K foot view is the topic of this blog. But the middle 10K foot view is the topic of this section.
To reflect the conditional nature of the influences(business_intelligence_system, understand_customers, enables) rules based on specific criteria, we can rewrite the rule with additional conditions. In Prolog, we can express dependencies using predicates that evaluate whether the required conditions are met. Code 5 shows how it could look:
% Define the enabling condition with dependencies
influences(business_intelligence_system, understand_customers, enables) :-
has_surveys,
ties_customers_to_bills,
other_enabling_factors.
Code 5 – Relationship conditions between BI systems and understanding customers.
Here is an explanation of Code 5:
- Conditional Dependencies: The
influences
rule now only evaluates to true if certain conditions (has_surveys
,ties_customers_to_bills
, andother_enabling_factors
) are satisfied. - Supporting Conditions:
has_surveys
checks if the system has the capability to conduct and collect surveys.ties_customers_to_bills
verifies that the system can link customers to their bills (e.g., via loyalty programs or other mechanisms).other_enabling_factors
allows for additional conditions, such as the ability to generate insights or other prerequisites.
- Extensibility: Each of these conditions can further encapsulate logic. For instance,
system_capability
might check a database of system features or capabilities.
Mix and Merging Prolog
One of the powerful features of Prolog is its modularity, allowing rules to be mix-and-matched depending on the context. This flexibility is especially useful for strategy maps, where different circumstances may require unique sets of rules. For example, the conditions for has_surveys
, ties_customers_to_bills
, and other_enabling_factors
might vary depending on the type of organization or data availability.
In SWI-Prolog, this modularity is facilitated by the ability to dynamically “consult” files containing alternative definitions. By consulting specific rule sets as needed, you can adapt your strategy map to reflect varying contexts without duplicating logic or rewriting existing code.
Consider the Prolog of Code 6.
% Supporting conditions
has_surveys :- system_capability(surveys_available).
% Same rules as default shown in Code 5.
ties_customers_to_bills :- system_capability(customer_bill_linkage).
other_enabling_factors :- system_capability(additional_insights)
% Consulting a file with alternative rules for more complex scenarios
:- consult(‘alternative_rules.pl’).
Code 6 – Rules for business_intelligence_system-enables->understand_customers.
In this case, the alternative_rules.pl
file could contain specialized definitions for has_surveys
, as shown in Code 7.
has_surveys :- survey_system_installed, sufficient_responses.
survey_system_installed :- system_capability(survey_tool).
sufficient_responses :- survey_responses_count(Count), Count > 100.
Code 7 – Alternative rules for has_surveys.
This approach enables a seamless switch between general and specific rule sets. By consulting alternative Prolog files, you can:
- Encapsulate Context-Specific Logic: Keep the main rule set clean and focused on general use cases while delegating complex or edge-case logic to separate files.
- Reuse Rules Across Projects: Share and reuse predefined rule sets across different strategy maps or even different Prolog programs.
- Enable Dynamic Updates: Modify or extend the rules without affecting the core Prolog code, allowing for more agile responses to changing requirements.
This ability to mix and merge rules highlights Prolog’s strength as a flexible, modular tool for knowledge representation, making it particularly well-suited for dynamic and evolving systems like strategy maps.
Conclusion
Intelligence without goals is directionless. Intelligence isn’t just about simply coming up with answering questions in a robust and widely aware manner. Intelligence doesn’t live in a vacuum, whether artificial or human.
The strategy map of performance management is a descriptive pillar of enterprise knowledge up there with the more conventional ontologies and taxonomies of knowledge graphs.
The purpose of my blog series on Prolog, knowledge graphs, and strategy maps is to emphasize the importance of continuing to encode knowledge in mostly unambiguous, structured forms—ones that are created with a careful balance of human supervision and AI assistance. This balance can vary widely: from subject matter experts directly authoring these frameworks with the help of intuitive tools and engaging LLMs like capable interns, to scenarios where humans take on critical authoritative roles, guiding and validating outputs while the vast bulk of the development is automated.
In the enterprise, we must not lose sight of the value of trillions of years of collective human experience—knowledge and wisdom accumulated by billions of sentient beings throughout history and alive today. While AI offers transformative potential, a preoccupation with achieving AGI or ASI sidelines this wealth of human insight, at the least. Such an approach is akin to expecting individuals to master expertise solely through libraries of books, without the mentorship and guidance of seasoned professionals. True progress lies in creating systems where AI amplifies human intelligence, fostering collaboration rather than replacement, and ensuring our tools remain rooted in the richness of our collective human experience.
Lastly, it’s important to note that strategy maps aren’t confined to the enterprise level—they encapsulate the strategies of individual products, marketing campaigns, healthcare plans, and more. A product’s strategy map might explore how it provides value to customers, while a campaign’s map might detail how it drives engagement and conversions. Similarly, a healthcare plan’s strategy map could outline the pathways to improving patient outcomes and cost efficiency. By extending the concept of strategy maps to these diverse domains, we ensure that every layer of the organization, from the broadest objectives to the most specific initiatives, is aligned and understood in context.
Well, that’s all for this 2024 Season of Prolog in the LLM Era. From me and my new two-week old pacemaker: HAPPY HOLIDAYS!!
We’ll see you next year in what should be a very “exciting” time for all of us.
© Eugene Asahara, 2024.