Using Similarity Search in Homeopathy Repertorization Software

Written by on February 11, 2024 in Homeopathy with 0 Comments

Homeopathy Repertorization software such as RadarOpus, MacRepertory, Vithoulkas Compass, and Synergy Homeopathic Software (SHS) are widely used by homeopaths to speed up case taking, repertorization and case analysis. All of them have a “Search” feature, where the given text is searched (typically based on key words and synonyms) against one or more repertories and the matching “rubrics” are displayed. The homeopath then chooses relevant rubrics from this list for further case analysis. None of the above software support “semantic similarity search”.

“Semantic similarity” uses word embedding vectors to compare “how similar” two texts are. Although this idea has been around for some time, it has gained increased visibility recently with the advent of Large Language Models (LLM).

Let us take an example. Suppose we would like to know what rubrics (in any of the supported repertories) come up for the text “cervical spondylosis”. Here is what I get in “Vithoulkas Compass”:

Vithoulkas Compass Example

“Cervical Spondylosis” in Vithoulkas Compass

There is no match! I tried in RadarOpus and got the same result.  Let us try in Synergy Homeopathic Software (SHS):

Searching in SHS

Searching in SHS

This is interesting because it shows the related phrase “cervical spondylitis” from Phatak Repertory (among others), even though the given search text does not appear verbatim.

Let us now try to use “semantic” search. To demonstrate this concept, I have written a Python program that uses Kent Repertory and displays “similar” rubrics based on input text. Here is what my program displays as possible matches:

Semantic Similarity Search

Semantic Similarity Search

You will notice that the word “spondylosis” (or even “spondylitis”) does not appear in any of the rubrics shown, but the rubrics are “somewhat similar” to the given text. I feel this is more valuable to a homeopath. My implementation uses a “vector database” to store and retrieve the rubrics present in Kent repertory. For keeping the discussion simple, I am not showing the remedies associated with rubrics.

Let us try a more complicated example. The search text is “stitching pain in the knee when ascending stairs”. Here is the output from RadarOpus:

RadarOpus Result

RadarOpus Result

No matches in any included repertory. Let us try SHS:

SHS Result

SHS Result

Wow! There are 2 matches in Phatak’s repertory. If you observe carefully, the match shows that every word in the given text is present in the search result, but some words such as “the” and “in” are present as part of (substring) another word! That was not intended at all. 

I will now use “climbing” instead of “ascending” and see how SHS handles this:

Modified Query in SHS

Modified Query in SHS

No matches this time! Clearly, the strategy used is not what we want.

How does semantic search work in this case?

Semantic Search Yields Good Results

Semantic Search Yields Better Matches

This is better because it shows “potential” matches. Interestingly, it shows “descending stairs” too (it is possible to fine tune the search result, but that is not important for now). Also, I am displaying top 10 matches and this can be customized.

In the program that I wrote, I am also supporting “chapter”-based similarity search. First let us try “eruptions aggravated by cold air” without mentioning any chapter:

Another Example

Another Example

The shows results from multiple chapters: Face, Skin, Back, Extremities. What if I want to search only in Face chapter?

Filtering Based on Chapter

Filtering Based on Chapter

We now have rubrics only from “Face” chapter. This can be quite convenient as it permits higher-level filtering.

Here are two more examples from my program:

Another Example

Another Example

Filtering based on “Mind” chapter:

Restricting to Mind Chapter

Restricting to Mind Chapter

As this article attempts to show, supporting “semantic similarity search” is quite useful in homeopathy software. Another important feature that needs to be incorporated is to take advantage of Retrieval Augmented Generation to help homeopaths tackle real-world cases. Let us focus on building a new generation of homeopathy software that is not shackled by decades-old approaches to case solving! 

Have a nice weekend!

Tags: , , ,

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

Subscribe via RSS Feed

Leave a Reply

Your email address will not be published. Required fields are marked *

Top