Mempage Interview Question

Implement a cosine similarity-based RAG in Numpy for a Postgres database without using other libraries.