Member-only story
Tailor a Multi-Model Chatbot for a Multi-Model DuckDB
A Human-in-the-loop chatbot capable of SQL, graph, vector, and full-text queries
Drug trials are scientific studies that evaluate the safety and effectiveness of new medications in humans. Such trials are indispensable to the development and regulatory approval of new therapies. Drug trials offer hope for patients with serious illnesses, but navigating the complex world of clinical research can be daunting. Many patients remain unaware of their eligibility for these trials, let alone the potential benefits they offer. A patient-oriented, easy-to-use drug trial database is essential to fill this gap.
In my previous four articles (1, 2, 3, and 4), I built four such databases with Google Spanner, PostgreSQL, SurrealDB, and DuckDB, respectively. These multi-model databases allow users to find data through a combination of SQL, graph, vector, and full-text queries. Among them, DuckDB stands out as the most practical choice for me. It is free, user-friendly, light, and fast. DuckDB can be embedded into a Python script as an in-process database like SQLite or run as a cloud service like Spanner. I imported a dataset with over 5000 drugs, 2000 disorders, and 2000 clinical trials into DuckDB and called the database DrugDB.