In March 2024, I wrote a tutorial on Real Python detailing the steps to construct a retrieval-augmented era (RAG) chatbot utilizing LangChain. The chatbot, formally named the Hospital System Chatbot, makes use of Neo4j to retrieve information from an artificial hospital system dataset with details about sufferers, affected person opinions, hospital places, visits, insurance coverage payers, and physicians.
The Hospital System Chatbot agent is hosted through FastAPI, and might be accessed by a Streamlit app — all packaged up with Docker Compose:
All code is on the market on GitHub, and anybody can learn in regards to the venture intimately on Real Python.
Since writing the tutorial, I’ve maintained the venture on GitHub to enhance the Hospital System Chatbot’s capabilities and make it extra production-ready. As an illustration, I’ve added unit exams, refactored code to right for deprecated options, created deployments with GitHub actions, and most lately built-in dynamic few-shot prompting to enhance Cypher question era.