Building a Secure, History-Aware AI Research Assistant with RAG