Learn how retrieval-based chatbots work by matching user queries to a database of predefined responses using similarity.