added snippets retrieval using cosine similarity