I have a text document related to mental health descriptions and I want to match these descriptions based on a input query. For example : When a user types in a query such as ” Give me a similar description to ” I feel calm” , I want the LLM to return ” I am relaxed” which is an exact verbatim present in the document. How can i ask the LLM to only stick to the content it sees in the document and extract the most similar content based on the query ?
I have tried a basic version using Langchain, chroma db , llama 2 on hugging face and the embeddings based on the MTEB leaderboard but the response is not always related to the text document. I want the LLM to stick to the content it sees in the document only. Is this possible ? Thank you in advance 🙂
Sylvester Anthony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.