ruslanmv commited on
Commit
ebf0655
·
1 Parent(s): e8173b9
appendix/Psi.png ADDED
appendix/description.txt ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Medical Interviewer
2
+ This chatbot conducts medical interviews based on psychological knowledge.
3
+
4
+ The interviewer will prepare a medical report based on the interview.
5
+
6
+ * Please note that this is a simulation and should not be used as a substitute for professional medical advice.
7
+ * It is important to emphasize that any information shared is confidential and cannot be accessed.
8
+ * In any case, it is recommended not to share sensitive information.
9
+
10
+
11
+ **Medical Interviewer** is an AI platform designed to simulate medical interviews. It leverages NLP and speech technologies to emulate a medical psychologist, offering insightful assessments and generating detailed medical reports.
12
+
13
+ This platform is ideal for educational, research, and preliminary assessment purposes but should not replace professional medical advice.
14
+
15
+ ## Features
16
+
17
+ **Key Features**:
18
+ - **Simulated Interviews**: Conducts interviews with focused medically relevant questions.
19
+ - **Natural Language Processing**: Understands and generates contextually relevant questions.
20
+ - **LangChain**: Create NLP chains for interview and report generation.
21
+ - **Audio Interaction**: Voice conversation simulation where the user can talk to the bot in a way that simulates real conversation or evidence.
22
+ - **Report Generation**: Automatically creates comprehensive medical reports after each session.
23
+ - **Document Upload for Reports**: Generates reports from uploaded TXT, PDF, or DOCX files.
24
+ - **Multi-language Support**: Conducts interviews and generates reports in the user's preferred language.
25
+ - **Selectable Interviewers**: Users can select their preferred interviewer, each with a different professional background, experience, and temperament. Options include:
26
+ - Sarah: An empathic, compassionate medical with over 30 years of experience, specializing in trauma, anxiety disorders, and family therapy.
27
+ - Aaron: A tough minded, medical with over 15 years of experience, specializing in stress, trauma, and high-performance demands, with a background as a military officer.
28
+
29
+
30
+ ## Retrieval-Augmented Generation (RAG) and Document Retrieval Process
31
+
32
+ **Retrieval-Augmented Generation (RAG)** is a method that combines the strengths of retrieval-based and generation-based approaches. RAG helps to ensure that the interview questions generated by the AI are both contextually relevant and grounded in authoritative sources - This optimizes and reduces the response time.
33
+
34
+ 1. **Document Embeddings**: The documents are converted into embeddings using OpenAI’s embedding models. These embeddings capture the semantic meaning of the text and are used to facilitate efficient retrieval.
35
+ 2. **FAISS Indexing**: The embeddings are stored in a FAISS (Facebook AI Similarity Search) index. FAISS is optimized for similarity search and clustering of dense vectors, making it ideal for this purpose.
36
+ 3. **Query Embedding**: When a user input or interview context is provided, it is also converted into an embedding.
37
+ 4. **Similarity Search**: The query embedding is used to search the FAISS index to retrieve the most relevant documents based on their embeddings.
38
+ 5. **Top-K Retrieval**: The system retrieves the top-K documents that are most similar to the user’s query embedding. These documents are then used to generate the next interview question, ensuring that the responses are based on relevant and accurate information.
39
+
40
+ ## Documents and Knowledge Database
41
+
42
+ The platform uses a rich set of documents and knowledge bases to inform the AI’s questioning and reporting processes. These documents include:
43
+
44
+ - **DSM-5 (Diagnostic and Statistical Manual of Mental Disorders, 5th Edition)**: Provides standardized criteria for the diagnosis of mental health conditions.
45
+ - **PDM-2 (Psychodynamic Diagnostic Manual, 2nd Edition)**: Offers a psychodynamic perspective on mental health diagnosis.
46
+ - **Personalities Descriptions**: Detailed descriptions of various personality types and traits.
47
+ - **Defence Mechanisms**: Information on psychological strategies used by individuals to cope with reality and maintain self-image.
48
+ - **Big Five Traits**: Descriptions of the five-factor model of personality traits.
49
+ - **Attachment Styles**: Framework for understanding different types of attachment in interpersonal relationships.
50
+ - **Interview Conduction Guides for medical Psychologists**: Guidelines and best practices for conducting medical interviews.
51
+
52
+ These documents are processed and indexed, enabling the AI to retrieve relevant excerpts during the interview to generate questions that are grounded in established psychological knowledge.
53
+
54
+ ## Contextual and Historical Relevance
55
+
56
+ Throughout the interview process, the AI uses all chat history to ensure that each follow-up question is contextually relevant. By leveraging both the immediate user input and the full history of the conversation, the AI can provide a coherent and comprehensive interview experience. The use of RAG ensures that the follow-up questions are informed not only by the user's previous responses but also by the most relevant and authoritative information available in the knowledge base.
57
+
58
+ ## Human-like simulated environment
59
+ It supports audio interactions by converting text questions into speech and transcribing user audio responses into text, facilitated by OpenAI’s text-to-speech (TTS) and Whisper speech-to-text technologies. This creates a simulated environment for real-like conversational interviews, making the interactions more human-like.
60
+
61
+ ### Interview Tab
62
+
63
+ The session starts with an introductory message delivered in both text and audio formats. Users respond by typing or recording audio responses, which the AI processes to generate and return relevant follow-up questions based on context and the retrieved documents. The conversation continues until a predetermined number of questions have been asked. At the end of the session, a detailed medical report is generated and available for download as a PDF.
64
+
65
+ ### Upload Document Tab
66
+
67
+ Users can upload existing documents and specify their preferred language. The system analyzes the document content and generates a detailed medical report, which can be displayed and downloaded.
68
+
69
+ ## Disclaimer
70
+
71
+ This platform is a simulation and should not replace professional medical advice. Always seek advice from a qualified healthcare provider for medical concerns.
72
+
73
+ ---
74
+
75
+ **medical Interviewer ** stands as a testament to the potential of advanced AI technologies in simulating medical psychology interviews and generating detailed reports. For technical details, refer to the in-code documentation. This platform offers a valuable tool for educational and research purposes by providing an enriching and interactive user experience.
appendix/diagram.png ADDED
appendix/icon.jpeg ADDED