A Easy Technique to Enhance LLM Question Technology | by Harrison Hoffman | Aug, 2024

Dynamic Few-Shot Prompting

In March 2024, I wrote a tutorial on Actual 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 knowledge from an artificial hospital system dataset with details about sufferers, affected person critiques, hospital areas, visits, insurance coverage payers, and physicians.

The Hospital System Chatbot agent is hosted through FastAPI, and will be accessed by way of a Streamlit app — all packaged up with Docker Compose:

A demo of the Hospital System Chatbot. Picture by Writer.

All code is offered on GitHub, and anybody can learn concerning the venture intimately on Actual 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 example, I’ve added unit exams, refactored code to right for deprecated options, created deployments with GitHub actions, and most just lately built-in dynamic few-shot prompting to enhance Cypher question era.