What does ~/Library/Application\ Support/Knowledge/ folder do?

Solution 1:

knowledge-agent

/usr/libexec/knowledge-agent writes its databases to
~/Library/Application Support/Knowledge and /var/db/CoreDuet/Knowledge.

This is Siri's proactive knowledge functionality. Siri will read data from the services you enable in System Preferences → Siri → Siri Suggestions & Privacy, writing data it finds useful into the database.