Better way of getting the Recommendations for an input text

I am working on scanning a Word file and creating chunks of data ignoring the table of contents, preamble, etc. These chunks are legal clauses which in turn refer to documents using a bert search from the index which has all documents in it and provides a recommendation for the clause based on the input. How can I improve the quality of recommendations as when the input clause is big in length or references other clauses it should not get recommendations. How do I deal with this?

I am unable to find a pattern in clauses to identify one that shud get recommendations and one that should not. So is there any idea of how to deal with this?

sample input clause:

Valid clause: 11.1 Subject to clauses 10 and 11.2, the Sellers shall not make or authorise any public announcement or other communication or circular concerning the terms of any matter contemplated by or ancillary to this agreement unless they have first obtained the consent of the Buyer such consent not to be unreasonably withheld or delayed.

Invalid clause: 6. Warranties and indemnities 6.1 The Sellers jointly and severally warrant to the Buyer in the terms of the Warranties. 6.2 Each Seller severally warrants to the Buyer in the terms set out in part 1 of schedule 4 in respect of himself only and no Seller shall be liable to the Buyer or any other person for the breach of any such warranty by any other Seller. 6.3 The Warranties are qualified by the facts and circumstances fully and fairly disclosed in the Disclosure Letter. 6.4 For the purpose of clause 6.3 fully and fairly disclosed means disclosed, whether generally or specifically, in such a manner and with such accuracy and sufficient detail so as to enable a reasonable purchaser to identify the nature and scope of the matter disclosed and to make an informed assessment of its effect. 6.5 Subject to clause 6.3: (a) no knowledge relating to the Company or the Shares, (constructive or imputed) shall prevent or limit a claim made by the Buyer for breach of clause 6.1; and (b) the Sellers may not invoke the Buyer’s knowledge, (constructive or imputed) of a fact or circumstance as a defence to a claim for breach of clause 6.1. 6.6 The Sellers waive and may not enforce a right which they may have in respect of a misrepresentation, inaccuracy or omission in or from information or advice supplied or given by the Company or any of its officers or employees for the purpose of assisting the Sellers to make a representation, give a Warranty or prepare the Disclosure Letter. 6.7 Each Warranty is to be construed independently and (except where this agreement provides otherwise) is not limited by the terms of any other Warranty or any other provision of this agreement. 6.8 Unless otherwise specified, where any Warranty refers to the knowledge, information, belief or awareness of the Sellers (or a similar expression) the Sellers shall be deemed to have such knowledge, information, belief or awareness as the Sellers would have obtained had the Sellers made all reasonable enquiries into the subject matter of that Warranty (including enquiries of the directors, officers, managers, agents and advisers of the Company). 6.9 Each Seller shall unconditionally and irrevocably agree and undertake to indemnify and keep indemnified and hold harmless the Buyer and/or the Company in the case of Clause 6.9(c) from and against, and covenant to pay to the Buyer on demand an amount equal to all costs (including costs of enforcement), loss, liability (including and tax liability), direct, indirect or consequential losses, damages, claims, expense or demand which the Buyer and/or the Company in the case of clause 6.9(c) may incur as a result of or in connection with: (a) breach of clause 6.2 by that Seller of the Warranties in part 1 of schedule 4 or of the covenants in clause 2; (b) any matters arising out of or in connection with the Transferred Business;