Looking for medical answers? Ask NICE! Get a beautiful explanation with the NICE Clinical Knowledge Summaries as the source. You can even clear your PLAB or MRCP MCQ doubts.
DO NOT use as a substitute for professional medical advice. This is a work in progress meant for EDUCATIONAL PURPOSES ONLY.
Try out the app here You can also try chatting with NICE guidelines. Give it a go! -> ChatNICE
To deploy this project locally, ensure that python 3.10 is installed and then follow these steps:
git clone https://github.com/faz-cxr/nice.gist
pip install -r requirements.txt
streamlit run Home.py
The app implements the following academic papers:
- In-Context Retrieval-Augmented Language Models aka RALM
- When you give Ask NICE a question, it first retrieves relevant documents (in this case, NICE Clinical Knowledge Summaries). It then passes those documents, along with the original question, to the language model to generate a response.
- Precise Zero-Shot Dense Retrieval without Relevance Labels aka HyDE (Hypothetical Document Embeddings)
- HyDE is an embedding technique that takes queries, generates a hypothetical answer, and then embeds that generated answer to fetch documents more accurately.
Question-Answering has the following steps, all handled by RetrievalQAWithSourcesChain:
- Given a user question, create a hypothetical answer (possibly false, with factual inaccuracies) and then store that as Embeddings.
- Look up relevant documents from the vectorstore using Embeddings and a similarity search.
- Pass the user question and relevant documents to GPT-3.5-turbo to generate a final answer.
Here's a visual representation of how it all works: