whosouravsharma commited on
Commit
6ef422c
·
verified ·
1 Parent(s): 9c876ac

Add 'How this works' expander

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +30 -0
src/streamlit_app.py CHANGED
@@ -15,6 +15,36 @@ st.caption(
15
  "medical advice."
16
  )
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  if "messages" not in st.session_state:
19
  st.session_state.messages = []
20
 
 
15
  "medical advice."
16
  )
17
 
18
+ with st.expander("ℹ️ How this works"):
19
+ st.markdown(
20
+ """
21
+ This chat UI is the **frontend** half of a two-Space RAG system — it carries
22
+ no model logic of its own, it just calls a backend API.
23
+
24
+ **Pipeline:** your question → embedded with
25
+ [`sentence-transformers/all-MiniLM-L6-v2`](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
26
+ → top-k passages retrieved from a FAISS index built over the
27
+ [MedQuAD](https://www.kaggle.com/datasets/pythonafroz/medquad-medical-question-answer-for-ai-research)
28
+ medical Q&A dataset → assembled into a prompt that restricts the model to
29
+ answering **only** from that retrieved context (no diagnosis, no
30
+ prescriptions) → answer generated by a hosted LLM and returned with its
31
+ sources.
32
+
33
+ **Models in use:** a stock, unmodified sentence-embedding model for
34
+ retrieval, plus a remote hosted LLM for generation. Nothing here is
35
+ fine-tuned or trained — there's no custom model artifact behind this
36
+ project, so there's no separate model card.
37
+
38
+ **Limitations:** answers are only as good as MedQuAD's coverage; the
39
+ backend has no control over the hosted generation model beyond the
40
+ grounding prompt; no published latency/accuracy numbers yet.
41
+
42
+ Full details: see this Space's
43
+ [README](https://huggingface.co/spaces/whosouravsharma/Medical-Assistant-ChatBot/blob/main/README.md)
44
+ and the [backend Space](https://huggingface.co/spaces/whosouravsharma/medical-assistant-ai-backend).
45
+ """
46
+ )
47
+
48
  if "messages" not in st.session_state:
49
  st.session_state.messages = []
50