# Matching sentences (/bullet points) in two sets using NLP

I am working on a problem where I have two texts T1, T2. T1 contains some important points that I have entered. How can I make sure that T2 has those points? I am aware of the algorithms like cosine, jaccard, BERT for semantic similarity but the problem is that they apply to the whole text whereas I want point-wise similarity i.e. T2 must contain the T1 points although the order and words used may differ a bit.

By points I meant bullet points covering discrete concepts and I basically want to check how many discrete concepts in my T1's points are covered in T2 where they could be in a single sentence or spread out across multiple sentences.

Example:

So T1 could have the following two points:

• The Queen reigned from 1943 to 2022.
• The Queen was the second longest reigning monarch.

Now T2 could either be:

The Queen was the second longest reigning monarch with her reign spanning 1952 to 2022.

or

• The Queen reigned from 1952 to 2022.
• She was Britain's second longest monarch.

In both these cases, T2 should be considered to contain both points in T1.

• what do you mean by points Nov 6, 2022 at 14:29
• @HadarSharvit edited to add an example. Nov 6, 2022 at 16:55

If the structure of both $$T_1$$ and $$T_2$$ is bullet points, I presume that the similarity between every pair of bullet points is a nice baseline. I'd go through various encoders and see how they compare. Otherwise, if $$T_2$$ is a paragraph, maybe split it to sentences and treat those as bullet points. Other option (which might be harder) is to fine-tune a language model with the following input and label: suppose the bullet points are $$\{bp_1^1,...,bp_1^n\}$$ for $$T_1$$ and $$\{bp_2^1,...,bp_2^m\}$$ for $$T_2$$, we can formulate a prompt as
Input: text1=$$bp_1^i$$, text2=$$bp_2^j$$
Output: True iff text2 in text1