We are all on a journey. Thanks for taking a peek into mine!
Blog
Spring AI: How to Write GenAI Applications with Java
Photo credit Generative AI (GenAI) is currently a hot topic in the tech world. It’s a subset of artificial intelligence that focuses on creating new content, such as text, images, or music. One popular type of GenAI component is the Large Language Model (LLM), which can generate human-like text based on a prompt. Retrieval-Augmented Generation (RAG) is a technique that enhances the accuracy and reliability of generative AI models by grounding them in external knowledge sources.
read moreBlog
Cypher Sleuthing: How to Get Data Types of Properties in Neo4j
Photo credit It’s been awhile since I wrote a Cypher Sleuthing post, but I’m back with a new one! This time, I’m going to show you how to find the data types of properties in Neo4j.
I frequently want to find out the data type of a property so that I can map it in an application (in Java). I can never remember off the top of my head, and when I Google the question, the results are often outdated (here’s the answer post, but the syntax is old).
read moreBlog
Implementing RAG: How to write a graph retrieval query in LangChain
Photo credit What is RAG? This term is used a lot in today’s technical landscape, but what does it actually mean? Here are a few definitions from various sources:
"Retrieval-Augmented Generation (RAG) is the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response." - Amazon Web Services
"Retrieval-augmented generation (RAG) is a technique for enhancing the accuracy and reliability of generative AI models with facts fetched from external sources.
read moreBlog
How to pass a JSON object to a Spring Boot request
Photo credit Just before the holidays, I was working on writing some more lesson content for a Spring Data Neo4j course. To save an entity to the database, I needed to pass a JSON object containing the entity’s properties to a Spring Boot controller method. Each time I wanted to test the code, I had to manually create the JSON object and pass it to the controller method on the command line.
read moreBlog
How to migrate Homebrew from Intel chip installation to Apple Silicon
Photo credit I have been using an Apple M1 laptop since autumn of 2021, but I just recently came across an issue that surprised me. It seems I hadn’t converted Homebrew (a package manager for macOS) for compatibility with Apple Silicon. I mostly use Homebrew to install packages I rarely use (such as Ruby or Python libraries), so perhaps that’s why I hadn’t noticed. However, this issue surfaced because I tried to install a Python package (Poetry) to work on a generative AI project, and it was looking for Python in the wrong place.
read moreBlog
JBang: How to script with Java for data import from an API
Photo credit It’s right in the middle of busy conference season, and I was prepping for an upcoming conference talk.
As I often do, I went to Neo4j Aura to spin up a free database and use Cypher with APOC to import data from an API, but this API requires a header, and the APOC procedure that adds headers to a request is blocked by security in Aura. Hm, I needed a new route.
read moreBlog
Verify Connectivity: How to Check the Neo4j Connection from a Spring Boot Application
Photo credit I have recently been working on a self-paced learning course for Spring Data Neo4j and wanted users to be able to test the database connection. Typically, in a Spring Boot application with Spring Data, you set the database credentials as properties in the application.properties file. You can run the application with just these details, but it only fails when the database URI has improper syntax. The application does not actually test the connection to see if it is valid and successfully connects.
read moreBlog
ServiceUnavailableException: Connection to the database terminated.
Photo credit I was working on a Spring Data Neo4j example application for a community user’s question, and I kept running into the error below when I defined bidirectional relationship in the domain classes.
2023-08-10T13:00:17.341-05:00 ERROR 98493 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.TransientDataAccessResourceException: Server at 408637a4.databases.neo4j.io:7687 is no longer available; Error code 'N/A'] with root cause org.
read moreBlog
How to Create a Spring Boot Application to Retrieve Data from Evernote
Photo credit I recently started work on a joint project with my colleague, Jason Koo. For this project, we want to import data from second brain apps (such as Obsidian, Notion, Evernote, etc) to Neo4j. Since I use Evernote, I was tasked with getting my notes out of Evernote. In this post, I will show you how to use the Evernote API and SDK in a Spring Boot application to retrieve data from Evernote.
read more