Graphileon and ChatGPT having a phenomenal conversation. Part 1

Graphileon and ChatGPT had a conversation where they discussed a phenomenon, such as "obesity in children," and ChatGPT was tasked with finding cause-and-effect relationships related to that phenomenon. The response from ChatGPT was processed by Graphileon, which created a cause-and-effect graph. Graphileon then generated new prompts that could be submitted to ChatGPT again. The result was a funding proposal to address childhood obesity through community programs and education, which aimed to increase access to healthy food options, provide nutritional education, increase access to safe and convenient outdoor spaces, and create awareness campaigns. The proposal included evaluating the effectiveness of the programs by collecting data.

What did we do? And why?

Today, we had Graphileon and ChatGPT talk to each other..  back and forth and back and forth ..  starting with a term describing some phenomenon (e.g. “obesity in children”), and asking ChatGPT to find cause-effect relationships related to that phenomenon. Since ChatGPT can return structured information (in the prompt, you can specify the structure of the JSON objects that you want), Graphileon can process the response and create a cause-effect graph. From that, it can automatically generate new prompts that can be submitted to ChatGPT again.
Now the above was theory until we started to put the pieces together and see it actually run, and that answers the why? question. We were curious to see whether the functions and capabilities we built into Graphileon are sufficient to easily integrate ChatGPT.

This blog is the first part of the story that demonstrates how you can go from “obesity in children”  to a draft funding proposal in your mailbox by connecting existing components in a clever way.

Let’s go

We are graphy people, so we chose the following structure, as we may want to link other things to the CER (Cause Effect Relationship) node later on, like user assessments, or other phenomena influencing the cause-effect relationship. The influence property indicates whether cause and effect move in the same way or opposite to each other.

After some time, the following graph was created, which shows the mutual influence of a lot of phenomena ChatGPT had found, most of which are quite relevant to the subject.

In the next step, we extracted a path consisting of multiple cause-effect relationships, a so-called cause-effect chain, like the one below.

To feed the chain to ChatGPT, we had to convert this into a list of JSON objects. The Cypher statement to do this is stored in a Graphileon node with label:IA_Function and type:'Query'

which returns something similar to this:

[{
  "effect": "sedentary lifestyle",
  "cause": "lack of access to safe and convenient outdoor spaces",
  "explanation": "Children living in areas without parks or playgrounds may have limited opportunities to engage in physical activities outside of school."
}, 
{
  "effect": "lack of access to safe and convenient outdoor spaces",
  "cause": "urbanization and land use changes",
  "explanation": "As urbanization increases, cities become more compact and open spaces become scarce. This results in fewer opportunities for children to engage in physical activity and play outside, leading to an increased risk of obesity."
}, 
{
  "effect": "lack of access to safe and convenient outdoor spaces",
  "cause": "public transportation",
  "explanation": "Access to public transportation can increase opportunities for physical activity, as children may walk or bike to and from transit stops, and can also provide access to outdoor spaces in other parts of the city."
}, 
{
  "effect": "lack of access to safe and convenient outdoor spaces",
  "cause": "community design and planning",
  "explanation": "Well-designed communities with sidewalks, bike lanes, and parks can encourage physical activity and help prevent obesity in children."
}
...
]

The query result was submitted to ChatGPT again, preceded by the text :

"Write a funding proposal based on the storyline in this JSON"

The response from ChatGPT was quite amazing, in the sense that it was able to capture the essence. Not something you would use without further editing (as is the case with many of its responses), but a good starting point. You can judge yourselves from the un-edited response below..

[BEGIN]
Funding Proposal: Addressing Childhood Obesity through Community Programs and Education

Introduction: Childhood obesity is a significant public health concern with serious consequences for the physical, emotional, and social well-being of children. The factors contributing to childhood obesity are complex, with a range of social, environmental, and economic factors that influence children’s dietary habits and physical activity levels. This proposal aims to address childhood obesity through a combination of community programs and education that will target the underlying causes of the problem.

Goals and Objectives: The overall goal of this project is to reduce the prevalence of childhood obesity in our community by promoting healthy lifestyles and habits. The specific objectives are as follows:

  1. Increase access to healthy food options for low-income families.
  2. Provide nutritional education to children and families to promote healthy eating habits.
  3. Increase access to safe and convenient outdoor spaces for physical activity.
  4. Provide education and awareness about the importance of physical activity and the risks of a sedentary lifestyle.
  5. Develop community programs that promote healthy habits related to obesity prevention.

Methods: To achieve these objectives, we will implement a range of community-based programs and education initiatives. These will include:

  1. Collaborating with local food banks and community organizations to increase the availability of fresh, healthy foods in low-income neighborhoods.
  2. Providing nutritional education workshops for children and families in schools and community centers.
  3. Developing after-school and summer programs that promote physical activity, such as sports leagues, dance classes, and outdoor adventure programs.
  4. Creating awareness campaigns that educate parents and caregivers about the risks of a sedentary lifestyle and the benefits of physical activity.
  5. Partnering with local organizations and businesses to provide incentives for healthy behaviors, such as discounts for healthy foods and free passes to local parks and recreation centers.

Evaluation: To evaluate the effectiveness of these programs, we will collect data on the following indicators:

  1. Changes in the availability of healthy food options in low-income neighborhoods.
  2. Increases in knowledge and adoption of healthy eating habits among children and families.
  3. Increases in the use of safe and convenient outdoor spaces for physical activity.
  4. Increases in awareness and understanding of the importance of physical activity and the risks of a sedentary lifestyle.
  5. Increases in participation in community programs that promote healthy habits related to obesity prevention.

Conclusion: Childhood obesity is a complex problem that requires a multifaceted solution. Through a combination of community programs and education initiatives, we can address the underlying causes of childhood obesity and promote healthy habits and lifestyles among children and families in our community. With the support of this funding proposal, we can make a significant impact on the health and well-being of our community’s children.

[END]

Graphileon then captures the response from ChatGPT and uses the Email function to drop it in my mailbox. Task completed.

An important reason for us to build Graphileon is the fact that you do not need to code to build something that does what is described above. Graphileon’s functions (nodes) can be linked together using triggers (the edges or relationships). The application above needs only a few nodes, as the diagram illustrates:

  • 2 API endpoints to stop and start the process through a GET request.
  • 6 Query functions to build the graph, select the nodes to process, extract the storyline, and do some maintenance.
  • 2 Request functions that talk to the ChatGPT API.
  • 1 Email function.
  • 2 IO nodes for storing process information.

In part 2 of the story, we will explain the details of the configuration and share a JSON that you can use as a source of inspiration for your own Graphileon applications.

 

 

 

 

 


Card image cap
Graphileon implements business logic of new EU Regulations for Anti-Money Laundering and Counter-Terrorist Financing

The European Union has recently introduced new regulations aimed at preventing the misuse of the financial system for money laundering and terrorist financing (Read More). A crucial part of these updates focuses on identifying Ultimate Beneficial Owners (UBOs) and entities requiring thorough investigations. In collaboration with a key legal sector client, we’ve successfully implemented the … Continued

Card image cap
Graphileon partners with thatDot to support Quine streaming graph for real-time analytics

Graphileon partners with thatDot to develop connectors for Quine (quine.io), an open-source streaming graph solution for event-driven applications.

Card image cap
Release of Graphileon 3.6.0

The release of Graphileon 3.6.0 brings numerous enhancements and features to this graph database management software. Here are the key highlights: New Components and Features: This version introduces new and improved components (Functions) and incorporates user-requested features, enhancing the functionality of the software. Enhanced Visualization: Users can now customize the visualization of nodes in the … Continued

Get started with Graphileon Personal Edition in the cloud or on your desktop.

The easiest way to get to know Graphileon is to spin up the Personal Edition in the Graphileon Cloud. It comes with two graph stores installed and access to the App Library with examples and apps. You can also download and install Graphileon Personal Edition to run it on your desktop. Either way, you will be able to build graphy applications an browse your graph stores in a way you never did before.