Make a medical chatbot using GraphRAG with SurrealDB + LangChain
Blog post from SurrealDB
Dave MacLeod's article discusses creating a medical chatbot using SurrealDB and LangChain with the Rust programming language, building on a previous Python implementation. Rust developers can utilize the langchain_rust crate, which supports SurrealDB as a vector store, to achieve similar functionality. Although graph queries are not yet supported, classic vector searches can recommend patient treatments. The process involves setting up a Rust project with specific dependencies, including serde for YAML processing, and creating a CLI that utilizes the langchain-rust crate's capabilities to perform similarity searches on symptoms and their possible treatments stored in a YAML file. The implementation includes initializing an embedder, configuring a SurrealDB store, and using similarity searches to return relevant treatment recommendations based on user queries. The setup also demonstrates the use of OpenAI and MistralAI embedders, highlighting the flexibility and functionality of the langchain-rust crate in building a functional medical chatbot.