I am trying to verify if the knowledge data matches the prompt given by the user.
Backstory: -
- I am using smollm2 from ollama as my main llm and langchain/crewai as my main farmwork
- I have a custom-built tool that searches google and returns web url's based on the search query produced from the user's prompt.
- These web url's and the content within will be the main data source for the llm to give an answer.
My main question is how do i verify if the data source matches the prompt given by the user.
My solutions (not that great): -
- Created a tool using smollm2 to verify the context of the data source and the prompt: Very ambiguous results
- Tried similarity scores using embedding models: varying scores, unable to set a threshold
Pls do feel free to share your ideas or thought processes.
Thanks in advance!