HF RL Explorer

Task: Compute Document Similarity Using TF-IDF and Cosine Similarity

Task: Compute Document Similarity Using TF-IDF and Cosine Similarity: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that computes the cosine similarity between a query document and a set of training documents using TF-IDF vectorization. The script should identify which…

The task

Write a Python script that computes the cosine similarity between a query document and a set of training documents using TF-IDF vectorization. The script should identify which training document is most similar to the query.

Part of PrimeIntellect/Terminal-Lego-15k.